diff --git a/core/unit/ctest_cudss.cu b/core/unit/ctest_cudss.cu index e56a782538..6cd1de7f3d 100644 --- a/core/unit/ctest_cudss.cu +++ b/core/unit/ctest_cudss.cu @@ -11,6 +11,7 @@ extern "C" { extern "C" { void test_cudss_simple(); void test_cudss_ops(); +void test_cudss_ops_update_amat(); void test_cudss_ops_multiple_rhs(); } @@ -259,6 +260,109 @@ void test_cudss_ops() gkyl_culinsolver_prob_release(prob); } +void test_cudss_ops_update_amat() +{ + int nfail = 0; + double s, u, p, e, r, l; + int nrhs, m, n; + + /* Initialize matrix A. */ + /* A : matrix([s,0,u,u,0],[l,u,0,0,0],[0,l,p,0,0],[0,0,0,e,u],[l,l,0,0,r]); */ + m = n = 5; + nrhs = 1; + + s = 19.0; u = 21.0; p = 16.0; e = 5.0; r = 18.0; l = 12.0; + /* A : matrix([s,0,u,u,0],[l,u,0,0,0],[0,l,p,0,0],[0,0,0,e,u],[l,l,0,0,r]); */ + struct gkyl_mat_triples **tri_arr = (struct gkyl_mat_triples **) gkyl_malloc(sizeof(struct gkyl_mat_triples *)); + tri_arr[0] = gkyl_mat_triples_new(m, n); + struct gkyl_mat_triples *tri = tri_arr[0]; + gkyl_mat_triples_set_rowmaj_order(tri); + // row 0 + gkyl_mat_triples_insert(tri, 0, 0, s); + gkyl_mat_triples_insert(tri, 0, 2, u); + gkyl_mat_triples_insert(tri, 0, 3, u); + // row 1 + gkyl_mat_triples_insert(tri, 1, 0, l); + gkyl_mat_triples_insert(tri, 1, 1, u); + // row 2 + gkyl_mat_triples_insert(tri, 2, 1, l); + gkyl_mat_triples_insert(tri, 2, 2, p); + // row 3 + gkyl_mat_triples_insert(tri, 3, 3, e); + gkyl_mat_triples_insert(tri, 3, 4, u); + // row 4 + gkyl_mat_triples_insert(tri, 4, 0, l); + gkyl_mat_triples_insert(tri, 4, 1, l); + gkyl_mat_triples_insert(tri, 4, 4, r); + + // Create the cuSolver linear problem setup. + gkyl_culinsolver_prob *prob = gkyl_culinsolver_prob_new(1, m, n, nrhs); + + // Allocate the A matrix from triples. + gkyl_culinsolver_amat_from_triples(prob, tri_arr); + + // Create right-hand side matrix B = transpose([1,1,1,1,1]). + gkyl_mat_triples *triRHS = gkyl_mat_triples_new(m, nrhs); + gkyl_mat_triples_insert(triRHS, 0, 0, 1.0); + gkyl_mat_triples_insert(triRHS, 1, 0, 1.0); + gkyl_mat_triples_insert(triRHS, 2, 0, 1.0); + gkyl_mat_triples_insert(triRHS, 3, 0, 1.0); + gkyl_mat_triples_insert(triRHS, 4, 0, 1.0); + gkyl_culinsolver_brhs_from_triples(prob, triRHS); + + gkyl_culinsolver_solve(prob); + gkyl_culinsolver_finish_host(prob); + + // Solution is: [-1/32, 11/168, 3/224, 1/16, 11/336]. + GKYL_CU_CHECK( gkyl_compare_double(-1.0/32.0 , gkyl_culinsolver_get_sol_lin(prob,0), 1e-14), &nfail ); + GKYL_CU_CHECK( gkyl_compare_double( 11.0/168.0, gkyl_culinsolver_get_sol_lin(prob,1), 1e-14), &nfail ); + GKYL_CU_CHECK( gkyl_compare_double( 3.0/224.0 , gkyl_culinsolver_get_sol_lin(prob,2), 1e-14), &nfail ); + GKYL_CU_CHECK( gkyl_compare_double( 1.0/16.0 , gkyl_culinsolver_get_sol_lin(prob,3), 1e-14), &nfail ); + GKYL_CU_CHECK( gkyl_compare_double( 11.0/336.0, gkyl_culinsolver_get_sol_lin(prob,4), 1e-14), &nfail ); + + // Now update the LHS matrix. Multiply it by a constant so the solution should be the same as before but divided by that constant. + double prob_fac = 1.3; + + gkyl_mat_triples_set_rowmaj_order(tri); + // row 0 + gkyl_mat_triples_insert(tri, 0, 0, s*prob_fac); + gkyl_mat_triples_insert(tri, 0, 2, u*prob_fac); + gkyl_mat_triples_insert(tri, 0, 3, u*prob_fac); + // row 1 + gkyl_mat_triples_insert(tri, 1, 0, l*prob_fac); + gkyl_mat_triples_insert(tri, 1, 1, u*prob_fac); + // row 2 + gkyl_mat_triples_insert(tri, 2, 1, l*prob_fac); + gkyl_mat_triples_insert(tri, 2, 2, p*prob_fac); + // row 3 + gkyl_mat_triples_insert(tri, 3, 3, e*prob_fac); + gkyl_mat_triples_insert(tri, 3, 4, u*prob_fac); + // row 4 + gkyl_mat_triples_insert(tri, 4, 0, l*prob_fac); + gkyl_mat_triples_insert(tri, 4, 1, l*prob_fac); + gkyl_mat_triples_insert(tri, 4, 4, r*prob_fac); + + gkyl_culinsolver_amat_update_from_triples(prob, tri_arr); + + // Reset RHS for good measure. + gkyl_culinsolver_brhs_from_triples(prob, triRHS); + + gkyl_culinsolver_solve(prob); + gkyl_culinsolver_finish_host(prob); + + // Solution is: (1/prob_fac)*[-1/32, 11/168, 3/224, 1/16, 11/336]. + GKYL_CU_CHECK( gkyl_compare_double((1.0/prob_fac)*(-1.0/32.0 ), gkyl_culinsolver_get_sol_lin(prob,0), 1e-14), &nfail ); + GKYL_CU_CHECK( gkyl_compare_double((1.0/prob_fac)*( 11.0/168.0), gkyl_culinsolver_get_sol_lin(prob,1), 1e-14), &nfail ); + GKYL_CU_CHECK( gkyl_compare_double((1.0/prob_fac)*( 3.0/224.0 ), gkyl_culinsolver_get_sol_lin(prob,2), 1e-14), &nfail ); + GKYL_CU_CHECK( gkyl_compare_double((1.0/prob_fac)*( 1.0/16.0 ), gkyl_culinsolver_get_sol_lin(prob,3), 1e-14), &nfail ); + GKYL_CU_CHECK( gkyl_compare_double((1.0/prob_fac)*( 11.0/336.0), gkyl_culinsolver_get_sol_lin(prob,4), 1e-14), &nfail ); + + gkyl_mat_triples_release(tri); + gkyl_free(tri_arr); + gkyl_mat_triples_release(triRHS); + gkyl_culinsolver_prob_release(prob); +} + void test_cudss_ops_multiple_rhs() { double s, u, p, e, r, l; @@ -320,26 +424,152 @@ void test_cudss_ops_multiple_rhs() // Solution is: [-1/32, 11/168, 3/224, 1/16, 11/336]. // 1st problem - GKYL_CU_CHECK( gkyl_compare_double(-1.0/32.0, gkyl_culinsolver_get_sol_lin(prob,0), 1e-14), &nfail ); + GKYL_CU_CHECK( gkyl_compare_double(-1.0/32.0 , gkyl_culinsolver_get_sol_lin(prob,0), 1e-14), &nfail ); GKYL_CU_CHECK( gkyl_compare_double( 11.0/168.0, gkyl_culinsolver_get_sol_lin(prob,1), 1e-14), &nfail ); - GKYL_CU_CHECK( gkyl_compare_double( 3.0/224.0, gkyl_culinsolver_get_sol_lin(prob,2), 1e-14), &nfail ); - GKYL_CU_CHECK( gkyl_compare_double( 1.0/16.0, gkyl_culinsolver_get_sol_lin(prob,3), 1e-14), &nfail ); + GKYL_CU_CHECK( gkyl_compare_double( 3.0/224.0 , gkyl_culinsolver_get_sol_lin(prob,2), 1e-14), &nfail ); + GKYL_CU_CHECK( gkyl_compare_double( 1.0/16.0 , gkyl_culinsolver_get_sol_lin(prob,3), 1e-14), &nfail ); GKYL_CU_CHECK( gkyl_compare_double( 11.0/336.0, gkyl_culinsolver_get_sol_lin(prob,4), 1e-14), &nfail ); // 2nd problem - GKYL_CU_CHECK( gkyl_compare_double(-1.0/32.0, gkyl_culinsolver_get_sol_lin(prob,5), 1e-14), &nfail ); + GKYL_CU_CHECK( gkyl_compare_double(-1.0/32.0 , gkyl_culinsolver_get_sol_lin(prob,5), 1e-14), &nfail ); GKYL_CU_CHECK( gkyl_compare_double( 11.0/168.0, gkyl_culinsolver_get_sol_lin(prob,6), 1e-14), &nfail ); - GKYL_CU_CHECK( gkyl_compare_double( 3.0/224.0, gkyl_culinsolver_get_sol_lin(prob,7), 1e-14), &nfail ); - GKYL_CU_CHECK( gkyl_compare_double( 1.0/16.0, gkyl_culinsolver_get_sol_lin(prob,8), 1e-14), &nfail ); + GKYL_CU_CHECK( gkyl_compare_double( 3.0/224.0 , gkyl_culinsolver_get_sol_lin(prob,7), 1e-14), &nfail ); + GKYL_CU_CHECK( gkyl_compare_double( 1.0/16.0 , gkyl_culinsolver_get_sol_lin(prob,8), 1e-14), &nfail ); GKYL_CU_CHECK( gkyl_compare_double( 11.0/336.0, gkyl_culinsolver_get_sol_lin(prob,9), 1e-14), &nfail ); // 3rd problem - GKYL_CU_CHECK( gkyl_compare_double(-1.0/32.0, gkyl_culinsolver_get_sol_lin(prob,10), 1e-14), &nfail ); + GKYL_CU_CHECK( gkyl_compare_double(-1.0/32.0 , gkyl_culinsolver_get_sol_lin(prob,10), 1e-14), &nfail ); GKYL_CU_CHECK( gkyl_compare_double( 11.0/168.0, gkyl_culinsolver_get_sol_lin(prob,11), 1e-14), &nfail ); - GKYL_CU_CHECK( gkyl_compare_double( 3.0/224.0, gkyl_culinsolver_get_sol_lin(prob,12), 1e-14), &nfail ); - GKYL_CU_CHECK( gkyl_compare_double( 1.0/16.0, gkyl_culinsolver_get_sol_lin(prob,13), 1e-14), &nfail ); + GKYL_CU_CHECK( gkyl_compare_double( 3.0/224.0 , gkyl_culinsolver_get_sol_lin(prob,12), 1e-14), &nfail ); + GKYL_CU_CHECK( gkyl_compare_double( 1.0/16.0 , gkyl_culinsolver_get_sol_lin(prob,13), 1e-14), &nfail ); GKYL_CU_CHECK( gkyl_compare_double( 11.0/336.0, gkyl_culinsolver_get_sol_lin(prob,14), 1e-14), &nfail ); gkyl_culinsolver_prob_release(prob); } +void test_cudss_ops_update_amat_multiple_rhs() +{ + double s, u, p, e, r, l; + int nrhs, m, n; + + /* Initialize matrix A. */ + /* A : matrix([s,0,u,u,0],[l,u,0,0,0],[0,l,p,0,0],[0,0,0,e,u],[l,l,0,0,r]); */ + m = n = 5; + nrhs = 3; + + s = 19.0; u = 21.0; p = 16.0; e = 5.0; r = 18.0; l = 12.0; + /* A : matrix([s,0,u,u,0],[l,u,0,0,0],[0,l,p,0,0],[0,0,0,e,u],[l,l,0,0,r]); */ + struct gkyl_mat_triples **tri_arr = (struct gkyl_mat_triples **) gkyl_malloc(sizeof(struct gkyl_mat_triples *)); + tri_arr[0] = gkyl_mat_triples_new(m, n); + struct gkyl_mat_triples *tri = tri_arr[0]; + gkyl_mat_triples_set_rowmaj_order(tri); + // row 0 + gkyl_mat_triples_insert(tri, 0, 0, s); + gkyl_mat_triples_insert(tri, 0, 2, u); + gkyl_mat_triples_insert(tri, 0, 3, u); + // row 1 + gkyl_mat_triples_insert(tri, 1, 0, l); + gkyl_mat_triples_insert(tri, 1, 1, u); + // row 2 + gkyl_mat_triples_insert(tri, 2, 1, l); + gkyl_mat_triples_insert(tri, 2, 2, p); + // row 3 + gkyl_mat_triples_insert(tri, 3, 3, e); + gkyl_mat_triples_insert(tri, 3, 4, u); + // row 4 + gkyl_mat_triples_insert(tri, 4, 0, l); + gkyl_mat_triples_insert(tri, 4, 1, l); + gkyl_mat_triples_insert(tri, 4, 4, r); + + // Create the cuSolver linear problem setup. + gkyl_culinsolver_prob *prob = gkyl_culinsolver_prob_new(1, m, n, nrhs); + + // Allocate the A matrix from triples. + gkyl_culinsolver_amat_from_triples(prob, tri_arr); + + // Create right-hand side matrix B = transpose([1,1,1,1,1]). + gkyl_mat_triples *triRHS = gkyl_mat_triples_new(m, nrhs); + for (int k=0; kdata; set_arr_dat_zero_ho(arr, dat_p); } + else if (type == GKYL_LONG) { + long *dat_p = arr->data; + set_arr_dat_zero_ho(arr, dat_p); + } else if (type == GKYL_FLOAT) { float *dat_p = arr->data; set_arr_dat_zero_ho(arr, dat_p); @@ -297,6 +302,11 @@ gkyl_array_cu_dev_new(enum gkyl_elem_type type, size_t ncomp, size_t size) set_arr_dat_zero_dev(arr, data_ho); gkyl_free(data_ho); } + else if (type == GKYL_LONG) { + long *data_ho = gkyl_malloc(arr->size*arr->esznc); + set_arr_dat_zero_dev(arr, data_ho); + gkyl_free(data_ho); + } else if (type == GKYL_FLOAT) { float *data_ho = gkyl_malloc(arr->size*arr->esznc); set_arr_dat_zero_dev(arr, data_ho); @@ -344,6 +354,10 @@ gkyl_array_cu_host_new(enum gkyl_elem_type type, size_t ncomp, size_t size) int *dat_p = arr->data; set_arr_dat_zero_ho(arr, dat_p); } + else if (type == GKYL_LONG) { + long *dat_p = arr->data; + set_arr_dat_zero_ho(arr, dat_p); + } else if (type == GKYL_FLOAT) { float *dat_p = arr->data; set_arr_dat_zero_ho(arr, dat_p); diff --git a/core/zero/cudss_ops.cu b/core/zero/cudss_ops.cu index 9fb9443e62..47284f3711 100644 --- a/core/zero/cudss_ops.cu +++ b/core/zero/cudss_ops.cu @@ -38,6 +38,7 @@ struct gkyl_culinsolver_prob { cudssMatrix_t *x, *b; // cuDSS objects holding the unknowns vector and RHS vector. // Arrays used to populate the LHS matrix in CSR format. + double *csr_val_ho; double *csr_val_cu; int *csr_rowptr_cu, *csr_colind_cu; }; @@ -110,7 +111,7 @@ gkyl_culinsolver_amat_from_triples(struct gkyl_culinsolver_prob *prob, struct gk // Convert triples to CSR arrays on device. // Use CSR format - double *csr_val = (double*) gkyl_malloc(prob->nprob*prob->nnz*sizeof(double)); // non-zero matrix elements. + prob->csr_val_ho = (double*) gkyl_malloc(prob->nprob*prob->nnz*sizeof(double)); // non-zero matrix elements. int *csr_colind = (int*) gkyl_malloc(sizeof(int)*prob->nnz); // col index of entries in csrvalA. int *csr_rowptr = (int*) gkyl_malloc(sizeof(int)*(prob->mrow+1)); // 1st entry of each row as index in csrvalA. @@ -125,7 +126,7 @@ gkyl_culinsolver_amat_from_triples(struct gkyl_culinsolver_prob *prob, struct gk struct gkyl_mtriple mt = gkyl_mat_triples_iter_at(iter); size_t idx[2] = { mt.row, mt.col }; - csr_val[k*prob->nnz+i] = mt.val; + prob->csr_val_ho[k*prob->nnz+i] = mt.val; if (k==0) { csr_colind[i] = idx[1]; if (!csr_rowptr_assigned[idx[0]]) { @@ -143,7 +144,7 @@ gkyl_culinsolver_amat_from_triples(struct gkyl_culinsolver_prob *prob, struct gk prob->csr_val_cu = (double*) gkyl_cu_malloc(prob->nprob*prob->nnz*sizeof(double)); // Non-zero matrix elements. prob->csr_colind_cu = (int*) gkyl_cu_malloc(sizeof(int)*prob->nnz); // Col index of entries in csrvalA. prob->csr_rowptr_cu = (int*) gkyl_cu_malloc(sizeof(int)*(prob->mrow+1)); // 1st entry of each row as index in csrvalA. - gkyl_cu_memcpy(prob->csr_val_cu, csr_val, prob->nprob*prob->nnz*sizeof(double), GKYL_CU_MEMCPY_H2D); + gkyl_cu_memcpy(prob->csr_val_cu, prob->csr_val_ho, prob->nprob*prob->nnz*sizeof(double), GKYL_CU_MEMCPY_H2D); gkyl_cu_memcpy(prob->csr_colind_cu, csr_colind, sizeof(int)*prob->nnz, GKYL_CU_MEMCPY_H2D); gkyl_cu_memcpy(prob->csr_rowptr_cu, csr_rowptr, sizeof(int)*(prob->mrow+1), GKYL_CU_MEMCPY_H2D); @@ -170,11 +171,57 @@ gkyl_culinsolver_amat_from_triples(struct gkyl_culinsolver_prob *prob, struct gk prob->solverData[i], prob->A[i], prob->x[i], prob->b[i]), status, "cudssExecute for factor"); } - gkyl_free(csr_val); gkyl_free(csr_colind); gkyl_free(csr_rowptr); } +void +gkyl_culinsolver_amat_update_from_triples(struct gkyl_culinsolver_prob *prob, struct gkyl_mat_triples **tri) +{ + // Convert triples to CSR arrays on device. + // Sorted (row-major order) keys (linear indices to flattened matrix). + for (size_t k=0; knprob; k++) { + gkyl_mat_triples_iter *iter = gkyl_mat_triples_iter_new(tri[k]); + for (size_t i=0; innz; ++i) { + gkyl_mat_triples_iter_next(iter); // bump iterator. + struct gkyl_mtriple mt = gkyl_mat_triples_iter_at(iter); + prob->csr_val_ho[k*prob->nnz+i] = mt.val; + } + gkyl_mat_triples_iter_release(iter); + } + + // Copy arrays to device. + gkyl_cu_memcpy(prob->csr_val_cu, prob->csr_val_ho, prob->nprob*prob->nnz*sizeof(double), GKYL_CU_MEMCPY_H2D); + + for (int i=0; inprob; i++) { + long off = i * prob->nnz; + + cudssStatus_t status = CUDSS_STATUS_SUCCESS; + // Set matrix values. + checkCUDSS(cudssMatrixSetValues(prob->A[i], prob->csr_val_cu+off), status, "cudssMatrixSetValues for resetting A."); + + // Factorize. + checkCUDSS(cudssExecute(prob->handle, CUDSS_PHASE_FACTORIZATION, prob->solverConfig[i], + prob->solverData[i], prob->A[i], prob->x[i], prob->b[i]), status, "cudssExecute for factor"); + } +} + +void +gkyl_culinsolver_amat_update(struct gkyl_culinsolver_prob *prob, double *csr_values) +{ + for (int i=0; inprob; i++) { + long off = i * prob->nnz; + + cudssStatus_t status = CUDSS_STATUS_SUCCESS; + // Set matrix values. + checkCUDSS(cudssMatrixSetValues(prob->A[i], csr_values+off), status, "cudssMatrixSetValues for resetting A."); + + // Factorize. + checkCUDSS(cudssExecute(prob->handle, CUDSS_PHASE_FACTORIZATION, prob->solverConfig[i], + prob->solverData[i], prob->A[i], prob->x[i], prob->b[i]), status, "cudssExecute for factor"); + } +} + void gkyl_culinsolver_brhs_from_triples(struct gkyl_culinsolver_prob *prob, gkyl_mat_triples *tri) { @@ -229,6 +276,12 @@ gkyl_culinsolver_clear_rhs(struct gkyl_culinsolver_prob *prob, double val) gkyl_cu_memset(prob->rhs_cu, val, prob->nprob*prob->mrow*prob->nrhs*sizeof(double)); } +void +gkyl_culinsolver_clear_csr_values(struct gkyl_culinsolver_prob *prob, double val) +{ + gkyl_cu_memset(prob->csr_val_cu, val, prob->nprob*prob->nnz*sizeof(double)); +} + double* gkyl_culinsolver_get_rhs_ptr(struct gkyl_culinsolver_prob *prob, long loc) { @@ -241,6 +294,12 @@ gkyl_culinsolver_get_sol_ptr(struct gkyl_culinsolver_prob *prob, long loc) return prob->x_cu+loc; } +double* +gkyl_culinsolver_get_csr_values_ptr(struct gkyl_culinsolver_prob *prob, long loc) +{ + return prob->csr_val_cu+loc; +} + double gkyl_culinsolver_get_sol_lin(struct gkyl_culinsolver_prob *prob, long loc) { @@ -269,6 +328,7 @@ gkyl_culinsolver_prob_release(struct gkyl_culinsolver_prob *prob) gkyl_cu_free(prob->csr_colind_cu); gkyl_cu_free(prob->csr_rowptr_cu); gkyl_cu_free(prob->csr_val_cu); + gkyl_free(prob->csr_val_ho); checkCuda(cudaStreamSynchronize(prob->stream)); cudaStreamDestroy(prob->stream); diff --git a/core/zero/gkyl_comm.h b/core/zero/gkyl_comm.h index 146d4b2f6b..71b59c50c1 100644 --- a/core/zero/gkyl_comm.h +++ b/core/zero/gkyl_comm.h @@ -11,40 +11,40 @@ // Structure holding data and function pointers to communicate various // Gkeyll objects across multi-region or multi-block domains struct gkyl_comm { - char id[128]; // string ID for communcator - bool has_decomp; // flag to indicate if comm has an associated decomp + char id[128]; // string ID for communcator. + bool has_decomp; // flag to indicate if comm has an associated decomp. - struct gkyl_ref_count ref_count; // reference count + struct gkyl_ref_count ref_count; // reference count. }; /** * Get rank of communicator. * - * @param comm Communicator - * @param rank On output, the rank - * @return error code: 0 for success + * @param comm Communicator. + * @param rank On output, the rank. + * @return error code: 0 for success. */ int gkyl_comm_get_rank(struct gkyl_comm *comm, int *rank); /** * Get number of ranks in communicator * - * @param comm Communicator - * @param rank On output, the rank - * @return error code: 0 for success + * @param comm Communicator. + * @param rank On output, the rank. + * @return error code: 0 for success. */ int gkyl_comm_get_size(struct gkyl_comm *comm, int *sz); /** * All reduce values across domains. * - * @param comm Communicator - * @param type Data-type of element - * @param op Operator to use in reduction - * @param nelem Number of elemets in inp and out - * @param inp Local values on domain - * @param out Reduced values - * @return error code: 0 for success + * @param comm Communicator. + * @param type Data-type of element. + * @param op Operator to use in reduction. + * @param nelem Number of elemets in inp and out. + * @param inp Local values on domain. + * @param out Reduced values. + * @return error code: 0 for success. */ int gkyl_comm_allreduce(struct gkyl_comm *comm, enum gkyl_elem_type type, enum gkyl_array_op op, int nelem, const void *inp, void *out); @@ -52,13 +52,13 @@ int gkyl_comm_allreduce(struct gkyl_comm *comm, enum gkyl_elem_type type, /** * All reduce values across domains on the host/MPI communicator. * - * @param comm Communicator - * @param type Data-type of element - * @param op Operator to use in reduction - * @param nelem Number of elemets in inp and out - * @param inp Local values on domain - * @param out Reduced values - * @return error code: 0 for success + * @param comm Communicator. + * @param type Data-type of element. + * @param op Operator to use in reduction. + * @param nelem Number of elemets in inp and out. + * @param inp Local values on domain. + * @param out Reduced values. + * @return error code: 0 for success. */ int gkyl_comm_allreduce_host(struct gkyl_comm *comm, enum gkyl_elem_type type, enum gkyl_array_op op, int nelem, const void *inp, void *out); @@ -66,12 +66,12 @@ int gkyl_comm_allreduce_host(struct gkyl_comm *comm, enum gkyl_elem_type type, /** * Gather all local data into a global array on each process. * - * @param comm Communicator - * @param local Local range for array - * @param global Global range for array - * @param array_local Local array - * @param array_global Global array - * @return error code: 0 for success + * @param comm Communicator. + * @param local Local range for array. + * @param global Global range for array. + * @param array_local Local array. + * @param array_global Global array. + * @return error code: 0 for success. */ int gkyl_comm_array_allgather(struct gkyl_comm *comm, const struct gkyl_range *local, const struct gkyl_range *global, @@ -80,12 +80,12 @@ int gkyl_comm_array_allgather(struct gkyl_comm *comm, /** * Gather all local data on host into a global array on each process. * - * @param comm Communicator - * @param local Local range for array - * @param global Global range for array - * @param array_local Local array - * @param array_global Global array - * @return error code: 0 for success + * @param comm Communicator. + * @param local Local range for array. + * @param global Global range for array. + * @param array_local Local array. + * @param array_global Global array. + * @return error code: 0 for success. */ int gkyl_comm_array_allgather_host(struct gkyl_comm *comm, const struct gkyl_range *local, const struct gkyl_range *global, @@ -98,7 +98,7 @@ int gkyl_comm_array_allgather_host(struct gkyl_comm *comm, * @param array_send Array to send (only in rank 'root'). * @param array_recv Receive buffer array. * @param root Broadcasting process. - * @return error code: 0 for success + * @return error code: 0 for success. */ int gkyl_comm_array_bcast(struct gkyl_comm *comm, const struct gkyl_array *array_send, struct gkyl_array *array_recv, int root); @@ -110,7 +110,7 @@ int gkyl_comm_array_bcast(struct gkyl_comm *comm, * @param array_send Array to send (only in rank 'root'). * @param array_recv Receive buffer array. * @param root Broadcasting process. - * @return error code: 0 for success + * @return error code: 0 for success. */ int gkyl_comm_array_bcast_host(struct gkyl_comm *comm, const struct gkyl_array *array_send, struct gkyl_array *array_recv, int root); @@ -118,11 +118,11 @@ int gkyl_comm_array_bcast_host(struct gkyl_comm *comm, /** * Synchronize array across domain. * - * @param comm Communicator - * @param local Local range for array: sub-range of local_ext - * @param local_ext Extended range, i.e. range over which array is defined - * @param array Array to synchronize - * @return error code: 0 for success + * @param comm Communicator. + * @param local Local range for array: sub-range of local_ext. + * @param local_ext Extended range, i.e. range over which array is defined. + * @param array Array to synchronize. + * @return error code: 0 for success. */ int gkyl_comm_array_sync(struct gkyl_comm *comm, const struct gkyl_range *local, @@ -132,13 +132,13 @@ int gkyl_comm_array_sync(struct gkyl_comm *comm, /** * Synchronize array across domain in periodic directions. * - * @param comm Communicator - * @param local Local range for array: sub-range of local_ext - * @param local_ext Extended range, i.e. range over which array is defined - * @param nper_dirs Number of periodic directions - * @param per_dirs Directions that are periodic - * @param array Array to synchronize - * @return error code: 0 for success + * @param comm Communicator. + * @param local Local range for array: sub-range of local_ext. + * @param local_ext Extended range, i.e. range over which array is defined. + * @param nper_dirs Number of periodic directions. + * @param per_dirs Directions that are periodic. + * @param array Array to synchronize. + * @return error code: 0 for success. */ int gkyl_comm_array_per_sync(struct gkyl_comm *comm, const struct gkyl_range *local, @@ -149,8 +149,8 @@ int gkyl_comm_array_per_sync(struct gkyl_comm *comm, /** * Barrier across domains * - * @param comm Communcator - * @return error code: 0 for success + * @param comm Communicator. + * @return error code: 0 for success. */ int gkyl_comm_barrier(struct gkyl_comm *comm); @@ -158,7 +158,7 @@ int gkyl_comm_barrier(struct gkyl_comm *comm); /** * Start and end a group call * - * @param comm Communcator + * @param comm Communicator. */ void gkyl_comm_group_call_start(struct gkyl_comm *comm); void gkyl_comm_group_call_end(struct gkyl_comm *comm); @@ -169,9 +169,9 @@ void gkyl_comm_group_call_end(struct gkyl_comm *comm); * communicator is extended by a tensor-product with erange). The * returned communicator must be freed by calling gkyl_comm_release. * - * @param comm Communicator - * @param erange Range to extend by - * @return Newly created communicator + * @param comm Communicator. + * @param erange Range to extend by. + * @return Newly created communicator. */ struct gkyl_comm* gkyl_comm_extend_comm(const struct gkyl_comm *comm, const struct gkyl_range *erange); @@ -183,8 +183,8 @@ struct gkyl_comm* gkyl_comm_extend_comm(const struct gkyl_comm *comm, * * @param comm Communicator. * @param color All ranks of same color will share a communicator. - * @param new_decomp Decomp object to associate new communicator. Can be NULL - * @return Newly created communicator + * @param new_decomp Decomp object to associate new communicator. Can be NULL. + * @return Newly created communicator. */ struct gkyl_comm* gkyl_comm_split_comm(const struct gkyl_comm *comm, int color, struct gkyl_rect_decomp *new_decomp); @@ -196,11 +196,11 @@ struct gkyl_comm* gkyl_comm_split_comm(const struct gkyl_comm *comm, int color, * set to false. * * @param comm Communicator. - * @param nrank Number of ranks to include - * @param ranks List of ranks to include - * @param new_decomp Decomp object to associate new communicator. Can be NULL - * @param is_valid On output, true if comm is usable, false otherwise - * @return Newly created communicator + * @param nrank Number of ranks to include. + * @param ranks List of ranks to include. + * @param new_decomp Decomp object to associate new communicator. Can be NULL. + * @param is_valid On output, true if comm is usable, false otherwise. + * @return Newly created communicator. */ struct gkyl_comm* gkyl_comm_create_comm_from_ranks(const struct gkyl_comm *comm, int nranks, const int *ranks, struct gkyl_rect_decomp *new_decomp, @@ -209,14 +209,14 @@ struct gkyl_comm* gkyl_comm_create_comm_from_ranks(const struct gkyl_comm *comm, /** * Acquire pointer to communicator * - * @param comm Communicator to to get acquire - * @return Acquired comm obj pointer + * @param comm Communicator to to get acquire. + * @return Acquired comm obj pointer. */ struct gkyl_comm* gkyl_comm_acquire(const struct gkyl_comm *comm); /** * Release communicator memory. * - * @param comm Communicator to release + * @param comm Communicator to release. */ void gkyl_comm_release(const struct gkyl_comm *comm); diff --git a/core/zero/gkyl_cudss_ops.h b/core/zero/gkyl_cudss_ops.h index a898ac052f..239457be02 100644 --- a/core/zero/gkyl_cudss_ops.h +++ b/core/zero/gkyl_cudss_ops.h @@ -32,6 +32,24 @@ struct gkyl_culinsolver_prob* gkyl_culinsolver_prob_new(int nprob, int mrow, int */ void gkyl_culinsolver_amat_from_triples(struct gkyl_culinsolver_prob *prob, struct gkyl_mat_triples **tri); +/** + * Update the cuDSS matrix A in Ax=B problem using an array of values (on the device). + * NOTE: it assumes the sparsity pattern hasn't changed. + * + * @param prob cuDSS struct holding arrays used in problem. + * @param csr_values Array of new values in CSR format, on the device. + */ +void gkyl_culinsolver_amat_update(struct gkyl_culinsolver_prob *prob, double *csr_values); + +/** + * Update the cuDSS matrix A in Ax=B problem using values from a list of triples. + * NOTE: it assumes the sparsity pattern hasn't changed. + * + * @param prob cuDSS struct holding arrays used in problem. + * @param tri (array of) coordinates & values of non-zero entries in A matrix (triplets). + */ +void gkyl_culinsolver_amat_update_from_triples(struct gkyl_culinsolver_prob *prob, struct gkyl_mat_triples **tri); + /** * Initialize right-hand-side cuDSS matrix B in Ax=B problem from a list of * triples. @@ -70,6 +88,14 @@ void gkyl_culinsolver_sync(struct gkyl_culinsolver_prob *prob); */ void gkyl_culinsolver_clear_rhs(struct gkyl_culinsolver_prob *prob, double val); +/** + * Clear the array holding (in CSR format) the nonzero values for the LHS matrix. + * + * @param prob cuDSS struct holding arrays used in problem. + * @param val value to set entries of the CSR values array to. + */ +void gkyl_culinsolver_clear_csr_values(struct gkyl_culinsolver_prob *prob, double val); + /** * Get a pointer to the element of the RHS vector at a given location. * @@ -93,11 +119,22 @@ double* gkyl_culinsolver_get_sol_ptr(struct gkyl_culinsolver_prob *prob, long lo /** * Obtain the RHS value at location loc (a linear index into the RHS matrix). * - * @param linear index into the RHS flattened array for the desired value. + * @param prob cuDSS struct holding arrays used in problem. + * @param loc linear index into the RHS flattened array for the desired value. * @return RHS value. */ double gkyl_culinsolver_get_sol_lin(struct gkyl_culinsolver_prob *prob, long loc); +/** + * Obtain the a pointer to the array where LHS matrix values at packed in CSR format, + * with the pointer offset by @ loc. + * + * @param prob cuDSS struct holding arrays used in problem. + * @param loc linear index into the csr_val array. + * @return RHS value. + */ +double* gkyl_culinsolver_get_csr_values_ptr(struct gkyl_culinsolver_prob *prob, long loc); + /** * Release cuDSS problem * diff --git a/core/zero/gkyl_elem_type.h b/core/zero/gkyl_elem_type.h index e423a8bc88..001adedadc 100644 --- a/core/zero/gkyl_elem_type.h +++ b/core/zero/gkyl_elem_type.h @@ -4,7 +4,7 @@ #include // Type of element stored in array -enum gkyl_elem_type { GKYL_INT, GKYL_INT_64, GKYL_FLOAT, GKYL_DOUBLE, GKYL_USER }; +enum gkyl_elem_type { GKYL_INT, GKYL_FLOAT, GKYL_DOUBLE, GKYL_INT_64, GKYL_LONG, GKYL_USER }; // Array reduce operators enum gkyl_array_op { GKYL_MIN, GKYL_MAX, GKYL_SUM }; diff --git a/core/zero/gkyl_elem_type_priv.h b/core/zero/gkyl_elem_type_priv.h index 836ef6d9da..be51d610ec 100644 --- a/core/zero/gkyl_elem_type_priv.h +++ b/core/zero/gkyl_elem_type_priv.h @@ -5,11 +5,12 @@ // code for array datatype for use in IO static const uint64_t gkyl_array_data_type[] = { - [GKYL_INT] = 0, - [GKYL_FLOAT] = 1, + [GKYL_INT] = 0, + [GKYL_FLOAT] = 1, [GKYL_DOUBLE] = 2, [GKYL_INT_64] = 3, - [GKYL_USER] = 32, + [GKYL_LONG] = 4, + [GKYL_USER] = 32, }; // mapping of code to datatype: MUST be consistent with the @@ -19,6 +20,7 @@ static const int gkyl_array_code_to_data_type[] = { [1] = GKYL_FLOAT, [2] = GKYL_DOUBLE, [3] = GKYL_INT_64, + [4] = GKYL_LONG, [32] = GKYL_USER }; @@ -28,6 +30,7 @@ static const size_t gkyl_elem_type_size[] = { [GKYL_FLOAT] = sizeof(float), [GKYL_DOUBLE] = sizeof(double), [GKYL_INT_64] = sizeof(int64_t), + [GKYL_LONG] = sizeof(long), [GKYL_USER] = 1, }; diff --git a/core/zero/gkyl_superlu_ops.h b/core/zero/gkyl_superlu_ops.h index deaf3b98d0..c69cbb2f97 100644 --- a/core/zero/gkyl_superlu_ops.h +++ b/core/zero/gkyl_superlu_ops.h @@ -65,6 +65,15 @@ void gkyl_superlu_brhs_from_array(struct gkyl_superlu_prob *prob, const double * */ void gkyl_superlu_solve(struct gkyl_superlu_prob *prob); +/** + * Update the values of the left-hand-side SuperLU matrix A in Ax=B problem from a list of + * triples. Assumes the sparsity pattern didn't change. + * + * @param prob SuperLu struct holding arrays used in problem. + * @param tri coordinates & values of non-zero entries in A matrix (triplets). + */ +void gkyl_superlu_amat_update_from_triples(struct gkyl_superlu_prob *prob, struct gkyl_mat_triples **tri); + /** * Obtain the RHS ielement-th value of the jprob-th linear problem. * Recall the RHS is a mrow x nrhs matrix. diff --git a/core/zero/superlu_ops.c b/core/zero/superlu_ops.c index 98d543653c..7718e229d1 100644 --- a/core/zero/superlu_ops.c +++ b/core/zero/superlu_ops.c @@ -23,8 +23,17 @@ struct gkyl_superlu_prob { superlu_options_t options; SuperLUStat_t stat; trans_t trans; - GlobalLU_t Glu; - bool assigned_rhs; + GlobalLU_t *Glu; + // Arguments needed by the expert driver. + double *R, *C; + char equed; + int *etree; + double rpg, rcond; + mem_usage_t mem_usage; + double *ferr, *berr; + void **work; + int_t *lwork; + bool LU_in_work; }; gkyl_superlu_prob* @@ -56,6 +65,8 @@ gkyl_superlu_prob_new(int nprob, int mrow, int ncol, int nrhs) for (size_t k=0; knprob; k++) prob->perm_r[k] = intMalloc(mrow); + prob->Glu = gkyl_malloc(prob->nprob*sizeof(GlobalLU_t)); + // Set the default input options. set_default_options(&prob->options); prob->options.ColPerm = NATURAL; @@ -65,7 +76,34 @@ gkyl_superlu_prob_new(int nprob, int mrow, int ncol, int nrhs) prob->trans = NOTRANS; - prob->assigned_rhs = false; + // Create the RHS matrix B, with random data for now. + for (size_t k=0; krhs[k] = 1.0; + + for (size_t k=0; knprob; k++) + dCreate_Dense_Matrix(prob->B[k], prob->mrow, prob->nrhs, &prob->rhs[k*prob->mrow], prob->mrow, + SLU_DN, SLU_D, SLU_GE); + + // Arguments needed by the expert driver. + prob->equed = 'N'; + if ( !(prob->etree = intMalloc(ncol)) ) + ABORT("superlu_ops: Malloc fails for etree[]."); + if ( !(prob->R = (double *) SUPERLU_MALLOC(mrow * sizeof(double))) ) + ABORT("superlu_ops: Malloc fails for R[]."); + if ( !(prob->C = (double *) SUPERLU_MALLOC(ncol * sizeof(double))) ) + ABORT("superlu_ops: Malloc fails for C[]."); + if ( !(prob->ferr = (double *) SUPERLU_MALLOC(nrhs * sizeof(double))) ) + ABORT("superlu_ops: Malloc fails for ferr[]."); + if ( !(prob->berr = (double *) SUPERLU_MALLOC(nrhs * sizeof(double))) ) + ABORT("superlu_ops: Malloc fails for berr[]."); + + prob->LU_in_work = false; + prob->work = gkyl_malloc(prob->nprob*sizeof(void *)); + prob->lwork = gkyl_malloc(prob->nprob*sizeof(int)); + for (size_t k=0; knprob; k++) { + prob->work[k] = 0; + prob->lwork[k] = 0; + } return prob; } @@ -159,13 +197,13 @@ gkyl_superlu_ludecomp(struct gkyl_superlu_prob *prob) int panel_size = sp_ienv(1); int relax = sp_ienv(2); dgstrf(&prob->options, &AC, relax, panel_size, etree, NULL, 0, prob->perm_c, - prob->perm_r[0], prob->L[0], prob->U[0], &prob->Glu, &prob->stat, &prob->info); + prob->perm_r[0], prob->L[0], prob->U[0], &prob->Glu[0], &prob->stat, &prob->info); prob->options.Fact = prob->nprob==1? FACTORED : SamePattern; // LU decomp done. for (size_t k=1; knprob; k++) { dgstrf(&prob->options, &AC, relax, panel_size, etree, NULL, 0, prob->perm_c, - prob->perm_r[k], prob->L[k], prob->U[k], &prob->Glu, &prob->stat, &prob->info); + prob->perm_r[k], prob->L[k], prob->U[k], &prob->Glu[k], &prob->stat, &prob->info); } SUPERLU_FREE(etree); @@ -179,33 +217,63 @@ gkyl_superlu_brhs_from_triples(struct gkyl_superlu_prob *prob, struct gkyl_mat_t // sorted (column-major order) keys (linear indices to flattened matrix) gkyl_mat_triples_iter *iter = gkyl_mat_triples_iter_new(tri); - for (size_t i=0; irhs[i] = mt.val; + for (size_t k=0; knprob; k++) { + double *B_curr = (double*)((DNformat*)prob->B[k]->Store)->nzval; + for (size_t i=0; imrow*prob->nrhs; i++) { + gkyl_mat_triples_iter_next(iter); // bump iterator + struct gkyl_mtriple mt = gkyl_mat_triples_iter_at(iter); + B_curr[i] = mt.val; + } } gkyl_mat_triples_iter_release(iter); - - // Create RHS matrix B. See SuperLU manual for definitions. - for (size_t k=0; knprob; k++) - dCreate_Dense_Matrix(prob->B[k], prob->mrow, prob->nrhs, &prob->rhs[k*prob->mrow], prob->mrow, - SLU_DN, SLU_D, SLU_GE); - - prob->assigned_rhs = true; } void gkyl_superlu_brhs_from_array(struct gkyl_superlu_prob *prob, const double *bin) { - for (size_t i=0; imrow*GKYL_MAX2(prob->nprob,prob->nrhs); i++) - prob->rhs[i] = bin[i]; - - // Create RHS matrix B. See SuperLU manual for definitions. - for (size_t k=0; knprob; k++) - dCreate_Dense_Matrix(prob->B[k], prob->mrow, prob->nrhs, &prob->rhs[k*prob->mrow], prob->mrow, - SLU_DN, SLU_D, SLU_GE); + for (size_t k=0; knprob; k++) { + double *B_curr = (double*)((DNformat*)prob->B[k]->Store)->nzval; + for (size_t i=0; imrow*prob->nrhs; i++) + B_curr[i] = bin[k*prob->mrow*prob->nrhs+i]; + } +} + +static void +superlu_alloc_work_if_needed(struct gkyl_superlu_prob *prob, int k) +{ + // MF 2026/03/19: Function generated by Opus, provided by @junoravin. + // It doesn't quite match some things I see in the SuperLU source code, but it works and is valgrind free. + // I also tried calling dgssvx with lwork=-1 to get the right size, but that also produced estimates lower + // than neeed, and even if I increase them by 8X, it is not valgrind clean. - prob->assigned_rhs = true; + if (prob->lwork[k] > 0) return; // Already allocated. + + // Compute work buffer size matching what dLUMemInit + dLUWorkInit need. + // The buffer holds factor data (HEAD), and temporary workspace (TAIL). + int panel_size = sp_ienv(1); + int maxsuper = SUPERLU_MAX(sp_ienv(3), sp_ienv(7)); + int rowblk = sp_ienv(4); + int_t fill_ratio = sp_ienv(6); + int iword = sizeof(int); + int dword = sizeof(double); + int m = prob->mrow, n = prob->ncol; + int_t nzmax = fill_ratio * prob->nnz; + + // HEAD: GlobalLU integer arrays (xsup, supno, xlsub, xlusup, xusub). + int_t glu_int_arrays = 5 * (n + 1) * iword; + // HEAD: factor data (lusup, ucol as doubles; lsub, usub as ints). + int_t factor_storage = (nzmax + nzmax) * iword + (nzmax + nzmax) * dword; + // TAIL: iwork. + int_t isize = (2 * panel_size + 2 + 3) * m * iword; + // TAIL: dwork (includes NUM_TEMPV which depends on maxsuper and rowblk). + int_t num_tempv = SUPERLU_MAX(m, (maxsuper + rowblk) * panel_size); + int_t dsize = (m * panel_size + num_tempv) * dword; + + // 1.5x margin to accommodate fill-in growth (matches SuperLU's internal + // expansion factor) and alignment overhead in USER memory mode. + prob->lwork[k] = (int_t)(1.5 * (glu_int_arrays + factor_storage + isize + dsize)); + if ( !(prob->work[k] = SUPERLU_MALLOC(prob->lwork[k])) ) + ABORT("superlu_ops: Malloc fails for work[]."); } void @@ -215,24 +283,59 @@ gkyl_superlu_solve(struct gkyl_superlu_prob *prob) for (size_t k=0; knprob; k++) dgstrs(prob->trans, prob->L[k], prob->U[k], prob->perm_c, prob->perm_r[k], prob->B[k], &prob->stat, &prob->info); } else { - dgssv(&prob->options, prob->A[0], prob->perm_c, prob->perm_r[0], prob->L[0], prob->U[0], - prob->B[0], &prob->stat, &prob->info); + if (prob->options.Fact == SamePattern) { + for (size_t k=0; knprob; k++) { + Destroy_SuperMatrix_Store(prob->L[k]); + Destroy_SuperMatrix_Store(prob->U[k]); + } + } + + superlu_alloc_work_if_needed(prob, 0); + + dgssvx(&prob->options, prob->A[0], prob->perm_c, prob->perm_r[0], prob->etree, &prob->equed, prob->R, prob->C, + prob->L[0], prob->U[0], prob->work[0], prob->lwork[0], prob->B[0], prob->B[0], &prob->rpg, &prob->rcond, + prob->ferr, prob->berr, &prob->Glu[0], &prob->mem_usage, &prob->stat, &prob->info); + + prob->options.Fact = prob->nprob==1? FACTORED : SamePattern; // LU decomp done. -// MF 2023/05/25: My intention was to re-use the column permutation vector perm_c by -// using SamePattern. But for some reason it errors out. -// prob->options.Fact = prob->nprob==1? FACTORED : SamePattern; // LU decomp done. + for (size_t k=1; knprob; k++) { + superlu_alloc_work_if_needed(prob, k); - for (size_t k=1; knprob; k++) - dgssv(&prob->options, prob->A[k], prob->perm_c, prob->perm_r[k], prob->L[k], prob->U[k], - prob->B[k], &prob->stat, &prob->info); + dgssvx(&prob->options, prob->A[k], prob->perm_c, prob->perm_r[k], prob->etree, &prob->equed, prob->R, prob->C, + prob->L[k], prob->U[k], prob->work[k], prob->lwork[k], prob->B[k], prob->B[k], &prob->rpg, &prob->rcond, + prob->ferr, prob->berr, &prob->Glu[k], &prob->mem_usage, &prob->stat, &prob->info); + } + prob->LU_in_work = true; prob->options.Fact = FACTORED; // LU decomp done. } +} +void +gkyl_superlu_amat_update_from_triples(struct gkyl_superlu_prob *prob, struct gkyl_mat_triples **tri) +{ for (size_t k=0; knprob; k++) { - if (prob->assigned_rhs) - Destroy_SuperMatrix_Store(prob->B[k]); + assert(gkyl_mat_triples_size(tri[k]) == prob->nnz); // No. of nonzeros must be the same for every problem. + assert(gkyl_mat_triples_is_colmaj(tri[k])); // triples must be in colmaj order for superlu. } + + // Sorted (column-major order) keys (linear indices to flattened matrix). + for (size_t k=0; knprob; k++) { + + double *nzval = (double*)((NCformat*)prob->A[k]->Store)->nzval; + + gkyl_mat_triples_iter *iter = gkyl_mat_triples_iter_new(tri[k]); + for (size_t i=0; innz; ++i) { + gkyl_mat_triples_iter_next(iter); // bump iterator. + struct gkyl_mtriple mt = gkyl_mat_triples_iter_at(iter); + size_t idx[2] = { mt.row, mt.col }; + + nzval[i] = mt.val; + } + gkyl_mat_triples_iter_release(iter); + } + + prob->options.Fact = SamePattern; } double @@ -257,24 +360,47 @@ gkyl_superlu_get_rhs_ptr(struct gkyl_superlu_prob *prob, long loc) void gkyl_superlu_prob_release(struct gkyl_superlu_prob *prob) { - SUPERLU_FREE (prob->rhs); - SUPERLU_FREE (prob->perm_c); + SUPERLU_FREE(prob->rhs); + SUPERLU_FREE(prob->perm_c); + // Free objects needed for the expert driver. + SUPERLU_FREE(prob->etree); + SUPERLU_FREE(prob->R); + SUPERLU_FREE(prob->C); + SUPERLU_FREE(prob->ferr); + SUPERLU_FREE(prob->berr); + for (size_t k=0; knprob; k++) { - SUPERLU_FREE (prob->perm_r[k]); + SUPERLU_FREE(prob->perm_r[k]); Destroy_CompCol_Matrix(prob->A[k]); + Destroy_SuperMatrix_Store(prob->B[k]); gkyl_free(prob->A[k]); + gkyl_free(prob->B[k]); if (prob->options.Fact==FACTORED) { - Destroy_SuperNode_Matrix(prob->L[k]); - Destroy_CompCol_Matrix(prob->U[k]); + if (prob->LU_in_work) { + Destroy_SuperMatrix_Store(prob->L[k]); + Destroy_SuperMatrix_Store(prob->U[k]); + } + else { + Destroy_SuperNode_Matrix(prob->L[k]); + Destroy_CompCol_Matrix(prob->U[k]); + } } - gkyl_free(prob->B[k]); gkyl_free(prob->L[k]); gkyl_free(prob->U[k]); } + + for (size_t k=0; knprob; k++) { + if (prob->work[k]) + SUPERLU_FREE(prob->work[k]); + } + gkyl_free(prob->work); + gkyl_free(prob->lwork); + StatFree(&prob->stat); + gkyl_free(prob->Glu); gkyl_free(prob->A); gkyl_free(prob->B); gkyl_free(prob->L); diff --git a/gyrokinetic/apps/gk_field.c b/gyrokinetic/apps/gk_field.c index 31d064b935..5096e24fd8 100644 --- a/gyrokinetic/apps/gk_field.c +++ b/gyrokinetic/apps/gk_field.c @@ -13,7 +13,6 @@ #include // Functions related to setting the potential by adjusting the polarization density - static void eval_on_nodes_c2p_position_func(const double *xcomp, double *xphys, void *ctx) { @@ -210,13 +209,6 @@ gk_field_energy_release(const struct gkyl_gyrokinetic_app *app, struct gk_field gkyl_array_release(f->es_energy_fac); } -// Related to enforcing parallel Vlasov boundary conditions -void -gk_field_enforce_parallel_bc_disabled(const gkyl_gyrokinetic_app *app, struct gk_field *field, struct gkyl_array *finout) -{ - // Do nothing. -} - // Initialize field object. struct gk_field* gk_field_new(struct gkyl_gk *gk, struct gkyl_gyrokinetic_app *app) @@ -283,7 +275,8 @@ gk_field_calc_energy_dt(gkyl_gyrokinetic_app *app, const struct gk_field *field, field->calc_energy_dt_func(app, field, dt, energy_reduced); } -void gk_field_accumulate_rho_c_adiabatic(gkyl_gyrokinetic_app *app, struct gk_field *field, struct gk_species *s, struct gkyl_array **bflux) +void gk_field_accumulate_rho_c_adiabatic(gkyl_gyrokinetic_app *app, struct gk_field *field, + struct gk_species *s, struct gkyl_array **bflux) { // Gyroaverage the density if needed. s->gyroaverage(app, s, s->m0.marr, s->m0_gyroavg); @@ -291,11 +284,12 @@ void gk_field_accumulate_rho_c_adiabatic(gkyl_gyrokinetic_app *app, struct gk_fi // Add the background (electron) charge density. double n_s0 = field->info.electron_density; double q_s = field->info.electron_charge; - double dg_norm = pow(sqrt(2), app->basis.ndim); + double dg_norm = pow(sqrt(2.0), app->basis.ndim); gkyl_array_shiftc_range(field->rho_c, q_s * n_s0 * dg_norm, 0, &app->local); } -void gk_field_accumulate_rho_c_poisson(gkyl_gyrokinetic_app *app, struct gk_field *field, struct gk_species *s, struct gkyl_array **bflux) +void gk_field_accumulate_rho_c_poisson(gkyl_gyrokinetic_app *app, + struct gk_field *field, struct gk_species *s, struct gkyl_array **bflux) { // Gyroaverage the density if needed. s->gyroaverage(app, s, s->m0.marr, s->m0_gyroavg); @@ -406,7 +400,7 @@ gk_field_release(const gkyl_gyrokinetic_app* app, struct gk_field *f) } // Release solver-specific resources. - f->solver_release_func(app, f); + f->release_func(app, f); // Release energy diagnostics. gk_field_energy_release(app, f); diff --git a/gyrokinetic/apps/gk_field_1x.c b/gyrokinetic/apps/gk_field_1x.c index d6091d1463..f1f4256a9b 100644 --- a/gyrokinetic/apps/gk_field_1x.c +++ b/gyrokinetic/apps/gk_field_1x.c @@ -149,9 +149,7 @@ gk_field_fem_new_1x(struct gkyl_gyrokinetic_app *app, struct gk_field *f) f->use_flr = f->use_flr || s->info.flr.type; } - f->enforce_parallel_bc_func = gk_field_enforce_parallel_bc_disabled; - gkyl_array_release(epsilon_global); - f->solver_release_func = gk_field_fem_release_1x; -} \ No newline at end of file + f->release_func = gk_field_fem_release_1x; +} diff --git a/gyrokinetic/apps/gk_field_2x3x.c b/gyrokinetic/apps/gk_field_2x3x.c index 9e17f2cf54..a13190939f 100644 --- a/gyrokinetic/apps/gk_field_2x3x.c +++ b/gyrokinetic/apps/gk_field_2x3x.c @@ -13,7 +13,7 @@ #include static void -gk_field_2x3x_write_twistshift(struct gkyl_gyrokinetic_app *app, struct gk_field *f) +gk_field_3x_write_twistshift(struct gkyl_gyrokinetic_app *app, struct gk_field *f) { // Write the discretized shift (for TS BCs) to file. int comm_rank, comm_size; @@ -82,32 +82,106 @@ gk_field_2x3x_write_twistshift(struct gkyl_gyrokinetic_app *app, struct gk_field } static void -gk_field_2x3x_add_TSBC_and_SSFG_updaters(struct gkyl_gyrokinetic_app *app, struct gk_field *f) +gk_field_fem_projection_par_iwl_2x(gkyl_gyrokinetic_app *app, struct gk_field *field, struct gkyl_array *arr_dg, struct gkyl_array *arr_fem) { - // Parallel direction index (handle 2x and 3x cases). - int par_dir = app->cdim - 1; - // Take the TS function from the parallel BC of the first species. - struct gk_species *gks = &app->species[0]; - const struct gkyl_gyrokinetic_bc *par_lower_bc; - for (int i = 0; i < 2*app->cdim; i++) { - if (gks->info.bcs[i].dir == par_dir && gks->info.bcs[i].edge == GKYL_LOWER_EDGE) { - par_lower_bc = (const struct gkyl_gyrokinetic_bc *) &gks->info.bcs[i]; - break; - } + // Project a DG field onto the parallel FEM basis to make it + // continuous along z (or to solve a Poisson equation in 1x), + // using different BCs in the core and SOL. + + // Gather the DG array into a global (in z) array. + gkyl_comm_array_allgather(app->comm, &app->local, &app->global, arr_dg, field->rho_c_global_dg); + + // Apply periodicity in the core. + gkyl_array_copy_range_to_range(field->rho_c_global_dg, field->rho_c_global_dg, + &app->global_lower_ghost_par_core, &app->global_upper_skin_par_core); + gkyl_array_copy_range_to_range(field->rho_c_global_dg, field->rho_c_global_dg, + &app->global_upper_ghost_par_core, &app->global_lower_skin_par_core); + + // Smooth the the DG array. + gkyl_fem_parproj_set_rhs(field->fem_parproj_core, field->rho_c_global_dg, field->rho_c_global_dg); + gkyl_fem_parproj_solve(field->fem_parproj_core, field->phi_fem); + gkyl_fem_parproj_set_rhs(field->fem_parproj_sol, field->rho_c_global_dg, field->rho_c_global_dg); + gkyl_fem_parproj_solve(field->fem_parproj_sol, field->phi_fem); + + // Copy global, continuous FEM array to a local array. + gkyl_array_copy_range_to_range(arr_fem, field->phi_fem, &app->local, &field->global_sub_range); +} + +static void +gk_field_fem_projection_par_iwl_3x(gkyl_gyrokinetic_app *app, struct gk_field *field, struct gkyl_array *arr_dg, struct gkyl_array *arr_fem) +{ + // Project a DG field onto the parallel FEM basis to make it + // continuous along z (or to solve a Poisson equation in 1x), + // using different BCs in the core and SOL. + + // Gather the DG array into a global (in z) array. + gkyl_comm_array_allgather(app->comm, &app->local, &app->global, arr_dg, field->rho_c_global_dg); + + // Apply TS BC in the core lower parallel boundary, and + // fill core upper parallel boundary ghost with skin boundary value. + gkyl_array_copy_range_to_range(field->rho_c_global_dg, field->rho_c_global_dg, + &app->global_lower_ghost_par_core, &app->global_upper_skin_par_core); + gkyl_bc_twistshift_advance(field->bc_ts_lo, field->rho_c_global_dg, field->rho_c_global_dg); + gkyl_bc_basic_gyrokinetic_advance(field->gfss_bc_op_core_up, field->bc_buffer, field->rho_c_global_dg); + + // Smooth the the DG array. + gkyl_fem_parproj_set_rhs(field->fem_parproj_core, field->rho_c_global_dg, field->rho_c_global_dg); + gkyl_fem_parproj_solve(field->fem_parproj_core, field->phi_fem); + gkyl_fem_parproj_set_rhs(field->fem_parproj_sol, field->rho_c_global_dg, field->rho_c_global_dg); + gkyl_fem_parproj_solve(field->fem_parproj_sol, field->phi_fem); + + // Copy global, continuous FEM array to a local array. + gkyl_array_copy_range_to_range(arr_fem, field->phi_fem, &app->local, &field->global_sub_range); +} + +static void +gk_field_2x3x_add_IWL_updaters(struct gkyl_gyrokinetic_app *app, struct gk_field *f) +{ + // Allocation ranges and updaters for IWL field solve. + + // Parallel smoother. + enum gkyl_fem_parproj_bc_type fem_parproj_bc_core = GKYL_FEM_PARPROJ_DIRICHLET_GHOST; + enum gkyl_fem_parproj_bc_type fem_parproj_bc_sol = GKYL_FEM_PARPROJ_DIRICHLET_SKIN; + f->fem_parproj_core = gkyl_fem_parproj_new(&app->global_core, &app->basis, + fem_parproj_bc_core, 0, 0, app->use_gpu); + f->fem_parproj_sol = gkyl_fem_parproj_new(&app->global_sol, &app->basis, + fem_parproj_bc_sol, 0, 0, app->use_gpu); + + int par_dir = app->cdim-1; // Parallel direction index. + if (app->cdim == 2) { + f->fem_projection_par_rho_func = gk_field_fem_projection_par_iwl_2x; + f->fem_projection_par_phi_func = gk_field_fem_projection_par_iwl_2x; } + else if (app->cdim == 3) { + f->fem_projection_par_phi_func = gk_field_fem_projection_par_iwl_3x; + + // Take the TS function from the parallel BC of the first species. + struct gk_species *gks = &app->species[0]; + const struct gkyl_gyrokinetic_bc *par_lower_bc; + for (int i = 0; i < 2*app->cdim; i++) { + if (gks->info.bcs[i].dir == par_dir && gks->info.bcs[i].edge == GKYL_LOWER_EDGE) { + par_lower_bc = (const struct gkyl_gyrokinetic_bc *) &gks->info.bcs[i]; + break; + } + } + for (int i = 0; i < 2*app->cdim; i++) { + if ( gks->info.bcs[i].dir == par_dir && gks->info.bcs[i].type == GKYL_BC_GK_SPECIES_IWL) { + if (gks->info.bcs[i].edge == GKYL_LOWER_EDGE) { + par_lower_bc = (const struct gkyl_gyrokinetic_bc *) &gks->info.bcs[i]; + break; + } + } + } - // TSBC updaters - int ghost[] = {1, 1, 1}; - if (app->cdim == 3) { - // TS BC updater for up to low TS for the lower edge - // this sets ghost_L = T_LU(ghost_L) - struct gkyl_bc_twistshift_inp ts_lo = { + // TS BC updater for up to low TS for the lower edge. This sets ghost_L = T_LU(ghost_L). + int ghost[] = {1, 1, 1}; + struct gkyl_bc_twistshift_inp T_LU_lo = { .bc_dir = par_dir, .shift_dir = 1, // y shift. .shear_dir = 0, // shift varies with x. .edge = GKYL_LOWER_EDGE, .cdim = app->cdim, - .bcdir_ext_update_r = app->local_par_ext_core, + .bcdir_ext_update_r = app->global_par_ext_core, .num_ghost = ghost, // one ghost per config direction .basis = app->basis, .grid = app->grid, @@ -115,83 +189,35 @@ gk_field_2x3x_add_TSBC_and_SSFG_updaters(struct gkyl_gyrokinetic_app *app, struc .shift_func_ctx = par_lower_bc->aux_ctx, .use_gpu = app->use_gpu, }; - // Add the forward TS updater to f - f->bc_ts_lo = gkyl_bc_twistshift_new(&ts_lo); - } + f->bc_ts_lo = gkyl_bc_twistshift_new(&T_LU_lo); - // Add the SSFG updater for lower and upper application. - f->ssfg_z_lo = gkyl_skin_surf_from_ghost_new(par_dir, GKYL_LOWER_EDGE, - app->basis, &app->lower_skin_par_core, &app->lower_ghost_par_core, app->use_gpu); + long buff_sz = GKYL_MAX2(app->global_lower_ghost_par_sol.volume, app->global_lower_ghost_par_core.volume); + f->bc_buffer = mkarr(app->use_gpu, app->basis.num_basis, buff_sz); - // Write the discrete shift to file. - if (app->cdim == 3) - gk_field_2x3x_write_twistshift(app, f); -} + f->gfss_bc_op_core_up = gkyl_bc_basic_gyrokinetic_new(par_dir, GKYL_UPPER_EDGE, GKYL_BC_GK_FIELD_BOUNDARY_VALUE, + app->basis_on_dev, &app->global_upper_skin_par_core, &app->global_upper_ghost_par_core, + app->basis.num_basis, app->cdim, app->use_gpu); -static void -gk_field_enforce_parallel_bc_enabled(const gkyl_gyrokinetic_app *app, struct gk_field *field, struct gkyl_array *finout) -{ - // Apply the periodicity along the field to fill ghost cells. - int num_periodic_dir = 1; - int par_dir = app->cdim - 1; - int periodic_dirs[] = {par_dir}; - gkyl_comm_array_per_sync(app->comm, &app->local, &app->local_ext, - num_periodic_dir, periodic_dirs, finout); - - // Update the lower z ghosts with twist-and-shift if we are in 3x2v - if (app->cdim == 3) { - gkyl_bc_twistshift_advance(field->bc_ts_lo, finout, finout); + // Write the discrete shift to file. + gk_field_3x_write_twistshift(app, f); } - - // Sync ghost cells between MPI processes. - gkyl_comm_array_sync(app->comm, &app->local, &app->local_ext, finout); - - // Force the lower skin surface value to match the ghost cell at the node position. - gkyl_skin_surf_from_ghost_advance(field->ssfg_z_lo, finout); } static void gk_field_rhs_poisson_perp_2x3x(struct gkyl_gyrokinetic_app *app, struct gk_field *field) { // Smooth the charge density along z. - gk_field_fem_projection_par(app, field, field->rho_c, field->rho_c); + field->fem_projection_par_rho_func(app, field, field->rho_c, field->rho_c); // Solve the Poisson equation. gkyl_fem_poisson_perp_set_rhs(field->fem_poisson_perp, field->rho_c); gkyl_fem_poisson_perp_solve(field->fem_poisson_perp, field->phi_smooth); // Smooth the potential along z. - gk_field_fem_projection_par(app, field, field->phi_smooth, field->phi_smooth); - - // Finish the Poisson solve with FLR effects. - field->invert_flr(app, field, field->phi_smooth); - - // Enforce a BC of the field in the parallel direction. - field->enforce_parallel_bc_func(app, field, field->phi_smooth); -} - -static void -gk_field_rhs_deflate_poisson_es_iwl(struct gkyl_gyrokinetic_app *app, struct gk_field *field) -{ - // Gather charge density into global array. - gkyl_comm_array_allgather(app->comm, &app->local, &app->global, field->rho_c, field->rho_c_global_dg); - - // Smooth the charge density. Input is rho_c_global_dg, globally smoothed in z, - // and then output should be in *local* phi_smooth. - gkyl_fem_parproj_set_rhs(field->fem_parproj_core, field->rho_c_global_dg, field->rho_c_global_dg); - gkyl_fem_parproj_solve(field->fem_parproj_core, field->rho_c_global_smooth); - gkyl_fem_parproj_set_rhs(field->fem_parproj_sol, field->rho_c_global_dg, field->rho_c_global_dg); - gkyl_fem_parproj_solve(field->fem_parproj_sol, field->rho_c_global_smooth); - - // Solve the Poisson equation. - gkyl_deflated_fem_poisson_advance(field->fem_poisson_deflated, field->rho_c_global_smooth, - field->phi_bc, field->phi_smooth); + field->fem_projection_par_phi_func(app, field, field->phi_smooth, field->phi_smooth); // Finish the Poisson solve with FLR effects. field->invert_flr(app, field, field->phi_smooth); - - // Enforce a BC of the field in the parallel direction. - field->enforce_parallel_bc_func(app, field, field->phi_smooth); } static void @@ -214,27 +240,25 @@ gk_field_fem_release_2x3x(const gkyl_gyrokinetic_app *app, struct gk_field *f) gkyl_array_release(f->epsilon); - gkyl_deflated_fem_poisson_release(f->fem_poisson_deflated); gkyl_fem_poisson_perp_release(f->fem_poisson_perp); if (f->is_dirichletvar) { gkyl_array_release(f->phi_bc); } - if (f->gkfield_id == GKYL_GK_FIELD_ES_IWL) { - gkyl_fem_parproj_release(f->fem_parproj_core); - gkyl_fem_parproj_release(f->fem_parproj_sol); - } else { - gkyl_fem_parproj_release(f->fem_parproj); - } + gkyl_fem_parproj_release(f->fem_parproj); gkyl_array_integrate_release(f->calc_em_energy); - // Release TS BC and SSFG updater + // Release IWL updaters. if (f->gkfield_id == GKYL_GK_FIELD_ES_IWL) { + gkyl_fem_parproj_release(f->fem_parproj_core); + gkyl_fem_parproj_release(f->fem_parproj_sol); + if (app->cdim == 3) { gkyl_bc_twistshift_release(f->bc_ts_lo); + gkyl_bc_basic_gyrokinetic_release(f->gfss_bc_op_core_up); + gkyl_array_release(f->bc_buffer); } - gkyl_skin_surf_from_ghost_release(f->ssfg_z_lo); } if (f->use_flr) { @@ -291,15 +315,14 @@ gk_field_fem_new_2x3x(struct gkyl_gyrokinetic_app *app, struct gk_field *f) gkyl_array_set_offset(f->epsilon, polarization_weight, Jgij[i], i*app->basis.num_basis); } - // Translate input file BCs into Poisson BCs. - struct gkyl_poisson_bc poisson_bcs = { }; - bool bc_is_np[GKYL_MAX_CDIM]; // Is the BC in this direction non-periodic? for (int d=0; dcdim; ++d) bc_is_np[d] = true; for (int d=0; dnum_periodic_dir; ++d) { bc_is_np[app->periodic_dirs[d]] = false; } + // Translate input file BCs into Poisson BCs. + struct gkyl_poisson_bc poisson_bcs = { }; for (int d=0; dcdim-1; d++) { if (bc_is_np[d]) { struct gkyl_gyrokinetic_bc *bc_lo = gk_fetch_bc_with_dir_edge(f->info.poisson_bcs, 2*app->cdim, d, GKYL_LOWER_EDGE); @@ -323,17 +346,9 @@ gk_field_fem_new_2x3x(struct gkyl_gyrokinetic_app *app, struct gk_field *f) } } - // Detect if this process contains an edge in the z dimension. - // for applying bias at the extremal z planes only. - int ndim = app->grid.ndim; - poisson_bcs.contains_lower_z_edge = f->global_sub_range.lower[ndim-1] == app->global.lower[ndim-1]; - poisson_bcs.contains_upper_z_edge = f->global_sub_range.upper[ndim-1] == app->global.upper[ndim-1]; - // Initialize the Poisson solver. - f->fem_poisson_deflated = gkyl_deflated_fem_poisson_new(app->grid, app->basis_on_dev, app->basis, - app->local, f->global_sub_range, f->epsilon, 0, poisson_bcs, f->info.bias_plane_list, app->use_gpu); f->fem_poisson_perp = gkyl_fem_poisson_perp_new(&app->local, &app->grid, app->basis, - &poisson_bcs, f->epsilon, NULL, app->use_gpu); + &poisson_bcs, f->info.bias_line_list, f->epsilon, NULL, app->use_gpu); f->phi_bc = 0; f->is_dirichletvar = false; @@ -354,7 +369,7 @@ gk_field_fem_new_2x3x(struct gkyl_gyrokinetic_app *app, struct gk_field *f) if (bc_lo->type == GKYL_BC_GK_FIELD_DIRICHLET_VARYING) { gkyl_eval_on_nodes *phibc_proj = gkyl_eval_on_nodes_new(&app->grid, &app->basis, 1, bc_lo->aux_profile, bc_lo->aux_ctx); - gkyl_eval_on_nodes_advance(phibc_proj, 0.0, &app->lower_skin[d], phi_bc_ho); + gkyl_eval_on_nodes_advance(phibc_proj, 0.0, &app->local_lower_skin[d], phi_bc_ho); gkyl_eval_on_nodes_release(phibc_proj); } } @@ -363,7 +378,7 @@ gk_field_fem_new_2x3x(struct gkyl_gyrokinetic_app *app, struct gk_field *f) if (bc_up->type == GKYL_BC_GK_FIELD_DIRICHLET_VARYING) { gkyl_eval_on_nodes *phibc_proj = gkyl_eval_on_nodes_new(&app->grid, &app->basis, 1, bc_up->aux_profile, bc_up->aux_ctx); - gkyl_eval_on_nodes_advance(phibc_proj, 0.0, &app->lower_skin[d], phi_bc_ho); + gkyl_eval_on_nodes_advance(phibc_proj, 0.0, &app->local_lower_skin[d], phi_bc_ho); gkyl_eval_on_nodes_release(phibc_proj); } } @@ -372,36 +387,19 @@ gk_field_fem_new_2x3x(struct gkyl_gyrokinetic_app *app, struct gk_field *f) gkyl_array_release(phi_bc_ho); } - if (f->gkfield_id == GKYL_GK_FIELD_ES_IWL) { - f->rhs_phi_func = gk_field_rhs_deflate_poisson_es_iwl; - enum gkyl_fem_parproj_bc_type fem_parproj_bc_core, fem_parproj_bc_sol; - if (app->cdim == 2) { - fem_parproj_bc_core = GKYL_FEM_PARPROJ_PERIODIC; - fem_parproj_bc_sol = GKYL_FEM_PARPROJ_NONE; - } else { - fem_parproj_bc_core = GKYL_FEM_PARPROJ_NONE; - fem_parproj_bc_sol = GKYL_FEM_PARPROJ_NONE; - } + // Potential smoothing (in z) updater + enum gkyl_fem_parproj_bc_type fem_parproj_bc = GKYL_FEM_PARPROJ_NONE; + for (int d=0; dnum_periodic_dir; ++d) + if (app->periodic_dirs[d] == app->cdim-1) fem_parproj_bc = GKYL_FEM_PARPROJ_PERIODIC; - f->fem_parproj_core = gkyl_fem_parproj_new(&app->global_core, &app->basis, - fem_parproj_bc_core, 0, 0, app->use_gpu); - f->fem_parproj_sol = gkyl_fem_parproj_new(&app->global_sol, &app->basis, - fem_parproj_bc_sol, 0, 0, app->use_gpu); - } else { - f->rhs_phi_func = gk_field_rhs_poisson_perp_2x3x; - enum gkyl_fem_parproj_bc_type fem_parproj_bc = GKYL_FEM_PARPROJ_NONE; - for (int d=0; dnum_periodic_dir; ++d) { - if (app->periodic_dirs[d] == app->cdim-1) { - fem_parproj_bc = GKYL_FEM_PARPROJ_PERIODIC; - } - } + f->fem_parproj = gkyl_fem_parproj_new(&app->global, &app->basis, + fem_parproj_bc, 0, 0, app->use_gpu); - f->fem_parproj = gkyl_fem_parproj_new(&app->global, &app->basis, - fem_parproj_bc, 0, 0, app->use_gpu); - } + f->fem_projection_par_rho_func = gk_field_fem_projection_par; + f->fem_projection_par_phi_func = gk_field_fem_projection_par; + // Updater for field energy calculation. gkyl_array_set(f->es_energy_fac, 0.5, f->epsilon); - f->calc_em_energy = gkyl_array_integrate_new(&app->grid, &app->basis, 1, GKYL_ARRAY_INTEGRATE_OP_EPS_GRADPERP_SQ, app->use_gpu); @@ -419,11 +417,13 @@ gk_field_fem_new_2x3x(struct gkyl_gyrokinetic_app *app, struct gk_field *f) } // Twist-and-shift boundary condition for phi and skin surface from ghost to impose phi periodicity at z=-pi. - f->enforce_parallel_bc_func = gk_field_enforce_parallel_bc_disabled; if (f->gkfield_id == GKYL_GK_FIELD_ES_IWL) { - gk_field_2x3x_add_TSBC_and_SSFG_updaters(app,f); - f->enforce_parallel_bc_func = gk_field_enforce_parallel_bc_enabled; + gk_field_2x3x_add_IWL_updaters(app, f); } - f->solver_release_func = gk_field_fem_release_2x3x; + // Set the pointer to the function that computes phi. + f->rhs_phi_func = gk_field_rhs_poisson_perp_2x3x; + + // Set pointer to function that releases memory. + f->release_func = gk_field_fem_release_2x3x; } diff --git a/gyrokinetic/apps/gk_field_boltzmann.c b/gyrokinetic/apps/gk_field_boltzmann.c index 6b2795d1bc..2eaa0f7934 100644 --- a/gyrokinetic/apps/gk_field_boltzmann.c +++ b/gyrokinetic/apps/gk_field_boltzmann.c @@ -23,8 +23,10 @@ static void gk_field_accumulate_rho_c_boltzmann(gkyl_gyrokinetic_app *app, struc // We also need the M0 flux of the boundary flux through the z // boundaries. Put it in the ghost cells of s->m0.marr. - gk_species_bflux_get_flux_mom(&s->bflux, app->cdim-1, GKYL_LOWER_EDGE, GKYL_F_MOMENT_M0, bflux, s->m0.marr, &app->lower_ghost[app->cdim-1]); - gk_species_bflux_get_flux_mom(&s->bflux, app->cdim-1, GKYL_UPPER_EDGE, GKYL_F_MOMENT_M0, bflux, s->m0.marr, &app->upper_ghost[app->cdim-1]); + gk_species_bflux_get_flux_mom(&s->bflux, app->cdim-1, GKYL_LOWER_EDGE, + GKYL_F_MOMENT_M0, bflux, s->m0.marr, &app->local_lower_ghost[app->cdim-1]); + gk_species_bflux_get_flux_mom(&s->bflux, app->cdim-1, GKYL_UPPER_EDGE, + GKYL_F_MOMENT_M0, bflux, s->m0.marr, &app->local_upper_ghost[app->cdim-1]); } static void @@ -45,10 +47,10 @@ gk_field_calc_ambi_pot_sheath_vals(gkyl_gyrokinetic_app *app, struct gk_field *f // NOTE: this relies on the accumulate_rho_c calling gk_species_moment_calc(s->m0) // to calculate the particle flux and place it in the ghost cells of s->m0.marr. gkyl_ambi_bolt_potential_sheath_calc(field->ambi_pot, GKYL_LOWER_EDGE, - &app->lower_skin[idx_par], &app->lower_ghost[idx_par], app->gk_geom->geo_int.cmag, + &app->local_lower_skin[idx_par], &app->local_lower_ghost[idx_par], app->gk_geom->geo_int.cmag, app->gk_geom->geo_int.jacobtot_inv, s->m0.marr, field->rho_c, s->m0.marr, field->sheath_vals[off]); gkyl_ambi_bolt_potential_sheath_calc(field->ambi_pot, GKYL_UPPER_EDGE, - &app->upper_skin[idx_par], &app->upper_ghost[idx_par], app->gk_geom->geo_int.cmag, + &app->local_upper_skin[idx_par], &app->local_upper_ghost[idx_par], app->gk_geom->geo_int.cmag, app->gk_geom->geo_int.jacobtot_inv, s->m0.marr, field->rho_c, s->m0.marr, field->sheath_vals[off+1]); // Broadcast the sheath values from skin processes to other processes. @@ -57,7 +59,7 @@ gk_field_calc_ambi_pot_sheath_vals(gkyl_gyrokinetic_app *app, struct gk_field *f // Copy upper sheath values into lower ghost & add to lower sheath values for averaging. gkyl_array_copy_range_to_range(field->sheath_vals[off+1], field->sheath_vals[off+1], - &app->lower_ghost[idx_par], &app->upper_ghost[idx_par]); + &app->local_lower_ghost[idx_par], &app->local_upper_ghost[idx_par]); gkyl_array_accumulate(field->sheath_vals[off], 1., field->sheath_vals[off+1]); gkyl_array_scale(field->sheath_vals[off], 0.5); } @@ -159,7 +161,5 @@ gk_field_fem_new_boltzmann(struct gkyl_gyrokinetic_app *app, struct gk_field *f) } } - f->enforce_parallel_bc_func = gk_field_enforce_parallel_bc_disabled; - - f->solver_release_func = gk_field_fem_release_boltzmann; -} \ No newline at end of file + f->release_func = gk_field_fem_release_boltzmann; +} diff --git a/gyrokinetic/apps/gk_multib_field.c b/gyrokinetic/apps/gk_multib_field.c index 830822485b..f79aca9d65 100644 --- a/gyrokinetic/apps/gk_multib_field.c +++ b/gyrokinetic/apps/gk_multib_field.c @@ -405,7 +405,7 @@ gk_multib_field_new_perp_solve(const struct gkyl_gyrokinetic_multib *mbinp, } mbf->fem_poisson[bI] = gkyl_fem_poisson_perp_new(mbf->multib_perp_ranges[bI], &sbapp->grid, sbapp->basis, - &bcs, mbf->epsilon_multib_perp[bI], NULL, mbapp->use_gpu); + &bcs, mbf->info.bias_line_list, mbf->epsilon_multib_perp[bI], NULL, mbapp->use_gpu); } } diff --git a/gyrokinetic/apps/gk_neut_species_bflux.c b/gyrokinetic/apps/gk_neut_species_bflux.c index 47f931c429..274025eafd 100644 --- a/gyrokinetic/apps/gk_neut_species_bflux.c +++ b/gyrokinetic/apps/gk_neut_species_bflux.c @@ -628,9 +628,9 @@ gk_neut_species_bflux_init(struct gkyl_gyrokinetic_app *app, void *species, (e == 1 && gkns->upper_bc[d].type != GKYL_BC_GK_SPECIES_ZERO_FLUX)) ) { bflux->boundaries_dir[bflux->num_boundaries] = d; bflux->boundaries_edge[bflux->num_boundaries] = e==0? GKYL_LOWER_EDGE : GKYL_UPPER_EDGE; - bflux->boundaries_conf_skin[bflux->num_boundaries] = e==0? &app->lower_skin[d] : &app->upper_skin[d]; - bflux->boundaries_conf_ghost[bflux->num_boundaries] = e==0? &app->lower_ghost[d] : &app->upper_ghost[d]; - bflux->boundaries_phase_ghost[bflux->num_boundaries] = e==0? &gkns->lower_ghost[d] : &gkns->upper_ghost[d]; + bflux->boundaries_conf_skin[bflux->num_boundaries] = e==0? &app->local_lower_skin[d] : &app->local_upper_skin[d]; + bflux->boundaries_conf_ghost[bflux->num_boundaries] = e==0? &app->local_lower_ghost[d] : &app->local_upper_ghost[d]; + bflux->boundaries_phase_ghost[bflux->num_boundaries] = e==0? &gkns->local_lower_ghost[d] : &gkns->local_upper_ghost[d]; bflux->num_boundaries++; } } @@ -650,8 +650,10 @@ gk_neut_species_bflux_init(struct gkyl_gyrokinetic_app *app, void *species, // Allocate updater that computes boundary fluxes. for (int b=0; bnum_boundaries; ++b) { int dir = bflux->boundaries_dir[b]; - struct gkyl_range *skin_r = bflux->boundaries_edge[b]==GKYL_LOWER_EDGE? &gkns->lower_skin[dir] : &gkns->upper_skin[dir]; - struct gkyl_range *ghost_r = bflux->boundaries_edge[b]==GKYL_LOWER_EDGE? &gkns->lower_ghost[dir] : &gkns->upper_ghost[dir]; + struct gkyl_range *skin_r = bflux->boundaries_edge[b]==GKYL_LOWER_EDGE? &gkns->local_lower_skin[dir] + : &gkns->local_upper_skin[dir]; + struct gkyl_range *ghost_r = bflux->boundaries_edge[b]==GKYL_LOWER_EDGE? &gkns->local_lower_ghost[dir] + : &gkns->local_upper_ghost[dir]; bflux->flux_slvr[b] = gkyl_boundary_flux_new(dir, bflux->boundaries_edge[b], &gkns->grid, skin_r, ghost_r, bflux->num_eqns, bflux->eqns, app->use_gpu); } @@ -724,8 +726,8 @@ gk_neut_species_bflux_init(struct gkyl_gyrokinetic_app *app, void *species, long buff_sz = 0; for (int b=0; bnum_boundaries; ++b) { int dir = bflux->boundaries_dir[b]; - struct gkyl_range *skin_r = bflux->boundaries_edge[b]==GKYL_LOWER_EDGE? &gkns->lower_skin[dir] - : &gkns->upper_skin[dir]; + struct gkyl_range *skin_r = bflux->boundaries_edge[b]==GKYL_LOWER_EDGE? &gkns->local_lower_skin[dir] + : &gkns->local_upper_skin[dir]; // MF 2025/09/29: The option `GKYL_BC_GK_SPECIES_REFLECT` here is a // just a place holder and almost certainly wrong. Currently REFLECT is diff --git a/gyrokinetic/apps/gk_neut_species_fluid.c b/gyrokinetic/apps/gk_neut_species_fluid.c index f6d5577aee..175d3674ad 100644 --- a/gyrokinetic/apps/gk_neut_species_fluid.c +++ b/gyrokinetic/apps/gk_neut_species_fluid.c @@ -271,24 +271,16 @@ gk_neut_species_fluid_init(struct gkyl_gk *gk, struct gkyl_gyrokinetic_app *app, for (int d=0; dlower_skin[dir], &ns->lower_ghost[dir], dir, GKYL_LOWER_EDGE, &ns->local_ext, ghost); - // Create local upper skin and ghost ranges for distribution function - gkyl_skin_ghost_ranges(&ns->upper_skin[dir], &ns->upper_ghost[dir], dir, GKYL_UPPER_EDGE, &ns->local_ext, ghost); - } - - // Global skin and ghost ranges, only valid (i.e. volume>0) in ranges - // abutting boundaries. - for (int dir=0; dirlocal_lower_skin[dir], &ns->local_lower_ghost[dir], + dir, GKYL_LOWER_EDGE, &ns->local_ext, ghost); + gkyl_skin_ghost_ranges(&ns->local_upper_skin[dir], &ns->local_upper_ghost[dir], + dir, GKYL_UPPER_EDGE, &ns->local_ext, ghost); gkyl_skin_ghost_ranges(&ns->global_lower_skin[dir], &ns->global_lower_ghost[dir], dir, GKYL_LOWER_EDGE, &ns->global_ext, ghost); - gkyl_sub_range_intersect(&ns->global_lower_skin[dir], &ns->local_ext, &ns->global_lower_skin[dir]); - gkyl_sub_range_intersect(&ns->global_lower_ghost[dir], &ns->local_ext, &ns->global_lower_ghost[dir]); gkyl_skin_ghost_ranges(&ns->global_upper_skin[dir], &ns->global_upper_ghost[dir], dir, GKYL_UPPER_EDGE, &ns->local_ext, ghost); - gkyl_sub_range_intersect(&ns->global_upper_skin[dir], &ns->local_ext, &ns->global_upper_skin[dir]); - gkyl_sub_range_intersect(&ns->global_upper_ghost[dir], &ns->local_ext, &ns->global_upper_ghost[dir]); } // Initialize projection routine for initial conditions. diff --git a/gyrokinetic/apps/gk_neut_species_kinetic.c b/gyrokinetic/apps/gk_neut_species_kinetic.c index aece36c2ad..3de2172888 100644 --- a/gyrokinetic/apps/gk_neut_species_kinetic.c +++ b/gyrokinetic/apps/gk_neut_species_kinetic.c @@ -274,7 +274,7 @@ gk_neut_species_kinetic_init_dynamic(struct gkyl_gk *gk, struct gkyl_gyrokinetic // Allocate buffer needed for BCs. long buff_sz = 0; for (int dir=0; dirlower_skin[dir].volume, s->upper_skin[dir].volume); + long vol = GKYL_MAX2(s->local_lower_skin[dir].volume, s->local_upper_skin[dir].volume); buff_sz = buff_sz > vol ? buff_sz : vol; } s->bc_buffer = mkarr(app->use_gpu, s->basis.num_basis, buff_sz); @@ -296,7 +296,7 @@ gk_neut_species_kinetic_init_dynamic(struct gkyl_gk *gk, struct gkyl_gyrokinetic (s->lower_bc[d].type == GKYL_BC_GK_SPECIES_FIXED_FUNC) ) { enum gkyl_bc_basic_type bctype = gkyl_gyrokinetic_translate_bc_basic_type(s->lower_bc[d].type); s->bc_lo[d] = gkyl_bc_basic_new(d, GKYL_LOWER_EDGE, bctype, s->basis_on_dev, - &s->lower_skin[d], &s->lower_ghost[d], s->f->ncomp, app->cdim, app->use_gpu); + &s->local_lower_skin[d], &s->local_lower_ghost[d], s->f->ncomp, app->cdim, app->use_gpu); if (s->lower_bc[d].type == GKYL_BC_GK_SPECIES_FIXED_FUNC) { // Fill the buffer used for BCs. @@ -320,7 +320,7 @@ gk_neut_species_kinetic_init_dynamic(struct gkyl_gk *gk, struct gkyl_gyrokinetic // Upper BC updater. Copy BCs by default. enum gkyl_bc_basic_type bctype = gkyl_gyrokinetic_translate_bc_basic_type(s->upper_bc[d].type); s->bc_up[d] = gkyl_bc_basic_new(d, GKYL_UPPER_EDGE, bctype, s->basis_on_dev, - &s->upper_skin[d], &s->upper_ghost[d], s->f->ncomp, app->cdim, app->use_gpu); + &s->local_upper_skin[d], &s->local_upper_ghost[d], s->f->ncomp, app->cdim, app->use_gpu); if (s->upper_bc[d].type == GKYL_BC_GK_SPECIES_FIXED_FUNC) { // Fill the buffer used for BCs. @@ -770,26 +770,16 @@ gk_neut_species_kinetic_init(struct gkyl_gk *gk, struct gkyl_gyrokinetic_app *ap s->collisionless = (struct gk_collisionless) { }; gk_neut_species_collisionless_init(app, s, &s->collisionless); - // Create skin/ghost ranges fir applying BCs. Only used for dynamic neutrals but included here to avoid - // code duplication since the "ghost" array is needed. - for (int dir=0; dirlower_skin[dir], &s->lower_ghost[dir], dir, GKYL_LOWER_EDGE, &s->local_ext, ghost); - // Create local upper skin and ghost ranges for distribution function - gkyl_skin_ghost_ranges(&s->upper_skin[dir], &s->upper_ghost[dir], dir, GKYL_UPPER_EDGE, &s->local_ext, ghost); - } - - // Global skin and ghost ranges, only valid (i.e. volume>0) in ranges - // abutting boundaries. + // Create skin/ghost ranges. for (int dir=0; dirlocal_lower_skin[dir], &s->local_lower_ghost[dir], + dir, GKYL_LOWER_EDGE, &s->local_ext, ghost); + gkyl_skin_ghost_ranges(&s->local_upper_skin[dir], &s->local_upper_ghost[dir], + dir, GKYL_UPPER_EDGE, &s->local_ext, ghost); gkyl_skin_ghost_ranges(&s->global_lower_skin[dir], &s->global_lower_ghost[dir], dir, GKYL_LOWER_EDGE, &s->global_ext, ghost); - gkyl_sub_range_intersect(&s->global_lower_skin[dir], &s->local_ext, &s->global_lower_skin[dir]); - gkyl_sub_range_intersect(&s->global_lower_ghost[dir], &s->local_ext, &s->global_lower_ghost[dir]); gkyl_skin_ghost_ranges(&s->global_upper_skin[dir], &s->global_upper_ghost[dir], dir, GKYL_UPPER_EDGE, &s->local_ext, ghost); - gkyl_sub_range_intersect(&s->global_upper_skin[dir], &s->local_ext, &s->global_upper_skin[dir]); - gkyl_sub_range_intersect(&s->global_upper_ghost[dir], &s->local_ext, &s->global_upper_ghost[dir]); } if (s->info.init_from_file.type == 0) { diff --git a/gyrokinetic/apps/gk_neut_species_recycle.c b/gyrokinetic/apps/gk_neut_species_recycle.c index 9d28e64519..0fac05f853 100644 --- a/gyrokinetic/apps/gk_neut_species_recycle.c +++ b/gyrokinetic/apps/gk_neut_species_recycle.c @@ -21,7 +21,7 @@ gk_neut_species_recycle_write_flux_enabled(struct gkyl_gyrokinetic_app *app, str int dir = recyc->dir; int edi = recyc->edge == GKYL_LOWER_EDGE? 0 : 1; - struct gkyl_range *cskin_r = edi ==0 ? &app->lower_skin[recyc->dir] : &app->upper_skin[recyc->dir]; + struct gkyl_range *cskin_r = edi ==0 ? &app->local_lower_skin[recyc->dir] : &app->local_upper_skin[recyc->dir]; for (int i=0; inum_species; ++i) { struct timespec wst = gkyl_wall_clock(); @@ -146,8 +146,8 @@ gk_neut_species_recycle_init(struct gkyl_gyrokinetic_app *app, struct gk_recycle upper[dir] = e==0? s->grid.lower[dir] : s->grid.upper[dir] + s->grid.dx[dir]; gkyl_rect_grid_init(&recyc->emit_grid, ndim, lower, upper, cells); - recyc->emit_ghost_r = e==0? &s->lower_ghost[dir] : &s->upper_ghost[dir]; - recyc->emit_skin_r = e==0? &s->lower_skin[dir] : &s->upper_skin[dir]; + recyc->emit_ghost_r = e==0? &s->local_lower_ghost[dir] : &s->local_upper_ghost[dir]; + recyc->emit_skin_r = e==0? &s->local_lower_skin[dir] : &s->local_upper_skin[dir]; gkyl_range_init(&recyc->emit_buff_r, ndim, recyc->emit_ghost_r->lower, recyc->emit_ghost_r->upper); gkyl_range_init(&recyc->emit_cbuff_r, cdim, recyc->emit_ghost_r->lower, recyc->emit_ghost_r->upper); @@ -264,8 +264,8 @@ gk_neut_species_recycle_cross_init(struct gkyl_gyrokinetic_app *app, struct gk_n upper[recyc->dir] = e==0? gks->grid.lower[recyc->dir] : gks->grid.upper[recyc->dir] + gks->grid.dx[recyc->dir]; gkyl_rect_grid_init(&recyc->impact_grid[i], cdim+gks->info.vdim, lower, upper, cells); - struct gkyl_range *phase_skin_r = e==0? &gks->lower_skin[recyc->dir] : &gks->upper_skin[recyc->dir]; - struct gkyl_range *phase_ghost_r = e==0? &gks->lower_ghost[recyc->dir] : &gks->upper_ghost[recyc->dir]; + struct gkyl_range *phase_skin_r = e==0? &gks->local_lower_skin[recyc->dir] : &gks->local_upper_skin[recyc->dir]; + struct gkyl_range *phase_ghost_r = e==0? &gks->local_lower_ghost[recyc->dir] : &gks->local_upper_ghost[recyc->dir]; recyc->impact_ghost_r[i] = phase_ghost_r; gkyl_range_init(&recyc->impact_buff_r[i], cdim+gks->info.vdim, phase_ghost_r->lower, phase_ghost_r->upper); gkyl_range_init(&recyc->impact_cbuff_r[i], cdim, phase_ghost_r->lower, phase_ghost_r->upper); diff --git a/gyrokinetic/apps/gk_neut_species_recycle_react_scale.c b/gyrokinetic/apps/gk_neut_species_recycle_react_scale.c index 5b4c69aafb..0f1698da8b 100644 --- a/gyrokinetic/apps/gk_neut_species_recycle_react_scale.c +++ b/gyrokinetic/apps/gk_neut_species_recycle_react_scale.c @@ -224,7 +224,7 @@ gk_neut_species_recycle_react_scale_cross_init(struct gkyl_gyrokinetic_app *app, } // Default scenario: we set the ranges to the full range of the ghost cells. - rrs->boundaries_conf_ghost[j] = edge == GKYL_LOWER_EDGE ? app->lower_ghost[dir] : app->upper_ghost[dir]; + rrs->boundaries_conf_ghost[j] = edge == GKYL_LOWER_EDGE ? app->local_lower_ghost[dir] : app->local_upper_ghost[dir]; rrs->boundaries_dir[j] = dir; rrs->boundaries_edge[j] = edge; @@ -232,7 +232,7 @@ gk_neut_species_recycle_react_scale_cross_init(struct gkyl_gyrokinetic_app *app, if (edge == GKYL_LOWER_EDGE? gks_ion->lower_bc[dir].type == GKYL_BC_GK_SPECIES_IWL : gks_ion->upper_bc[dir].type == GKYL_BC_GK_SPECIES_IWL) { - rrs->boundaries_conf_ghost[j] = edge == GKYL_LOWER_EDGE ? app->lower_ghost_par_sol : app->upper_ghost_par_sol; + rrs->boundaries_conf_ghost[j] = edge == GKYL_LOWER_EDGE ? app->local_lower_ghost_par_sol : app->local_upper_ghost_par_sol; } } diff --git a/gyrokinetic/apps/gk_species.c b/gyrokinetic/apps/gk_species.c index 3345748d97..d427b6e219 100644 --- a/gyrokinetic/apps/gk_species.c +++ b/gyrokinetic/apps/gk_species.c @@ -817,7 +817,7 @@ gk_species_init_dynamic(struct gkyl_gk *gk_app_inp, struct gkyl_gyrokinetic_app long buff_sz = 1; for (int dir=0; dirlower_skin[dir].volume, gks->upper_skin[dir].volume); + long vol = GKYL_MAX2(gks->local_lower_skin[dir].volume, gks->local_upper_skin[dir].volume); buff_sz = buff_sz > vol ? buff_sz : vol; } gks->bc_buffer = need_bc_buffer? mkarr(app->use_gpu, gks->basis.num_basis, buff_sz) @@ -832,12 +832,12 @@ gk_species_init_dynamic(struct gkyl_gk *gk_app_inp, struct gkyl_gyrokinetic_app // Lower BC. if (gks->lower_bc[d].type == GKYL_BC_GK_SPECIES_SHEATH) { gks->bc_sheath_lo = gkyl_bc_sheath_gyrokinetic_new(d, GKYL_LOWER_EDGE, gks->basis_on_dev, - &gks->lower_skin[d], &gks->lower_ghost[d], gks->vel_map, + &gks->local_lower_skin[d], &gks->local_lower_ghost[d], gks->vel_map, cdim, 2.0*(gks->info.charge/gks->info.mass), app->use_gpu); } else if (gks->lower_bc[d].type == GKYL_BC_GK_SPECIES_IWL) { gks->bc_sheath_lo = gkyl_bc_sheath_gyrokinetic_new(d, GKYL_LOWER_EDGE, gks->basis_on_dev, - &gks->lower_skin_par_sol, &gks->lower_ghost_par_sol, gks->vel_map, + &gks->local_lower_skin_par_sol, &gks->local_lower_ghost_par_sol, gks->vel_map, cdim, 2.0*(gks->info.charge/gks->info.mass), app->use_gpu); if (cdim == 3) { @@ -869,7 +869,7 @@ gk_species_init_dynamic(struct gkyl_gk *gk_app_inp, struct gkyl_gyrokinetic_app assert(d == cdim-1); // MF 2025/09/25: Reflecting BCs only allowed in the parallel direction. gks->bc_lo[d] = gkyl_bc_basic_gyrokinetic_new(d, GKYL_LOWER_EDGE, gks->lower_bc[d].type, gks->basis_on_dev, - &gks->lower_skin[d], &gks->lower_ghost[d], gks->f->ncomp, app->cdim, app->use_gpu); + &gks->local_lower_skin[d], &gks->local_lower_ghost[d], gks->f->ncomp, app->cdim, app->use_gpu); if (gks->lower_bc[d].type == GKYL_BC_GK_SPECIES_FIXED_FUNC) { // Project distribution desired in the ghost cell. @@ -878,7 +878,7 @@ gk_species_init_dynamic(struct gkyl_gk *gk_app_inp, struct gkyl_gyrokinetic_app gk_species_projection_calc(app, gks, &gk_proj_bc_lo, gks->f1, 0.0); // Temporarily use f1. // Fill ghost cell with the boundary value. struct gkyl_bc_basic_gyrokinetic *gfss_bc_op = gkyl_bc_basic_gyrokinetic_new(d, GKYL_LOWER_EDGE, - GKYL_BC_GK_SPECIES_BOUNDARY_VALUE, gks->basis_on_dev, &gks->lower_skin[d], &gks->lower_ghost[d], + GKYL_BC_GK_SPECIES_BOUNDARY_VALUE, gks->basis_on_dev, &gks->local_lower_skin[d], &gks->local_lower_ghost[d], gks->f->ncomp, app->cdim, app->use_gpu); gkyl_bc_basic_gyrokinetic_advance(gfss_bc_op, gks->bc_buffer_lo_fixed, gks->f1); gkyl_bc_basic_gyrokinetic_release(gfss_bc_op); @@ -892,12 +892,12 @@ gk_species_init_dynamic(struct gkyl_gk *gk_app_inp, struct gkyl_gyrokinetic_app // Upper BC. if (gks->upper_bc[d].type == GKYL_BC_GK_SPECIES_SHEATH) { gks->bc_sheath_up = gkyl_bc_sheath_gyrokinetic_new(d, GKYL_UPPER_EDGE, gks->basis_on_dev, - &gks->upper_skin[d], &gks->upper_ghost[d], gks->vel_map, + &gks->local_upper_skin[d], &gks->local_upper_ghost[d], gks->vel_map, cdim, 2.0*(gks->info.charge/gks->info.mass), app->use_gpu); } else if (gks->upper_bc[d].type == GKYL_BC_GK_SPECIES_IWL) { gks->bc_sheath_up = gkyl_bc_sheath_gyrokinetic_new(d, GKYL_UPPER_EDGE, gks->basis_on_dev, - &gks->upper_skin_par_sol, &gks->upper_ghost_par_sol, gks->vel_map, + &gks->local_upper_skin_par_sol, &gks->local_upper_ghost_par_sol, gks->vel_map, cdim, 2.0*(gks->info.charge/gks->info.mass), app->use_gpu); if (cdim == 3) { @@ -929,7 +929,7 @@ gk_species_init_dynamic(struct gkyl_gk *gk_app_inp, struct gkyl_gyrokinetic_app assert(d == cdim-1); // MF 2025/09/25: Reflecting BCs only allowed in the parallel direction. gks->bc_up[d] = gkyl_bc_basic_gyrokinetic_new(d, GKYL_UPPER_EDGE, gks->upper_bc[d].type, gks->basis_on_dev, - &gks->upper_skin[d], &gks->upper_ghost[d], gks->f->ncomp, app->cdim, app->use_gpu); + &gks->local_upper_skin[d], &gks->local_upper_ghost[d], gks->f->ncomp, app->cdim, app->use_gpu); if (gks->upper_bc[d].type == GKYL_BC_GK_SPECIES_FIXED_FUNC) { // Project distribution desired in the ghost cell. @@ -938,7 +938,7 @@ gk_species_init_dynamic(struct gkyl_gk *gk_app_inp, struct gkyl_gyrokinetic_app gk_species_projection_calc(app, gks, &gk_proj_bc_up, gks->f1, 0.0); // Temporarily use f1. // Fill ghost cell with the boundary value. struct gkyl_bc_basic_gyrokinetic *gfss_bc_op = gkyl_bc_basic_gyrokinetic_new(d, GKYL_UPPER_EDGE, - GKYL_BC_GK_SPECIES_BOUNDARY_VALUE, gks->basis_on_dev, &gks->upper_skin[d], &gks->upper_ghost[d], + GKYL_BC_GK_SPECIES_BOUNDARY_VALUE, gks->basis_on_dev, &gks->local_upper_skin[d], &gks->local_upper_ghost[d], gks->f->ncomp, app->cdim, app->use_gpu); gkyl_bc_basic_gyrokinetic_advance(gfss_bc_op, gks->bc_buffer_up_fixed, gks->f1); gkyl_bc_basic_gyrokinetic_release(gfss_bc_op); @@ -1514,7 +1514,7 @@ gk_species_init(struct gkyl_gk *gk_app_inp, struct gkyl_gyrokinetic_app *app, st for (int m=0; mmoms[m], gks->info.diag_moments[m], false); - // initialize projection routine for initial conditions + // Initialize projection routine for initial conditions. if (gks->info.init_from_file.type == 0) { gk_species_projection_init(app, gks, gks->info.projection, &gks->proj_init); } @@ -1522,84 +1522,77 @@ gk_species_init(struct gkyl_gk *gk_app_inp, struct gkyl_gyrokinetic_app *app, st gk_species_file_import_init(app, gks, gks->info.init_from_file); } - // Create skin/ghost ranges for applying BCs. + // Create skin/ghost ranges. for (int dir=0; dirlower_skin[dir], &gks->lower_ghost[dir], dir, GKYL_LOWER_EDGE, &gks->local_ext, ghost); - // Create local upper skin and ghost ranges for distribution function - gkyl_skin_ghost_ranges(&gks->upper_skin[dir], &gks->upper_ghost[dir], dir, GKYL_UPPER_EDGE, &gks->local_ext, ghost); - } - - // Global skin and ghost ranges, only valid (i.e. volume>0) in ranges - // abutting boundaries. - for (int dir=0; dirglobal_lower_skin[dir], &gks->global_lower_ghost[dir], dir, GKYL_LOWER_EDGE, &gks->global_ext, ghost); - gkyl_skin_ghost_ranges(&gks->global_upper_skin[dir], &gks->global_upper_ghost[dir], dir, GKYL_UPPER_EDGE, &gks->global_ext, ghost); - - gkyl_sub_range_intersect(&gks->global_lower_skin[dir], &gks->local_ext, &gks->global_lower_skin[dir]); - gkyl_sub_range_intersect(&gks->global_upper_skin[dir], &gks->local_ext, &gks->global_upper_skin[dir]); - - gkyl_sub_range_intersect(&gks->global_lower_ghost[dir], &gks->local_ext, &gks->global_lower_ghost[dir]); - gkyl_sub_range_intersect(&gks->global_upper_ghost[dir], &gks->local_ext, &gks->global_upper_ghost[dir]); + gkyl_skin_ghost_ranges(&gks->local_lower_skin[dir], &gks->local_lower_ghost[dir], + dir, GKYL_LOWER_EDGE, &gks->local_ext, ghost); + gkyl_skin_ghost_ranges(&gks->local_upper_skin[dir], &gks->local_upper_ghost[dir], + dir, GKYL_UPPER_EDGE, &gks->local_ext, ghost); + gkyl_skin_ghost_ranges(&gks->global_lower_skin[dir], &gks->global_lower_ghost[dir], + dir, GKYL_LOWER_EDGE, &gks->global_ext, ghost); + gkyl_skin_ghost_ranges(&gks->global_upper_skin[dir], &gks->global_upper_ghost[dir], + dir, GKYL_UPPER_EDGE, &gks->global_ext, ghost); } if (gk_app_inp->geometry.has_LCFS) { - // IWL simulation. Create core and SOL global ranges. + // Simulation spans the last-closed flux surface (LCFS). Create core and SOL global ranges. int idx_LCFS_lo = app->gk_geom->idx_LCFS_lo; // Length of lower and upper x ranges (one is core, the other SOL). int len_lo = idx_LCFS_lo; int len_up = gks->global.upper[0]-len_lo; // Lower and upper x ranges. - struct gkyl_range *global_lo_r, *local_lo_r, *global_ext_lo_r, *local_ext_lo_r; - struct gkyl_range *global_up_r, *local_up_r, *global_ext_up_r, *local_ext_up_r; - struct gkyl_range *lower_skin_par_lo_r, *upper_skin_par_lo_r, *lower_ghost_par_lo_r, *upper_ghost_par_lo_r; - struct gkyl_range *lower_skin_par_up_r, *upper_skin_par_up_r, *lower_ghost_par_up_r, *upper_ghost_par_up_r; + struct gkyl_range *global_lo_r, *global_ext_lo_r, *global_up_r, *global_ext_up_r; + struct gkyl_range *local_lo_r, *local_ext_lo_r, *local_up_r, *local_ext_up_r; + struct gkyl_range *local_lower_skin_par_lo_r, *local_upper_skin_par_lo_r, + *local_lower_ghost_par_lo_r, *local_upper_ghost_par_lo_r; + struct gkyl_range *local_lower_skin_par_up_r, *local_upper_skin_par_up_r, + *local_lower_ghost_par_up_r, *local_upper_ghost_par_up_r; if (app->gk_geom->geqdsk_sign_convention == 0) { // x increases towards SOL. - global_lo_r = &gks->global_core; - local_lo_r = &gks->local_core; - global_ext_lo_r = &gks->global_ext_core; - local_ext_lo_r = &gks->local_ext_core; - lower_skin_par_lo_r = &gks->lower_skin_par_core; - upper_skin_par_lo_r = &gks->upper_skin_par_core; - lower_ghost_par_lo_r = &gks->lower_ghost_par_core; - upper_ghost_par_lo_r = &gks->upper_ghost_par_core; - global_up_r = &gks->global_sol; - local_up_r = &gks->local_sol; - global_ext_up_r = &gks->global_ext_sol; - local_ext_up_r = &gks->local_ext_sol; - lower_skin_par_up_r = &gks->lower_skin_par_sol; - upper_skin_par_up_r = &gks->upper_skin_par_sol; - lower_ghost_par_up_r = &gks->lower_ghost_par_sol; - upper_ghost_par_up_r = &gks->upper_ghost_par_sol; + global_lo_r = &gks->global_core; + global_up_r = &gks->global_sol; + global_ext_lo_r = &gks->global_ext_core; + global_ext_up_r = &gks->global_ext_sol; + local_lo_r = &gks->local_core; + local_up_r = &gks->local_sol; + local_ext_lo_r = &gks->local_ext_core; + local_ext_up_r = &gks->local_ext_sol; + local_lower_skin_par_lo_r = &gks->local_lower_skin_par_core; + local_lower_ghost_par_lo_r = &gks->local_lower_ghost_par_core; + local_lower_skin_par_up_r = &gks->local_lower_skin_par_sol; + local_lower_ghost_par_up_r = &gks->local_lower_ghost_par_sol; + local_upper_skin_par_lo_r = &gks->local_upper_skin_par_core; + local_upper_ghost_par_lo_r = &gks->local_upper_ghost_par_core; + local_upper_skin_par_up_r = &gks->local_upper_skin_par_sol; + local_upper_ghost_par_up_r = &gks->local_upper_ghost_par_sol; } else { // x increases towards core. - global_lo_r = &gks->global_sol; - local_lo_r = &gks->local_sol; - global_ext_lo_r = &gks->global_ext_sol; - local_ext_lo_r = &gks->local_ext_sol; - lower_skin_par_lo_r = &gks->lower_skin_par_sol; - upper_skin_par_lo_r = &gks->upper_skin_par_sol; - lower_ghost_par_lo_r = &gks->lower_ghost_par_sol; - upper_ghost_par_lo_r = &gks->upper_ghost_par_sol; - global_up_r = &gks->global_core; - local_up_r = &gks->local_core; - global_ext_up_r = &gks->global_ext_core; - local_ext_up_r = &gks->local_ext_core; - lower_skin_par_up_r = &gks->lower_skin_par_core; - upper_skin_par_up_r = &gks->upper_skin_par_core; - lower_ghost_par_up_r = &gks->lower_ghost_par_core; - upper_ghost_par_up_r = &gks->upper_ghost_par_core; + global_lo_r = &gks->global_sol; + global_ext_lo_r = &gks->global_ext_sol; + global_up_r = &gks->global_core; + global_ext_up_r = &gks->global_ext_core; + local_lo_r = &gks->local_sol; + local_up_r = &gks->local_core; + local_ext_lo_r = &gks->local_ext_sol; + local_ext_up_r = &gks->local_ext_core; + local_lower_skin_par_lo_r = &gks->local_lower_skin_par_sol; + local_upper_skin_par_lo_r = &gks->local_upper_skin_par_sol; + local_lower_ghost_par_lo_r = &gks->local_lower_ghost_par_sol; + local_upper_ghost_par_lo_r = &gks->local_upper_ghost_par_sol; + local_lower_skin_par_up_r = &gks->local_lower_skin_par_core; + local_upper_skin_par_up_r = &gks->local_upper_skin_par_core; + local_lower_ghost_par_up_r = &gks->local_lower_ghost_par_core; + local_upper_ghost_par_up_r = &gks->local_upper_ghost_par_core; } - // Global and local lower and upper x ranges. + // Lower and upper x ranges. gkyl_range_shorten_from_above(global_lo_r, &gks->global, 0, len_lo); gkyl_range_shorten_from_below(global_up_r, &gks->global, 0, len_up); gkyl_range_shorten_from_above(local_lo_r, &gks->local, 0, len_lo); gkyl_range_shorten_from_below(local_up_r, &gks->local, 0, len_up); - // Extended global and local lower and upper x ranges. + // Extended lower and upper x ranges. int len_lo_ext = idx_LCFS_lo+1; int len_up_ext = gks->global_ext.upper[0]-len_lo; gkyl_range_shorten_from_above(global_ext_lo_r, &gks->global_ext, 0, len_lo_ext); @@ -1607,20 +1600,20 @@ gk_species_init(struct gkyl_gk *gk_app_inp, struct gkyl_gyrokinetic_app *app, st gkyl_range_shorten_from_above(local_ext_lo_r, &gks->local_ext, 0, len_lo_ext); gkyl_range_shorten_from_below(local_ext_up_r, &gks->local_ext, 0, len_up_ext); - // Create core and SOL parallel skin and ghost ranges. + // Parallel skin and ghost ranges, limited to the lower and upper x range. int par_dir = app->cdim-1; for (int e=0; e<2; e++) { - gkyl_range_shorten_from_above(e==0? lower_skin_par_lo_r : upper_skin_par_lo_r, - e==0? &gks->lower_skin[par_dir] : &gks->upper_skin[par_dir], 0, len_lo); - gkyl_range_shorten_from_above(e==0? lower_ghost_par_lo_r : upper_ghost_par_lo_r, - e==0? &gks->lower_ghost[par_dir] : &gks->upper_ghost[par_dir], 0, len_lo); - gkyl_range_shorten_from_below(e==0? lower_skin_par_up_r : upper_skin_par_up_r, - e==0? &gks->lower_skin[par_dir] : &gks->upper_skin[par_dir], 0, len_up); - gkyl_range_shorten_from_below(e==0? lower_ghost_par_up_r : upper_ghost_par_up_r, - e==0? &gks->lower_ghost[par_dir] : &gks->upper_ghost[par_dir], 0, len_up); + gkyl_range_shorten_from_above(e==0? local_lower_skin_par_lo_r : local_upper_skin_par_lo_r, + e==0? &gks->local_lower_skin[par_dir] : &gks->local_upper_skin[par_dir], 0, len_lo); + gkyl_range_shorten_from_above(e==0? local_lower_ghost_par_lo_r : local_upper_ghost_par_lo_r, + e==0? &gks->local_lower_ghost[par_dir] : &gks->local_upper_ghost[par_dir], 0, len_lo); + gkyl_range_shorten_from_below(e==0? local_lower_skin_par_up_r : local_upper_skin_par_up_r, + e==0? &gks->local_lower_skin[par_dir] : &gks->local_upper_skin[par_dir], 0, len_up); + gkyl_range_shorten_from_below(e==0? local_lower_ghost_par_up_r : local_upper_ghost_par_up_r, + e==0? &gks->local_lower_ghost[par_dir] : &gks->local_upper_ghost[par_dir], 0, len_up); } - // Create a core local range, extended in the BC dir (for TS BCs). + // Core range extended in the parallel direction. int ndim = gks->local.ndim; int lower_bcdir_ext[ndim], upper_bcdir_ext[ndim]; for (int i=0; iupper_bc[0].type == GKYL_BC_GK_SPECIES_FIXED_FUNC) || (gks->upper_bc[0].type == GKYL_BC_GK_SPECIES_ABSORB))) ) { int dir = 0; enum gkyl_edge_loc edge = b==0? GKYL_LOWER_EDGE : GKYL_UPPER_EDGE; - struct gkyl_range *skin_r = b==0? &app->lower_skin[dir] : &app->upper_skin[dir]; - struct gkyl_range *ghost_r = b==0? &app->lower_ghost[dir] : &app->upper_ghost[dir]; + struct gkyl_range *skin_r = b==0? &app->local_lower_skin[dir] : &app->local_upper_skin[dir]; + struct gkyl_range *ghost_r = b==0? &app->local_lower_ghost[dir] : &app->local_upper_ghost[dir]; long vol = skin_r->volume; long buff_sz = 1; diff --git a/gyrokinetic/apps/gk_species_bflux.c b/gyrokinetic/apps/gk_species_bflux.c index 4f372c972d..acf97374ad 100644 --- a/gyrokinetic/apps/gk_species_bflux.c +++ b/gyrokinetic/apps/gk_species_bflux.c @@ -648,17 +648,17 @@ gk_species_bflux_init(struct gkyl_gyrokinetic_app *app, void *species, bflux->boundaries_dir[num_bound] = d; bflux->boundaries_edge[num_bound] = e==0? GKYL_LOWER_EDGE : GKYL_UPPER_EDGE; - bflux->boundaries_conf_skin[num_bound] = e==0? &app->lower_skin[d] : &app->upper_skin[d]; - bflux->boundaries_conf_ghost[num_bound] = e==0? &app->lower_ghost[d] : &app->upper_ghost[d]; - bflux->boundaries_phase_skin[num_bound] = e==0? &gk_s->lower_skin[d] : &gk_s->upper_skin[d]; - bflux->boundaries_phase_ghost[num_bound] = e==0? &gk_s->lower_ghost[d] : &gk_s->upper_ghost[d]; + bflux->boundaries_conf_skin[num_bound] = e==0? &app->local_lower_skin[d] : &app->local_upper_skin[d]; + bflux->boundaries_conf_ghost[num_bound] = e==0? &app->local_lower_ghost[d] : &app->local_upper_ghost[d]; + bflux->boundaries_phase_skin[num_bound] = e==0? &gk_s->local_lower_skin[d] : &gk_s->local_upper_skin[d]; + bflux->boundaries_phase_ghost[num_bound] = e==0? &gk_s->local_lower_ghost[d] : &gk_s->local_upper_ghost[d]; bflux->boundaries_conf_skin_fullx[num_bound] = bflux->boundaries_conf_skin[num_bound]; if (e == 0? gk_s->lower_bc[d].type == GKYL_BC_GK_SPECIES_IWL : gk_s->upper_bc[d].type == GKYL_BC_GK_SPECIES_IWL) { // Use SOL ranges only for parallel boundary fluxes. - bflux->boundaries_conf_skin[num_bound] = e==0? &app->lower_skin_par_sol : &app->upper_skin_par_sol; - bflux->boundaries_conf_ghost[num_bound] = e==0? &app->lower_ghost_par_sol : &app->upper_ghost_par_sol; - bflux->boundaries_phase_skin[num_bound] = e==0? &gk_s->lower_skin_par_sol : &gk_s->upper_skin_par_sol; - bflux->boundaries_phase_ghost[num_bound] = e==0? &gk_s->lower_ghost_par_sol : &gk_s->upper_ghost_par_sol; + bflux->boundaries_conf_skin[num_bound] = e==0? &app->local_lower_skin_par_sol : &app->local_upper_skin_par_sol; + bflux->boundaries_conf_ghost[num_bound] = e==0? &app->local_lower_ghost_par_sol : &app->local_upper_ghost_par_sol; + bflux->boundaries_phase_skin[num_bound] = e==0? &gk_s->local_lower_skin_par_sol : &gk_s->local_upper_skin_par_sol; + bflux->boundaries_phase_ghost[num_bound] = e==0? &gk_s->local_lower_ghost_par_sol : &gk_s->local_upper_ghost_par_sol; } num_bound++; diff --git a/gyrokinetic/apps/gk_species_fdot_multiplier.c b/gyrokinetic/apps/gk_species_fdot_multiplier.c index 0a983aeaa6..93343ddee2 100644 --- a/gyrokinetic/apps/gk_species_fdot_multiplier.c +++ b/gyrokinetic/apps/gk_species_fdot_multiplier.c @@ -147,6 +147,10 @@ gk_species_fdot_multiplier_init(struct gkyl_gyrokinetic_app *app, struct gk_spec ); gkyl_proj_on_basis_advance(projup, 0.0, &gks->local, fdmul->multiplier_host); gkyl_proj_on_basis_release(projup); + + if (basis_mult.poly_order == 0) + gkyl_array_scale_range(fdmul->multiplier_host, 1.0/pow(sqrt(2.0),gks->grid.ndim), &gks->local); + gkyl_array_copy(fdmul->multiplier, fdmul->multiplier_host); fdmul->advance_times_cfl_func = gk_species_fdot_multiplier_advance_mult; diff --git a/gyrokinetic/apps/gk_species_source.c b/gyrokinetic/apps/gk_species_source.c index 50b8502d59..da18929d45 100644 --- a/gyrokinetic/apps/gk_species_source.c +++ b/gyrokinetic/apps/gk_species_source.c @@ -508,16 +508,21 @@ gk_species_source_init(struct gkyl_gyrokinetic_app *app, struct gk_species *s, } // Default scenario: we set the ranges to the full range of the ghost cells. - adapt_src->boundaries_phase_ghost[j] = edge == GKYL_LOWER_EDGE ? s->lower_ghost[dir] : s->upper_ghost[dir]; - adapt_src->boundaries_conf_ghost[j] = edge == GKYL_LOWER_EDGE ? app->lower_ghost[dir] : app->upper_ghost[dir]; + adapt_src->boundaries_phase_ghost[j] = edge == GKYL_LOWER_EDGE? s->local_lower_ghost[dir] + : s->local_upper_ghost[dir]; + adapt_src->boundaries_conf_ghost[j] = edge == GKYL_LOWER_EDGE? app->local_lower_ghost[dir] + : app->local_upper_ghost[dir]; adapt_src->dir[j] = dir; adapt_src->edge[j] = edge; // Specific scenario if we are in a inner wall limited case. We select only SOL range in parallel direction. - if (edge == GKYL_LOWER_EDGE? s->lower_bc[dir].type == GKYL_BC_GK_SPECIES_IWL : s->upper_bc[dir].type == GKYL_BC_GK_SPECIES_IWL) + if (edge == GKYL_LOWER_EDGE? s->lower_bc[dir].type == GKYL_BC_GK_SPECIES_IWL + : s->upper_bc[dir].type == GKYL_BC_GK_SPECIES_IWL) { - adapt_src->boundaries_phase_ghost[j] = edge == GKYL_LOWER_EDGE ? s->lower_ghost_par_sol : s->upper_ghost_par_sol; - adapt_src->boundaries_conf_ghost[j] = edge == GKYL_LOWER_EDGE ? app->lower_ghost_par_sol : app->upper_ghost_par_sol; + adapt_src->boundaries_phase_ghost[j] = edge == GKYL_LOWER_EDGE? s->local_lower_ghost_par_sol + : s->local_upper_ghost_par_sol; + adapt_src->boundaries_conf_ghost[j] = edge == GKYL_LOWER_EDGE? app->local_lower_ghost_par_sol + : app->local_upper_ghost_par_sol; } } } diff --git a/gyrokinetic/apps/gkyl_gyrokinetic.h b/gyrokinetic/apps/gkyl_gyrokinetic.h index 0a890ef220..5f88666f4c 100644 --- a/gyrokinetic/apps/gkyl_gyrokinetic.h +++ b/gyrokinetic/apps/gkyl_gyrokinetic.h @@ -477,7 +477,7 @@ struct gkyl_gyrokinetic_field { bool is_static; // =true field does not change in time. bool zero_init_field; // =true doesn't compute the initial field. - double polarization_bmag; + double polarization_bmag; // B factor in the polarization density. double kperpSq; // kperp^2 parameter for 1D field equations // parameters for adiabatic electrons simulations @@ -508,7 +508,7 @@ struct gkyl_gyrokinetic_field { void (*phi_wall_up)(double t, const double *xn, double *phi_wall_up_out, void *ctx); bool phi_wall_up_evolve; // set to true if biased wall potential on upper wall function is time dependent - struct gkyl_poisson_bias_plane_list *bias_plane_list; // store possible biased plane that will constrain the solution + struct gkyl_poisson_bias_line_list *bias_line_list; // Biased lines constraining the solution. }; // Top-level app parameters @@ -1311,6 +1311,16 @@ void gkyl_gyrokinetic_app_release(gkyl_gyrokinetic_app* app); */ void gkyl_gyrokinetic_app_release_geom(gkyl_gyrokinetic_app* app); +/** + * Reset the CFL factor for the omega_H frequency. + * + * @param app App object. + * @param tm Time-stamp. + * @param cfl_frac_omegaH New CFL factor to use for the omega_H mode. + */ +void gkyl_gyrokinetic_app_reset_cfl_frac_omegaH(gkyl_gyrokinetic_app* app, double tm, + double cfl_frac_omegaH); + /** * Reset the df/dt multiplier operator for a given species. * diff --git a/gyrokinetic/apps/gkyl_gyrokinetic_multib.h b/gyrokinetic/apps/gkyl_gyrokinetic_multib.h index b66f693057..76c065a437 100644 --- a/gyrokinetic/apps/gkyl_gyrokinetic_multib.h +++ b/gyrokinetic/apps/gkyl_gyrokinetic_multib.h @@ -142,6 +142,8 @@ struct gkyl_gyrokinetic_multib_field { const struct gkyl_gyrokinetic_bc *bcs; bool time_rate_diagnostics; // Writes the time rate of change of field energy. + + struct gkyl_poisson_bias_line_list *bias_line_list; // Biased lines constraining the solution. }; // Top-level app parameters: this diff --git a/gyrokinetic/apps/gkyl_gyrokinetic_priv.h b/gyrokinetic/apps/gkyl_gyrokinetic_priv.h index ae971282b2..962f35197e 100644 --- a/gyrokinetic/apps/gkyl_gyrokinetic_priv.h +++ b/gyrokinetic/apps/gkyl_gyrokinetic_priv.h @@ -975,12 +975,12 @@ struct gk_species { // Pointers to updaters that apply (non-sheath) BC. struct gkyl_bc_basic_gyrokinetic *bc_lo[GKYL_MAX_CDIM]; struct gkyl_bc_basic_gyrokinetic *bc_up[GKYL_MAX_CDIM]; - // 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]; - // Global skin/ghost ranges, valid (i.e. volume>0) in ranks abutting boundaries. + // Local skin/ghost ranges. + struct gkyl_range local_lower_skin[GKYL_MAX_DIM]; + struct gkyl_range local_lower_ghost[GKYL_MAX_DIM]; + struct gkyl_range local_upper_skin[GKYL_MAX_DIM]; + struct gkyl_range local_upper_ghost[GKYL_MAX_DIM]; + // Global skin/ghost ranges. struct gkyl_range global_lower_skin[GKYL_MAX_DIM]; struct gkyl_range global_lower_ghost[GKYL_MAX_DIM]; struct gkyl_range global_upper_skin[GKYL_MAX_DIM]; @@ -988,10 +988,10 @@ struct gk_species { // Core and SOL ranges for IWL sims. struct gkyl_range global_core, global_ext_core, global_sol, global_ext_sol; struct gkyl_range local_core, local_ext_core, local_sol, local_ext_sol; - struct gkyl_range lower_skin_par_core, lower_ghost_par_core; - struct gkyl_range upper_skin_par_core, upper_ghost_par_core; - struct gkyl_range lower_skin_par_sol , lower_ghost_par_sol; - struct gkyl_range upper_skin_par_sol , upper_ghost_par_sol; + struct gkyl_range local_lower_skin_par_core, local_lower_ghost_par_core; + struct gkyl_range local_upper_skin_par_core, local_upper_ghost_par_core; + struct gkyl_range local_lower_skin_par_sol , local_lower_ghost_par_sol; + struct gkyl_range local_upper_skin_par_sol , local_upper_ghost_par_sol; // GK IWL sims need a core range extended in z, and a TS BC updater. struct gkyl_range local_par_ext_core; // Core range extended in parallel direction. struct gkyl_bc_twistshift *bc_ts_lo, *bc_ts_up; @@ -1096,12 +1096,12 @@ struct gk_neut_species { gkyl_dynvec integ_diag; // integrated moments reduced across grid bool is_first_integ_write_call; // flag for integrated moments dynvec written first time - // 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]; - // Global skin/ghost ranges, valid (i.e. volume>0) in ranks abutting boundaries. + // Local skin/ghost ranges. + struct gkyl_range local_lower_skin[GKYL_MAX_DIM]; + struct gkyl_range local_lower_ghost[GKYL_MAX_DIM]; + struct gkyl_range local_upper_skin[GKYL_MAX_DIM]; + struct gkyl_range local_upper_ghost[GKYL_MAX_DIM]; + // Global skin/ghost ranges. struct gkyl_range global_lower_skin[GKYL_MAX_DIM]; struct gkyl_range global_lower_ghost[GKYL_MAX_DIM]; struct gkyl_range global_upper_skin[GKYL_MAX_DIM]; @@ -1199,21 +1199,20 @@ struct gk_neut_species { void (*release_func)(const gkyl_gyrokinetic_app* app, const struct gk_neut_species *s); }; -// field data +// Field data. struct gk_field { - struct gkyl_gyrokinetic_field info; // data for field + struct gkyl_gyrokinetic_field info; // Data for field. enum gkyl_gkfield_id gkfield_id; bool update_field; // Are we updating the field?. bool calc_init_field; // Whether to compute the t=0 field. - struct gkyl_job_pool *job_pool; // Job pool - // arrays for local charge density, global charge density, and global smoothed (in z) charge density + // Arrays for local charge density, global charge density, and global smoothed (in z) charge density. struct gkyl_array *rho_c; struct gkyl_array *rho_c_global_dg; struct gkyl_array *rho_c_global_smooth; - struct gkyl_array *phi_fem, *phi_smooth; // arrays for updates + struct gkyl_array *phi_fem, *phi_smooth; // Arrays for updates. struct gkyl_array *phi_host; // host copy for use IO and initialization @@ -1241,25 +1240,22 @@ struct gk_field { bool is_dirichletvar; // Whether user provided spatially varying phi BCs. struct gkyl_array *phi_bc; // Spatially varying BC. struct gkyl_array *epsilon; // Polarization weight including geometric factors. - struct gkyl_array *kSq; + struct gkyl_array *kSq; // Weight for Poisson/Helmholtz solver. - struct gkyl_fem_parproj *fem_parproj; // FEM smoother for projecting DG functions onto continuous FEM basis - // weight*phi_{fem} = phi_{dg} - struct gkyl_fem_parproj *fem_parproj_sol; - struct gkyl_fem_parproj *fem_parproj_core; + struct gkyl_fem_parproj *fem_parproj; // Projects DG function onto continuous FEM basis: weight*phi_{fem} = phi_{dg} + struct gkyl_fem_parproj *fem_parproj_sol; // FEM projection in the SOL. + struct gkyl_fem_parproj *fem_parproj_core; // FEM projection in the core. - struct gkyl_deflated_fem_poisson *fem_poisson_deflated; // poisson solver which solves - struct gkyl_fem_poisson_perp *fem_poisson_perp; // poisson solver which solves - // - nabla . (epsilon * nabla phi) - kSq * phi = rho + struct gkyl_fem_poisson_perp *fem_poisson_perp; // Solves - nabla . (epsilon * nabla phi) - kSq * phi = rho. // Objects needed for FLR effects. - bool use_flr; - void (*invert_flr)(gkyl_gyrokinetic_app *app, struct gk_field *field, struct gkyl_array *phi); + bool use_flr; // Whether to apply FLR effects. + void (*invert_flr)(gkyl_gyrokinetic_app *app, struct gk_field *field, struct gkyl_array *phi); // Function inverting FLR operator. struct gkyl_array *flr_rhoSq_sum; // Laplacian weight in FLR operator. struct gkyl_array *flr_kSq; // Field multiplying phi in FLR operator. struct gkyl_deflated_fem_poisson *flr_op; // Helmholtz solver to invert FLR operator. - struct gkyl_array_integrate *calc_em_energy; + struct gkyl_array_integrate *calc_em_energy; // Operator computing EM energy. double *em_energy_red, *em_energy_red_global; // memory for use in GPU reduction of EM energy gkyl_dynvec integ_energy; // integrated energy components bool is_first_energy_write_call; // flag for energy dynvec written first time @@ -1284,21 +1280,23 @@ struct gk_field { void (*calc_energy_dt_func)(gkyl_gyrokinetic_app *app, const struct gk_field *field, double dt, double *energy_reduced); // Objects used in IWL simulations and TS BCs. - struct gkyl_bc_twistshift *bc_ts_lo; // TS BC updater. - // Objects used by the skin surface to ghost (SSFG) operator. - struct gkyl_skin_surf_from_ghost *ssfg_z_lo; + struct gkyl_bc_twistshift *bc_ts_lo; // Fills lower core z-ghost with TS BC. + struct gkyl_bc_basic_gyrokinetic *gfss_bc_op_core_up; // Fills upper core z-ghost with skin boundary value. + struct gkyl_array *bc_buffer; // Buffer for bc_basic. - // Pointer to functions for the twist-and-shift BCs. - void (*enforce_parallel_bc_func) (const gkyl_gyrokinetic_app *app, struct gk_field *field, struct gkyl_array *finout); - + // Pointer to functions that make phi continuous along z. + void (*fem_projection_par_rho_func)(gkyl_gyrokinetic_app *app, struct gk_field *field, + struct gkyl_array *arr_dg, struct gkyl_array *arr_fem); + void (*fem_projection_par_phi_func)(gkyl_gyrokinetic_app *app, struct gk_field *field, + struct gkyl_array *arr_dg, struct gkyl_array *arr_fem); // Pointer to function to calculate the potential. - void (*rhs_phi_func) (struct gkyl_gyrokinetic_app *app, struct gk_field *field); - - void (*calc_energy_func) (gkyl_gyrokinetic_app *app, const struct gk_field *field, double tm); - - void (*accumulate_rhoc_func) (gkyl_gyrokinetic_app *app, struct gk_field *field, struct gk_species *s, struct gkyl_array **bflux); - - void (*solver_release_func)(const struct gkyl_gyrokinetic_app* app, struct gk_field *field); + void (*rhs_phi_func)(struct gkyl_gyrokinetic_app *app, struct gk_field *field); + // Pointer to function that calculates the field energy. + void (*calc_energy_func)(gkyl_gyrokinetic_app *app, const struct gk_field *field, double tm); + // Pointer to function that accumulates the charge density. + void (*accumulate_rhoc_func)(gkyl_gyrokinetic_app *app, struct gk_field *field, struct gk_species *s, struct gkyl_array **bflux); + // Pointer to function that frees memory. + void (*release_func)(const struct gkyl_gyrokinetic_app* app, struct gk_field *field); }; // Gyrokinetic object: used as opaque pointer in user code. @@ -1322,24 +1320,29 @@ struct gkyl_gyrokinetic_app { struct gkyl_range local, local_ext; // Local, local-ext conf-space ranges. struct gkyl_range global, global_ext; // Global, global-ext conf-space ranges. // 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]; + struct gkyl_range local_lower_skin[GKYL_MAX_DIM]; + struct gkyl_range local_lower_ghost[GKYL_MAX_DIM]; + struct gkyl_range local_upper_skin[GKYL_MAX_DIM]; + struct gkyl_range local_upper_ghost[GKYL_MAX_DIM]; // Global skin/ghost ranges, valid (i.e. volume>0) in ranks abutting boundaries. struct gkyl_range global_lower_skin[GKYL_MAX_DIM]; struct gkyl_range global_lower_ghost[GKYL_MAX_DIM]; struct gkyl_range global_upper_skin[GKYL_MAX_DIM]; struct gkyl_range global_upper_ghost[GKYL_MAX_DIM]; - // Core and SOL ranges for IWL sims. + // Core and SOL ranges for sims with a LCFS. struct gkyl_range global_core, global_ext_core, global_sol, global_ext_sol; + struct gkyl_range global_par_ext_core; // Core range extended in parallel direction. + struct gkyl_range global_lower_skin_par_core, global_lower_ghost_par_core; + struct gkyl_range global_upper_skin_par_core, global_upper_ghost_par_core; + struct gkyl_range global_lower_skin_par_sol , global_lower_ghost_par_sol; + struct gkyl_range global_upper_skin_par_sol , global_upper_ghost_par_sol; struct gkyl_range local_core, local_ext_core, local_sol, local_ext_sol; - struct gkyl_range lower_skin_par_core, lower_ghost_par_core; - struct gkyl_range upper_skin_par_core, upper_ghost_par_core; - struct gkyl_range lower_skin_par_sol , lower_ghost_par_sol; - struct gkyl_range upper_skin_par_sol , upper_ghost_par_sol; struct gkyl_range local_par_ext_core; // Core range extended in parallel direction. + struct gkyl_range local_lower_skin_par_core, local_lower_ghost_par_core; + struct gkyl_range local_upper_skin_par_core, local_upper_ghost_par_core; + struct gkyl_range local_lower_skin_par_sol , local_lower_ghost_par_sol; + struct gkyl_range local_upper_skin_par_sol , local_upper_ghost_par_sol; struct gkyl_basis basis; // conf-space basis diff --git a/gyrokinetic/apps/gyrokinetic.c b/gyrokinetic/apps/gyrokinetic.c index b728aaef51..69b4397075 100644 --- a/gyrokinetic/apps/gyrokinetic.c +++ b/gyrokinetic/apps/gyrokinetic.c @@ -103,7 +103,7 @@ gkyl_gyrokinetic_app_new_geom(struct gkyl_gk *gk) // The value 1.7 here is based on figure 2.4a in Durran's "Numerical methods // for fluid dynamics" textbook for a purely oscillatory mode and RK3. - double cfl_frac_omegaH = gk->cfl_frac_omegaH == 0 ? 1.7 : gk->cfl_frac_omegaH; + double cfl_frac_omegaH = fabs(gk->cfl_frac_omegaH) < 1e-16 ? 1.7 : gk->cfl_frac_omegaH; app->cfl_omegaH = cfl_frac_omegaH; #ifdef GKYL_HAVE_CUDA @@ -216,22 +216,16 @@ gkyl_gyrokinetic_app_new_geom(struct gkyl_gk *gk) } } - // Local skin and ghost ranges for configuration space fields. + // Skin and ghost ranges for configuration space fields. for (int dir=0; dirlower_skin[dir], &app->lower_ghost[dir], dir, GKYL_LOWER_EDGE, &app->local_ext, ghost); - gkyl_skin_ghost_ranges(&app->upper_skin[dir], &app->upper_ghost[dir], dir, GKYL_UPPER_EDGE, &app->local_ext, ghost); - } - // Global skin and ghost ranges, only valid (i.e. volume>0) in ranges - // abutting boundaries. - for (int dir=0; dirglobal_lower_skin[dir], &app->global_lower_ghost[dir], dir, GKYL_LOWER_EDGE, &app->global_ext, ghost); - gkyl_skin_ghost_ranges(&app->global_upper_skin[dir], &app->global_upper_ghost[dir], dir, GKYL_UPPER_EDGE, &app->global_ext, ghost); - - gkyl_sub_range_intersect(&app->global_lower_skin[dir], &app->local_ext, &app->global_lower_skin[dir]); - gkyl_sub_range_intersect(&app->global_upper_skin[dir], &app->local_ext, &app->global_upper_skin[dir]); - - gkyl_sub_range_intersect(&app->global_lower_ghost[dir], &app->local_ext, &app->global_lower_ghost[dir]); - gkyl_sub_range_intersect(&app->global_upper_ghost[dir], &app->local_ext, &app->global_upper_ghost[dir]); + gkyl_skin_ghost_ranges(&app->local_lower_skin[dir], &app->local_lower_ghost[dir], + dir, GKYL_LOWER_EDGE, &app->local_ext, ghost); + gkyl_skin_ghost_ranges(&app->local_upper_skin[dir], &app->local_upper_ghost[dir], + dir, GKYL_UPPER_EDGE, &app->local_ext, ghost); + gkyl_skin_ghost_ranges(&app->global_lower_skin[dir], &app->global_lower_ghost[dir], + dir, GKYL_LOWER_EDGE, &app->global_ext, ghost); + gkyl_skin_ghost_ranges(&app->global_upper_skin[dir], &app->global_upper_ghost[dir], + dir, GKYL_UPPER_EDGE, &app->global_ext, ghost); } int comm_sz; @@ -408,62 +402,84 @@ gkyl_gyrokinetic_app_new_geom(struct gkyl_gk *gk) gkyl_array_release(tmp); if (gk->geometry.has_LCFS) { - // IWL simulation. Create core and SOL global ranges. + // Simulation spans the last-closed flux surface (LCFS). Create core and SOL global ranges. int idx_LCFS_lo = app->gk_geom->idx_LCFS_lo; // Length of lower and upper x ranges (one is core, the other SOL). int len_lo = idx_LCFS_lo; int len_up = app->global.upper[0]-len_lo; // Lower and upper x ranges. - struct gkyl_range *global_lo_r, *local_lo_r, *global_ext_lo_r, *local_ext_lo_r; - struct gkyl_range *global_up_r, *local_up_r, *global_ext_up_r, *local_ext_up_r; - struct gkyl_range *lower_skin_par_lo_r, *upper_skin_par_lo_r, *lower_ghost_par_lo_r, *upper_ghost_par_lo_r; - struct gkyl_range *lower_skin_par_up_r, *upper_skin_par_up_r, *lower_ghost_par_up_r, *upper_ghost_par_up_r; + struct gkyl_range *global_lo_r, *global_up_r, *global_ext_lo_r, *global_ext_up_r; + struct gkyl_range *global_lower_skin_par_lo_r , *global_upper_skin_par_lo_r , + *global_lower_ghost_par_lo_r, *global_upper_ghost_par_lo_r; + struct gkyl_range *global_lower_skin_par_up_r , *global_upper_skin_par_up_r , + *global_lower_ghost_par_up_r, *global_upper_ghost_par_up_r; + struct gkyl_range *local_lo_r, *local_up_r, *local_ext_lo_r, *local_ext_up_r; + struct gkyl_range *local_lower_skin_par_lo_r , *local_upper_skin_par_lo_r , + *local_lower_ghost_par_lo_r, *local_upper_ghost_par_lo_r; + struct gkyl_range *local_lower_skin_par_up_r , *local_upper_skin_par_up_r , + *local_lower_ghost_par_up_r, *local_upper_ghost_par_up_r; if (app->gk_geom->geqdsk_sign_convention == 0) { // x increases towards SOL. - global_lo_r = &app->global_core; - local_lo_r = &app->local_core; - global_ext_lo_r = &app->global_ext_core; - local_ext_lo_r = &app->local_ext_core; - lower_skin_par_lo_r = &app->lower_skin_par_core; - upper_skin_par_lo_r = &app->upper_skin_par_core; - lower_ghost_par_lo_r = &app->lower_ghost_par_core; - upper_ghost_par_lo_r = &app->upper_ghost_par_core; - global_up_r = &app->global_sol; - local_up_r = &app->local_sol; - global_ext_up_r = &app->global_ext_sol; - local_ext_up_r = &app->local_ext_sol; - lower_skin_par_up_r = &app->lower_skin_par_sol; - upper_skin_par_up_r = &app->upper_skin_par_sol; - lower_ghost_par_up_r = &app->lower_ghost_par_sol; - upper_ghost_par_up_r = &app->upper_ghost_par_sol; + global_lo_r = &app->global_core; + global_up_r = &app->global_sol; + global_ext_lo_r = &app->global_ext_core; + global_ext_up_r = &app->global_ext_sol; + global_lower_skin_par_lo_r = &app->global_lower_skin_par_core; + global_lower_ghost_par_lo_r = &app->global_lower_ghost_par_core; + global_lower_skin_par_up_r = &app->global_lower_skin_par_sol; + global_lower_ghost_par_up_r = &app->global_lower_ghost_par_sol; + global_upper_skin_par_lo_r = &app->global_upper_skin_par_core; + global_upper_ghost_par_lo_r = &app->global_upper_ghost_par_core; + global_upper_skin_par_up_r = &app->global_upper_skin_par_sol; + global_upper_ghost_par_up_r = &app->global_upper_ghost_par_sol; + local_lo_r = &app->local_core; + local_up_r = &app->local_sol; + local_ext_lo_r = &app->local_ext_core; + local_ext_up_r = &app->local_ext_sol; + local_lower_skin_par_lo_r = &app->local_lower_skin_par_core; + local_lower_ghost_par_lo_r = &app->local_lower_ghost_par_core; + local_lower_skin_par_up_r = &app->local_lower_skin_par_sol; + local_lower_ghost_par_up_r = &app->local_lower_ghost_par_sol; + local_upper_skin_par_lo_r = &app->local_upper_skin_par_core; + local_upper_ghost_par_lo_r = &app->local_upper_ghost_par_core; + local_upper_skin_par_up_r = &app->local_upper_skin_par_sol; + local_upper_ghost_par_up_r = &app->local_upper_ghost_par_sol; } else { // x increases towards core. - global_lo_r = &app->global_sol; - local_lo_r = &app->local_sol; - global_ext_lo_r = &app->global_ext_sol; - local_ext_lo_r = &app->local_ext_sol; - lower_skin_par_lo_r = &app->lower_skin_par_sol; - upper_skin_par_lo_r = &app->upper_skin_par_sol; - lower_ghost_par_lo_r = &app->lower_ghost_par_sol; - upper_ghost_par_lo_r = &app->upper_ghost_par_sol; - global_up_r = &app->global_core; - local_up_r = &app->local_core; - global_ext_up_r = &app->global_ext_core; - local_ext_up_r = &app->local_ext_core; - lower_skin_par_up_r = &app->lower_skin_par_core; - upper_skin_par_up_r = &app->upper_skin_par_core; - lower_ghost_par_up_r = &app->lower_ghost_par_core; - upper_ghost_par_up_r = &app->upper_ghost_par_core; + global_lo_r = &app->global_sol; + global_up_r = &app->global_core; + global_ext_lo_r = &app->global_ext_sol; + global_ext_up_r = &app->global_ext_core; + global_lower_skin_par_lo_r = &app->global_lower_skin_par_sol; + global_lower_ghost_par_lo_r = &app->global_lower_ghost_par_sol; + global_lower_skin_par_up_r = &app->global_lower_skin_par_core; + global_lower_ghost_par_up_r = &app->global_lower_ghost_par_core; + global_upper_skin_par_lo_r = &app->global_upper_skin_par_sol; + global_upper_ghost_par_lo_r = &app->global_upper_ghost_par_sol; + global_upper_skin_par_up_r = &app->global_upper_skin_par_core; + global_upper_ghost_par_up_r = &app->global_upper_ghost_par_core; + local_lo_r = &app->local_sol; + local_up_r = &app->local_core; + local_ext_lo_r = &app->local_ext_sol; + local_ext_up_r = &app->local_ext_core; + local_lower_skin_par_lo_r = &app->local_lower_skin_par_sol; + local_lower_ghost_par_lo_r = &app->local_lower_ghost_par_sol; + local_lower_skin_par_up_r = &app->local_lower_skin_par_core; + local_lower_ghost_par_up_r = &app->local_lower_ghost_par_core; + local_upper_skin_par_lo_r = &app->local_upper_skin_par_sol; + local_upper_ghost_par_lo_r = &app->local_upper_ghost_par_sol; + local_upper_skin_par_up_r = &app->local_upper_skin_par_core; + local_upper_ghost_par_up_r = &app->local_upper_ghost_par_core; } - // Global and local lower and upper x ranges. + // Lower and upper x ranges. gkyl_range_shorten_from_above(global_lo_r, &app->global, 0, len_lo); gkyl_range_shorten_from_below(global_up_r, &app->global, 0, len_up); gkyl_range_shorten_from_above(local_lo_r, &app->local, 0, len_lo); gkyl_range_shorten_from_below(local_up_r, &app->local, 0, len_up); - // Extended global and local lower and upper x ranges. + // Extended lower and upper x ranges. int len_lo_ext = idx_LCFS_lo+1; int len_up_ext = app->global_ext.upper[0]-len_lo; gkyl_range_shorten_from_above(global_ext_lo_r, &app->global_ext, 0, len_lo_ext); @@ -471,22 +487,38 @@ gkyl_gyrokinetic_app_new_geom(struct gkyl_gk *gk) gkyl_range_shorten_from_above(local_ext_lo_r, &app->local_ext, 0, len_lo_ext); gkyl_range_shorten_from_below(local_ext_up_r, &app->local_ext, 0, len_up_ext); - // Create core and SOL parallel skin and ghost ranges. + // Parallel skin and ghost ranges, limited to the lower and upper x range. int par_dir = app->cdim-1; for (int e=0; e<2; e++) { - gkyl_range_shorten_from_above(e==0? lower_skin_par_lo_r : upper_skin_par_lo_r, - e==0? &app->lower_skin[par_dir] : &app->upper_skin[par_dir], 0, len_lo); - gkyl_range_shorten_from_above(e==0? lower_ghost_par_lo_r : upper_ghost_par_lo_r, - e==0? &app->lower_ghost[par_dir] : &app->upper_ghost[par_dir], 0, len_lo); - gkyl_range_shorten_from_below(e==0? lower_skin_par_up_r : upper_skin_par_up_r, - e==0? &app->lower_skin[par_dir] : &app->upper_skin[par_dir], 0, len_up); - gkyl_range_shorten_from_below(e==0? lower_ghost_par_up_r : upper_ghost_par_up_r, - e==0? &app->lower_ghost[par_dir] : &app->upper_ghost[par_dir], 0, len_up); + gkyl_range_shorten_from_above(e==0? global_lower_skin_par_lo_r : global_upper_skin_par_lo_r, + e==0? &app->global_lower_skin[par_dir] : &app->global_upper_skin[par_dir], 0, len_lo); + gkyl_range_shorten_from_above(e==0? global_lower_ghost_par_lo_r : global_upper_ghost_par_lo_r, + e==0? &app->global_lower_ghost[par_dir] : &app->global_upper_ghost[par_dir], 0, len_lo); + gkyl_range_shorten_from_below(e==0? global_lower_skin_par_up_r : global_upper_skin_par_up_r, + e==0? &app->global_lower_skin[par_dir] : &app->global_upper_skin[par_dir], 0, len_up); + gkyl_range_shorten_from_below(e==0? global_lower_ghost_par_up_r : global_upper_ghost_par_up_r, + e==0? &app->global_lower_ghost[par_dir] : &app->global_upper_ghost[par_dir], 0, len_up); + gkyl_range_shorten_from_above(e==0? local_lower_skin_par_lo_r : local_upper_skin_par_lo_r, + e==0? &app->local_lower_skin[par_dir] : &app->local_upper_skin[par_dir], 0, len_lo); + gkyl_range_shorten_from_above(e==0? local_lower_ghost_par_lo_r : local_upper_ghost_par_lo_r, + e==0? &app->local_lower_ghost[par_dir] : &app->local_upper_ghost[par_dir], 0, len_lo); + gkyl_range_shorten_from_below(e==0? local_lower_skin_par_up_r : local_upper_skin_par_up_r, + e==0? &app->local_lower_skin[par_dir] : &app->local_upper_skin[par_dir], 0, len_up); + gkyl_range_shorten_from_below(e==0? local_lower_ghost_par_up_r : local_upper_ghost_par_up_r, + e==0? &app->local_lower_ghost[par_dir] : &app->local_upper_ghost[par_dir], 0, len_up); } - // Create a core local range, extended in the BC dir. + // Core range extended in the parallel direction. int ndim = app->cdim; int lower_bcdir_ext[ndim], upper_bcdir_ext[ndim]; + for (int i=0; iglobal_core.lower[i]; + upper_bcdir_ext[i] = app->global_core.upper[i]; + } + lower_bcdir_ext[par_dir] = app->global_ext_core.lower[par_dir]; + upper_bcdir_ext[par_dir] = app->global_ext_core.upper[par_dir]; + gkyl_sub_range_init(&app->global_par_ext_core, &app->global_ext_core, lower_bcdir_ext, upper_bcdir_ext); + for (int i=0; ilocal_core.lower[i]; upper_bcdir_ext[i] = app->local_core.upper[i]; @@ -1012,7 +1044,7 @@ gyrokinetic_app_geometry_copy_and_write_surf(gkyl_gyrokinetic_app* app, struct g gkyl_array_copy(arr_host, arr); gkyl_array_set_offset(arr_host_doubled, 1.0, arr_host, 0); - gkyl_array_copy_range_to_range(arr_host, arr_host, &app->upper_skin[dir], &app->upper_ghost[dir]); + gkyl_array_copy_range_to_range(arr_host, arr_host, &app->local_upper_skin[dir], &app->local_upper_ghost[dir]); gkyl_array_set_offset(arr_host_doubled, 1.0, arr_host, arr_host->ncomp); const char *fmt = "%s-%s_dir%d.gkyl"; @@ -1047,6 +1079,7 @@ gkyl_gyrokinetic_app_write_geometry(gkyl_gyrokinetic_app* app, struct gkyl_gk_ge gyrokinetic_app_geometry_copy_and_write(app, app->gk_geom->geo_corn.mc2p , arr_ho3, "mapc2p", mt); gyrokinetic_app_geometry_copy_and_write(app, app->gk_geom->geo_corn.mc2nu_pos , arr_ho3, "mc2nu_pos", mt); gyrokinetic_app_geometry_copy_and_write(app, app->gk_geom->geo_corn.bmag , arr_ho1, "bmag_corn", mt); + gyrokinetic_app_geometry_copy_and_write(app, app->gk_geom->geo_corn.bmag_inv , arr_ho1, "bmag_inv_corn", mt); if (app->cdim < 3) { if (geometry_inp->geometry_id == GKYL_GEOMETRY_MIRROR || geometry_inp->geometry_id == GKYL_GEOMETRY_TOKAMAK) gyrokinetic_app_geometry_copy_and_write(app, app->gk_geom->geo_corn.mc2p_deflated, arr_hocdim, "mapc2p_deflated", mt); @@ -1068,13 +1101,12 @@ gkyl_gyrokinetic_app_write_geometry(gkyl_gyrokinetic_app* app, struct gkyl_gk_ge gyrokinetic_app_geometry_copy_and_write(app, app->gk_geom->geo_int.cmag , arr_ho1, "cmag", mt); gyrokinetic_app_geometry_copy_and_write(app, app->gk_geom->geo_int.jacobtot , arr_ho1, "jacobtot", mt); gyrokinetic_app_geometry_copy_and_write(app, app->gk_geom->geo_int.jacobtot_inv, arr_ho1, "jacobtot_inv", mt); - gyrokinetic_app_geometry_copy_and_write(app, app->gk_geom->geo_int.bmag_inv , arr_ho1, "bmag_inv", mt); - gyrokinetic_app_geometry_copy_and_write(app, app->gk_geom->geo_int.bmag_inv_sq , arr_ho1, "bmag_inv_sq", mt); gyrokinetic_app_geometry_copy_and_write(app, app->gk_geom->geo_int.gxxj , arr_ho1, "gxxj", mt); gyrokinetic_app_geometry_copy_and_write(app, app->gk_geom->geo_int.gxyj , arr_ho1, "gxyj", mt); gyrokinetic_app_geometry_copy_and_write(app, app->gk_geom->geo_int.gyyj , arr_ho1, "gyyj", mt); gyrokinetic_app_geometry_copy_and_write(app, app->gk_geom->geo_int.gxzj , arr_ho1, "gxzj", mt); gyrokinetic_app_geometry_copy_and_write(app, app->gk_geom->geo_int.eps2 , arr_ho1, "eps2", mt); + gyrokinetic_app_geometry_copy_and_write(app, app->gk_geom->geo_int.qprofile , arr_ho1, "qprofile", mt); gyrokinetic_app_geometry_copy_and_write(app, app->gk_geom->geo_int.rtg33inv, arr_ho1, "rtg33inv", mt); gyrokinetic_app_geometry_copy_and_write(app, app->gk_geom->geo_int.dualcurlbhatoverB, arr_ho3, "dualcurlbhatoverB", mt); @@ -2629,8 +2661,9 @@ gyrokinetic_app_geometry_read_and_copy_surf(gkyl_gyrokinetic_app* app, struct gk rstat.io_status = gkyl_comm_array_read(app->comm, &app->grid, &app->local, arr_host_doubled, fileNm.str); gkyl_array_set_offset_range(arr_host, 1.0, arr_host_doubled, 0, &app->local); - gkyl_array_copy_range_to_range(arr_host_doubled, arr_host_doubled, &app->upper_ghost[dir], &app->upper_skin[dir]); - gkyl_array_set_offset_range(arr_host, 1.0, arr_host_doubled, arr_host->ncomp, &app->upper_ghost[dir]); + gkyl_array_copy_range_to_range(arr_host_doubled, arr_host_doubled, + &app->local_upper_ghost[dir], &app->local_upper_skin[dir]); + gkyl_array_set_offset_range(arr_host, 1.0, arr_host_doubled, arr_host->ncomp, &app->local_upper_ghost[dir]); gkyl_array_copy(arr, arr_host); } @@ -2690,6 +2723,7 @@ gkyl_gyrokinetic_app_read_geometry(gkyl_gyrokinetic_app* app) gyrokinetic_app_geometry_read_and_copy(app, app->gk_geom->geo_corn.mc2p , arr_ho3, "mapc2p"); gyrokinetic_app_geometry_read_and_copy(app, app->gk_geom->geo_corn.mc2nu_pos , arr_ho3, "mc2nu_pos"); gyrokinetic_app_geometry_read_and_copy(app, app->gk_geom->geo_corn.bmag , arr_ho1, "bmag_corn"); + gyrokinetic_app_geometry_read_and_copy(app, app->gk_geom->geo_corn.bmag_inv , arr_ho1, "bmag_inv_corn"); gyrokinetic_app_geometry_read_and_copy(app, app->gk_geom->geo_int.bmag , arr_ho1, "bmag"); gyrokinetic_app_geometry_read_and_copy(app, app->gk_geom->geo_int.g_ij , arr_ho6, "g_ij"); gyrokinetic_app_geometry_read_and_copy(app, app->gk_geom->geo_int.dxdz , arr_ho9, "dxdz"); @@ -2704,13 +2738,12 @@ gkyl_gyrokinetic_app_read_geometry(gkyl_gyrokinetic_app* app) gyrokinetic_app_geometry_read_and_copy(app, app->gk_geom->geo_int.cmag , arr_ho1, "cmag"); gyrokinetic_app_geometry_read_and_copy(app, app->gk_geom->geo_int.jacobtot , arr_ho1, "jacobtot"); gyrokinetic_app_geometry_read_and_copy(app, app->gk_geom->geo_int.jacobtot_inv, arr_ho1, "jacobtot_inv"); - gyrokinetic_app_geometry_read_and_copy(app, app->gk_geom->geo_int.bmag_inv , arr_ho1, "bmag_inv"); - gyrokinetic_app_geometry_read_and_copy(app, app->gk_geom->geo_int.bmag_inv_sq , arr_ho1, "bmag_inv_sq"); gyrokinetic_app_geometry_read_and_copy(app, app->gk_geom->geo_int.gxxj , arr_ho1, "gxxj"); gyrokinetic_app_geometry_read_and_copy(app, app->gk_geom->geo_int.gxyj , arr_ho1, "gxyj"); gyrokinetic_app_geometry_read_and_copy(app, app->gk_geom->geo_int.gyyj , arr_ho1, "gyyj"); gyrokinetic_app_geometry_read_and_copy(app, app->gk_geom->geo_int.gxzj , arr_ho1, "gxzj"); gyrokinetic_app_geometry_read_and_copy(app, app->gk_geom->geo_int.eps2 , arr_ho1, "eps2"); + gyrokinetic_app_geometry_read_and_copy(app, app->gk_geom->geo_int.qprofile , arr_ho1, "qprofile"); gyrokinetic_app_geometry_read_and_copy(app, app->gk_geom->geo_int.rtg33inv , arr_ho1, "rtg33inv"); gyrokinetic_app_geometry_read_and_copy(app, app->gk_geom->geo_int.dualcurlbhatoverB, arr_ho3, "dualcurlbhatoverB"); @@ -3047,6 +3080,14 @@ gkyl_gyrokinetic_app_release(gkyl_gyrokinetic_app* app) gkyl_free(app); } +void +gkyl_gyrokinetic_app_reset_cfl_frac_omegaH(gkyl_gyrokinetic_app* app, double tm, + double cfl_frac_omegaH) +{ + double new_cfl_frac_omegaH = fabs(cfl_frac_omegaH) < 1e-16 ? 1.7 : cfl_frac_omegaH; + app->cfl_omegaH = new_cfl_frac_omegaH; +} + void gkyl_gyrokinetic_app_reset_species_fdot_multiplier(gkyl_gyrokinetic_app* app, double tm, const char* species_name, struct gkyl_gyrokinetic_fdot_multiplier fdot_mult_inp) diff --git a/gyrokinetic/apps/gyrokinetic_lw.c b/gyrokinetic/apps/gyrokinetic_lw.c index eb6cfe48b8..6f32ac1ebc 100644 --- a/gyrokinetic/apps/gyrokinetic_lw.c +++ b/gyrokinetic/apps/gyrokinetic_lw.c @@ -33,7 +33,8 @@ static const struct gkyl_str_int_pair parproj_type[] = { { "None", GKYL_FEM_PARPROJ_NONE }, { "Periodic", GKYL_FEM_PARPROJ_PERIODIC }, - { "Dirichlet", GKYL_FEM_PARPROJ_DIRICHLET }, + { "DirichletGhost", GKYL_FEM_PARPROJ_DIRICHLET_GHOST }, + { "DirichletSkin", GKYL_FEM_PARPROJ_DIRICHLET_SKIN }, { 0, 0 } }; diff --git a/gyrokinetic/apps/gyrokinetic_multib.c b/gyrokinetic/apps/gyrokinetic_multib.c index 1d6df60c43..73544aed7e 100644 --- a/gyrokinetic/apps/gyrokinetic_multib.c +++ b/gyrokinetic/apps/gyrokinetic_multib.c @@ -787,8 +787,8 @@ and the maximum number of cuts in a block is %d\n\n", tot_max[0], num_ranks, tot struct gkyl_gyrokinetic_app *sbapp = mbapp->singleb_apps[b]; struct gk_geom_surf geo_surf = sbapp->gk_geom->geo_surf[d]; jacs[b] = geo_surf.jacobgeo_ratio; - gkyl_array_copy_range(jacs[b], geo_surf.jacobgeo, &sbapp->lower_skin[d]); - gkyl_array_copy_range_to_range(jacs[b], geo_surf.jacobgeo, &sbapp->upper_skin[d], &sbapp->upper_ghost[d]); + gkyl_array_copy_range(jacs[b], geo_surf.jacobgeo, &sbapp->local_lower_skin[d]); + gkyl_array_copy_range_to_range(jacs[b], geo_surf.jacobgeo, &sbapp->local_upper_skin[d], &sbapp->local_upper_ghost[d]); } gkyl_multib_comm_conn_array_transfer(mbapp->comm, mbapp->num_local_blocks, mbapp->local_blocks, mbapp->mbcc_sync_conf->send, mbapp->mbcc_sync_conf->recv, jacs, jacs); @@ -799,17 +799,17 @@ and the maximum number of cuts in a block is %d\n\n", tot_max[0], num_ranks, tot struct gkyl_array *jacgeo = mkarr(mbapp->use_gpu, geo_surf.jacobgeo_ratio->ncomp, geo_surf.jacobgeo_ratio->size); // Compute 1/jacobgeo in ghost cells. - gkyl_array_set_range(jacgeo, 1.0, geo_surf.jacobgeo_ratio, &sbapp->lower_ghost[d]); - gkyl_array_set_range(jacgeo, 1.0, geo_surf.jacobgeo_ratio, &sbapp->upper_ghost[d]); - gkyl_dg_inv_op_range(sbapp->gk_geom->surf_basis, 0, geo_surf.jacobgeo_ratio, 0, jacgeo, &sbapp->lower_ghost[d]); - gkyl_dg_inv_op_range(sbapp->gk_geom->surf_basis, 0, geo_surf.jacobgeo_ratio, 0, jacgeo, &sbapp->upper_ghost[d]); + gkyl_array_set_range(jacgeo, 1.0, geo_surf.jacobgeo_ratio, &sbapp->local_lower_ghost[d]); + gkyl_array_set_range(jacgeo, 1.0, geo_surf.jacobgeo_ratio, &sbapp->local_upper_ghost[d]); + gkyl_dg_inv_op_range(sbapp->gk_geom->surf_basis, 0, geo_surf.jacobgeo_ratio, 0, jacgeo, &sbapp->local_lower_ghost[d]); + gkyl_dg_inv_op_range(sbapp->gk_geom->surf_basis, 0, geo_surf.jacobgeo_ratio, 0, jacgeo, &sbapp->local_upper_ghost[d]); // Multiply by the Jacobian of this block. - gkyl_array_copy_range_to_range(jacgeo, geo_surf.jacobgeo, &sbapp->lower_ghost[d], &sbapp->lower_skin[d]); - gkyl_array_copy_range(jacgeo, geo_surf.jacobgeo, &sbapp->upper_ghost[d]); + gkyl_array_copy_range_to_range(jacgeo, geo_surf.jacobgeo, &sbapp->local_lower_ghost[d], &sbapp->local_lower_skin[d]); + gkyl_array_copy_range(jacgeo, geo_surf.jacobgeo, &sbapp->local_upper_ghost[d]); gkyl_dg_mul_op_range(sbapp->gk_geom->surf_basis, 0, geo_surf.jacobgeo_ratio, - 0, jacgeo, 0, geo_surf.jacobgeo_ratio, &sbapp->lower_ghost[d]); + 0, jacgeo, 0, geo_surf.jacobgeo_ratio, &sbapp->local_lower_ghost[d]); gkyl_dg_mul_op_range(sbapp->gk_geom->surf_basis, 0, geo_surf.jacobgeo_ratio, - 0, jacgeo, 0, geo_surf.jacobgeo_ratio, &sbapp->upper_ghost[d]); + 0, jacgeo, 0, geo_surf.jacobgeo_ratio, &sbapp->local_upper_ghost[d]); // Set the ratio to 1 in the interior (shouldn't be in use). gkyl_array_clear_range(geo_surf.jacobgeo_ratio, 0.0, &sbapp->local); gkyl_array_shiftc_range(geo_surf.jacobgeo_ratio, pow(sqrt(2.0),sbapp->cdim), 0, &sbapp->local); diff --git a/gyrokinetic/creg/rt_gk_d3d_iwl_3x2v_p1.c b/gyrokinetic/creg/rt_gk_d3d_iwl_3x2v_p1.c index 8cb8a4fe5d..895c6014e8 100644 --- a/gyrokinetic/creg/rt_gk_d3d_iwl_3x2v_p1.c +++ b/gyrokinetic/creg/rt_gk_d3d_iwl_3x2v_p1.c @@ -32,6 +32,7 @@ struct gk_app_ctx { double x_LCFS; // Radial location of the last closed flux surface. double x_inner; // Domain size inside the separatrix. + double side_wall_bias; // Potential of the side wall. // Plasma parameters. double me; double qe; double mi; double qi; @@ -481,6 +482,8 @@ create_ctx(void) double a_mid = a_shift<1e-13? R_LCFSmid-R_axis : R_axis/a_shift - sqrt(R_axis*(R_axis - 2*a_shift*R_LCFSmid + 2*a_shift*R_axis))/a_shift; + double side_wall_bias = 0.0; // Potential of the side wall. + double r0 = R0-R_axis; // Minor radius of the simulation box [m]. double B0 = B_axis*(R_axis/R0); // Magnetic field magnitude in the simulation box [T]. double kappa = 1.35; // Elongation (=1 for no elongation). @@ -563,6 +566,7 @@ create_ctx(void) .kappa = kappa, .delta = delta, .q0 = q0, + .side_wall_bias = side_wall_bias, .Lx = Lx, .Ly = Ly, .Lz = Lz, @@ -812,15 +816,22 @@ main(int argc, char **argv) }, }; - struct gkyl_poisson_bias_plane target_corner_bc = { - .dir = 0, // Direction perpendicular to the plane. - .loc = ctx.x_LCFS, // Location of the plane in the 'dir' dimension. - .val = 0.0, // Biasing value. + struct gkyl_poisson_bias_line target_corner_bcs[] = { + { + .perp_dirs = {0, 2}, // Directions perpendicular to line. + .perp_coords = {ctx.x_LCFS, ctx.z_min}, // Coordinates of the line in perpendicular directions. + .val = ctx.side_wall_bias, // Biasing value. + }, + { + .perp_dirs = {0, 2}, // Directions perpendicular to line. + .perp_coords = {ctx.x_LCFS, ctx.z_max}, // Coordinates of the line in perpendicular directions. + .val = ctx.side_wall_bias, // Biasing value. + }, }; - - struct gkyl_poisson_bias_plane_list bias_plane_list = { - .num_bias_plane = 1, - .bp = &target_corner_bc, + + struct gkyl_poisson_bias_line_list bias_line_list = { + .num_bias_line = 2, + .bl = target_corner_bcs, }; // field @@ -828,9 +839,9 @@ main(int argc, char **argv) .gkfield_id = GKYL_GK_FIELD_ES_IWL, .poisson_bcs = { { .dir = 0, .edge = GKYL_LOWER_EDGE, .type = GKYL_BC_GK_FIELD_DIRICHLET, .value = {0.0} }, - { .dir = 0, .edge = GKYL_UPPER_EDGE, .type = GKYL_BC_GK_FIELD_DIRICHLET, .value = {0.0} }, + { .dir = 0, .edge = GKYL_UPPER_EDGE, .type = GKYL_BC_GK_FIELD_DIRICHLET, .value = {ctx.side_wall_bias} }, }, - .bias_plane_list = &bias_plane_list, + .bias_line_list = &bias_line_list, .time_rate_diagnostics = true, }; diff --git a/gyrokinetic/creg/rt_gk_tcv_iwl_adapt_source_2x2v_p1.c b/gyrokinetic/creg/rt_gk_tcv_iwl_adapt_source_2x2v_p1.c index 956ad24837..5b63e3eedf 100644 --- a/gyrokinetic/creg/rt_gk_tcv_iwl_adapt_source_2x2v_p1.c +++ b/gyrokinetic/creg/rt_gk_tcv_iwl_adapt_source_2x2v_p1.c @@ -735,15 +735,22 @@ main(int argc, char **argv) .time_rate_diagnostics = true, }; - struct gkyl_poisson_bias_plane target_corner_bc = { - .dir = 0, // Direction perpendicular to the plane. - .loc = ctx.x_LCFS, // Location of the plane in the 'dir' dimension. - .val = 0.0, // Biasing value. + struct gkyl_poisson_bias_line target_corner_bcs[] = { + { + .perp_dirs = {0, 1}, // Directions perpendicular to line. + .perp_coords = {ctx.x_LCFS, ctx.z_min}, // Coordinates of the line in perpendicular directions. + .val = 0.0, // Biasing value. + }, + { + .perp_dirs = {0, 1}, // Directions perpendicular to line. + .perp_coords = {ctx.x_LCFS, ctx.z_max}, // Coordinates of the line in perpendicular directions. + .val = 0.0, // Biasing value. + }, }; - struct gkyl_poisson_bias_plane_list bias_plane_list = { - .num_bias_plane = 1, - .bp = &target_corner_bc, + struct gkyl_poisson_bias_line_list bias_line_list = { + .num_bias_line = 2, + .bl = target_corner_bcs, }; // Field. @@ -754,7 +761,7 @@ main(int argc, char **argv) { .dir = 0, .edge = GKYL_LOWER_EDGE, .type = GKYL_BC_GK_FIELD_DIRICHLET, .value = {0.0} }, { .dir = 0, .edge = GKYL_UPPER_EDGE, .type = GKYL_BC_GK_FIELD_DIRICHLET, .value = {0.0} }, }, - .bias_plane_list = &bias_plane_list, + .bias_line_list = &bias_line_list, .time_rate_diagnostics = true, }; diff --git a/gyrokinetic/creg/rt_gk_tcv_iwl_adapt_source_3x2v_p1.c b/gyrokinetic/creg/rt_gk_tcv_iwl_adapt_source_3x2v_p1.c index 517d4e4ec6..f04a43ed48 100644 --- a/gyrokinetic/creg/rt_gk_tcv_iwl_adapt_source_3x2v_p1.c +++ b/gyrokinetic/creg/rt_gk_tcv_iwl_adapt_source_3x2v_p1.c @@ -768,15 +768,22 @@ main(int argc, char **argv) .time_rate_diagnostics = true, }; - struct gkyl_poisson_bias_plane target_corner_bc = { - .dir = 0, // Direction perpendicular to the plane. - .loc = ctx.x_LCFS, // Location of the plane in the 'dir' dimension. - .val = 0.0, // Biasing value. + struct gkyl_poisson_bias_line target_corner_bcs[] = { + { + .perp_dirs = {0, 2}, // Directions perpendicular to line. + .perp_coords = {ctx.x_LCFS, ctx.z_min}, // Coordinates of the line in perpendicular directions. + .val = 0.0, // Biasing value. + }, + { + .perp_dirs = {0, 2}, // Directions perpendicular to line. + .perp_coords = {ctx.x_LCFS, ctx.z_max}, // Coordinates of the line in perpendicular directions. + .val = 0.0, // Biasing value. + }, }; - struct gkyl_poisson_bias_plane_list bias_plane_list = { - .num_bias_plane = 1, - .bp = &target_corner_bc, + struct gkyl_poisson_bias_line_list bias_line_list = { + .num_bias_line = 2, + .bl = target_corner_bcs, }; // field @@ -787,7 +794,7 @@ main(int argc, char **argv) { .dir = 0, .edge = GKYL_LOWER_EDGE, .type = GKYL_BC_GK_FIELD_DIRICHLET, .value = {0.0} }, { .dir = 0, .edge = GKYL_UPPER_EDGE, .type = GKYL_BC_GK_FIELD_DIRICHLET, .value = {0.0} }, }, - .bias_plane_list = &bias_plane_list, + .bias_line_list = &bias_line_list, .time_rate_diagnostics = true, }; diff --git a/gyrokinetic/ker/fem_parproj/fem_parproj_src_stencil.c b/gyrokinetic/ker/fem_parproj/fem_parproj_src_stencil.c index f3e47f2b4c..cc379edb2b 100644 --- a/gyrokinetic/ker/fem_parproj/fem_parproj_src_stencil.c +++ b/gyrokinetic/ker/fem_parproj/fem_parproj_src_stencil.c @@ -4,7 +4,7 @@ GKYL_CU_DH void fem_parproj_src_stencil_noweight_1x_ser_p1_inx_nondirichletx(con { // rho: right side source. // weight: Weight in the projection operation. - // phiBC: Dirichlet boundary potential, given as a DG expansion in the ghost cell (volume). + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. // nodeOff: node offset (prob idx * global number of nodes). // globalIdxs: global linear index of each basis function/node in current cell. // bsrc: global right side source vector. @@ -26,7 +26,7 @@ GKYL_CU_DH void fem_parproj_src_stencil_noweight_1x_ser_p2_inx_nondirichletx(con { // rho: right side source. // weight: Weight in the projection operation. - // phiBC: Dirichlet boundary potential, given as a DG expansion in the ghost cell (volume). + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. // nodeOff: node offset (prob idx * global number of nodes). // globalIdxs: global linear index of each basis function/node in current cell. // bsrc: global right side source vector. @@ -53,7 +53,7 @@ GKYL_CU_DH void fem_parproj_src_stencil_noweight_1x_ser_p1_lox_nondirichletx(con { // rho: right side source. // weight: Weight in the projection operation. - // phiBC: Dirichlet boundary potential, given as a DG expansion in the ghost cell (volume). + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. // nodeOff: node offset (prob idx * global number of nodes). // globalIdxs: global linear index of each basis function/node in current cell. // bsrc: global right side source vector. @@ -75,7 +75,7 @@ GKYL_CU_DH void fem_parproj_src_stencil_noweight_1x_ser_p2_lox_nondirichletx(con { // rho: right side source. // weight: Weight in the projection operation. - // phiBC: Dirichlet boundary potential, given as a DG expansion in the ghost cell (volume). + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. // nodeOff: node offset (prob idx * global number of nodes). // globalIdxs: global linear index of each basis function/node in current cell. // bsrc: global right side source vector. @@ -98,11 +98,60 @@ GKYL_CU_DH void fem_parproj_src_stencil_noweight_1x_ser_p2_lox_nondirichletx(con } -GKYL_CU_DH void fem_parproj_src_stencil_noweight_1x_ser_p1_lox_dirichletx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +GKYL_CU_DH void fem_parproj_src_stencil_noweight_1x_ser_p1_lox_dirichlet_ghostx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) { // rho: right side source. // weight: Weight in the projection operation. - // phiBC: Dirichlet boundary potential, given as a DG expansion in the ghost cell (volume). + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. + // nodeOff: node offset (prob idx * global number of nodes). + // globalIdxs: global linear index of each basis function/node in current cell. + // bsrc: global right side source vector. + + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[0]],__double_as_longlong(1.2247448713915892*phiBC[1]+0.7071067811865476*phiBC[0])); + #else + bsrc[nodeOff+globalIdxs[0]] = 1.2247448713915892*phiBC[1]+0.7071067811865476*phiBC[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[1]],0.408248290463863*rho[1]+0.7071067811865476*rho[0]); + #else + bsrc[nodeOff+globalIdxs[1]] += 0.408248290463863*rho[1]+0.7071067811865476*rho[0]; + #endif + +} + +GKYL_CU_DH void fem_parproj_src_stencil_noweight_1x_ser_p2_lox_dirichlet_ghostx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +{ + // rho: right side source. + // weight: Weight in the projection operation. + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. + // nodeOff: node offset (prob idx * global number of nodes). + // globalIdxs: global linear index of each basis function/node in current cell. + // bsrc: global right side source vector. + + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[0]],__double_as_longlong(1.5811388300841895*phiBC[2]+1.224744871391589*phiBC[1]+0.7071067811865475*phiBC[0])); + #else + bsrc[nodeOff+globalIdxs[0]] = 1.5811388300841895*phiBC[2]+1.224744871391589*phiBC[1]+0.7071067811865475*phiBC[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[1]],0.9428090415820636*rho[0]-0.42163702135578407*rho[2]); + #else + bsrc[nodeOff+globalIdxs[1]] += 0.9428090415820636*rho[0]-0.42163702135578407*rho[2]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[2]],0.21081851067789203*rho[2]+0.408248290463863*rho[1]+0.23570226039551584*rho[0]); + #else + bsrc[nodeOff+globalIdxs[2]] += 0.21081851067789203*rho[2]+0.408248290463863*rho[1]+0.23570226039551584*rho[0]; + #endif + +} + +GKYL_CU_DH void fem_parproj_src_stencil_noweight_1x_ser_p1_lox_dirichlet_skinx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +{ + // rho: right side source. + // weight: Weight in the projection operation. + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. // nodeOff: node offset (prob idx * global number of nodes). // globalIdxs: global linear index of each basis function/node in current cell. // bsrc: global right side source vector. @@ -120,11 +169,11 @@ GKYL_CU_DH void fem_parproj_src_stencil_noweight_1x_ser_p1_lox_dirichletx(const } -GKYL_CU_DH void fem_parproj_src_stencil_noweight_1x_ser_p2_lox_dirichletx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +GKYL_CU_DH void fem_parproj_src_stencil_noweight_1x_ser_p2_lox_dirichlet_skinx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) { // rho: right side source. // weight: Weight in the projection operation. - // phiBC: Dirichlet boundary potential, given as a DG expansion in the ghost cell (volume). + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. // nodeOff: node offset (prob idx * global number of nodes). // globalIdxs: global linear index of each basis function/node in current cell. // bsrc: global right side source vector. @@ -151,7 +200,7 @@ GKYL_CU_DH void fem_parproj_src_stencil_noweight_1x_ser_p1_upx_nondirichletx(con { // rho: right side source. // weight: Weight in the projection operation. - // phiBC: Dirichlet boundary potential, given as a DG expansion in the ghost cell (volume). + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. // nodeOff: node offset (prob idx * global number of nodes). // globalIdxs: global linear index of each basis function/node in current cell. // bsrc: global right side source vector. @@ -173,7 +222,7 @@ GKYL_CU_DH void fem_parproj_src_stencil_noweight_1x_ser_p2_upx_nondirichletx(con { // rho: right side source. // weight: Weight in the projection operation. - // phiBC: Dirichlet boundary potential, given as a DG expansion in the ghost cell (volume). + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. // nodeOff: node offset (prob idx * global number of nodes). // globalIdxs: global linear index of each basis function/node in current cell. // bsrc: global right side source vector. @@ -196,11 +245,60 @@ GKYL_CU_DH void fem_parproj_src_stencil_noweight_1x_ser_p2_upx_nondirichletx(con } -GKYL_CU_DH void fem_parproj_src_stencil_noweight_1x_ser_p1_upx_dirichletx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +GKYL_CU_DH void fem_parproj_src_stencil_noweight_1x_ser_p1_upx_dirichlet_ghostx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +{ + // rho: right side source. + // weight: Weight in the projection operation. + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. + // nodeOff: node offset (prob idx * global number of nodes). + // globalIdxs: global linear index of each basis function/node in current cell. + // bsrc: global right side source vector. + + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[0]],0.7071067811865476*rho[0]-0.408248290463863*rho[1]); + #else + bsrc[nodeOff+globalIdxs[0]] += 0.7071067811865476*rho[0]-0.408248290463863*rho[1]; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[1]],__double_as_longlong(0.7071067811865476*phiBC[0]-1.2247448713915892*phiBC[1])); + #else + bsrc[nodeOff+globalIdxs[1]] = 0.7071067811865476*phiBC[0]-1.2247448713915892*phiBC[1]; + #endif + +} + +GKYL_CU_DH void fem_parproj_src_stencil_noweight_1x_ser_p2_upx_dirichlet_ghostx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +{ + // rho: right side source. + // weight: Weight in the projection operation. + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. + // nodeOff: node offset (prob idx * global number of nodes). + // globalIdxs: global linear index of each basis function/node in current cell. + // bsrc: global right side source vector. + + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[0]],0.21081851067789203*rho[2]-0.408248290463863*rho[1]+0.23570226039551584*rho[0]); + #else + bsrc[nodeOff+globalIdxs[0]] += 0.21081851067789203*rho[2]-0.408248290463863*rho[1]+0.23570226039551584*rho[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[1]],0.9428090415820636*rho[0]-0.42163702135578407*rho[2]); + #else + bsrc[nodeOff+globalIdxs[1]] += 0.9428090415820636*rho[0]-0.42163702135578407*rho[2]; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[2]],__double_as_longlong(1.5811388300841895*phiBC[2]-1.224744871391589*phiBC[1]+0.7071067811865475*phiBC[0])); + #else + bsrc[nodeOff+globalIdxs[2]] = 1.5811388300841895*phiBC[2]-1.224744871391589*phiBC[1]+0.7071067811865475*phiBC[0]; + #endif + +} + +GKYL_CU_DH void fem_parproj_src_stencil_noweight_1x_ser_p1_upx_dirichlet_skinx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) { // rho: right side source. // weight: Weight in the projection operation. - // phiBC: Dirichlet boundary potential, given as a DG expansion in the ghost cell (volume). + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. // nodeOff: node offset (prob idx * global number of nodes). // globalIdxs: global linear index of each basis function/node in current cell. // bsrc: global right side source vector. @@ -218,11 +316,11 @@ GKYL_CU_DH void fem_parproj_src_stencil_noweight_1x_ser_p1_upx_dirichletx(const } -GKYL_CU_DH void fem_parproj_src_stencil_noweight_1x_ser_p2_upx_dirichletx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +GKYL_CU_DH void fem_parproj_src_stencil_noweight_1x_ser_p2_upx_dirichlet_skinx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) { // rho: right side source. // weight: Weight in the projection operation. - // phiBC: Dirichlet boundary potential, given as a DG expansion in the ghost cell (volume). + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. // nodeOff: node offset (prob idx * global number of nodes). // globalIdxs: global linear index of each basis function/node in current cell. // bsrc: global right side source vector. @@ -249,7 +347,7 @@ GKYL_CU_DH void fem_parproj_src_stencil_noweight_2x_ser_p1_iny_nondirichlety(con { // rho: right side source. // weight: Weight in the projection operation. - // phiBC: Dirichlet boundary potential, given as a DG expansion in the ghost cell (volume). + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. // nodeOff: node offset (prob idx * global number of nodes). // globalIdxs: global linear index of each basis function/node in current cell. // bsrc: global right side source vector. @@ -281,7 +379,7 @@ GKYL_CU_DH void fem_parproj_src_stencil_noweight_2x_ser_p2_iny_nondirichlety(con { // rho: right side source. // weight: Weight in the projection operation. - // phiBC: Dirichlet boundary potential, given as a DG expansion in the ghost cell (volume). + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. // nodeOff: node offset (prob idx * global number of nodes). // globalIdxs: global linear index of each basis function/node in current cell. // bsrc: global right side source vector. @@ -333,7 +431,7 @@ GKYL_CU_DH void fem_parproj_src_stencil_noweight_2x_ser_p1_loy_nondirichlety(con { // rho: right side source. // weight: Weight in the projection operation. - // phiBC: Dirichlet boundary potential, given as a DG expansion in the ghost cell (volume). + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. // nodeOff: node offset (prob idx * global number of nodes). // globalIdxs: global linear index of each basis function/node in current cell. // bsrc: global right side source vector. @@ -365,7 +463,7 @@ GKYL_CU_DH void fem_parproj_src_stencil_noweight_2x_ser_p2_loy_nondirichlety(con { // rho: right side source. // weight: Weight in the projection operation. - // phiBC: Dirichlet boundary potential, given as a DG expansion in the ghost cell (volume). + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. // nodeOff: node offset (prob idx * global number of nodes). // globalIdxs: global linear index of each basis function/node in current cell. // bsrc: global right side source vector. @@ -413,11 +511,95 @@ GKYL_CU_DH void fem_parproj_src_stencil_noweight_2x_ser_p2_loy_nondirichlety(con } -GKYL_CU_DH void fem_parproj_src_stencil_noweight_2x_ser_p1_loy_dirichlety(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +GKYL_CU_DH void fem_parproj_src_stencil_noweight_2x_ser_p1_loy_dirichlet_ghosty(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +{ + // rho: right side source. + // weight: Weight in the projection operation. + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. + // nodeOff: node offset (prob idx * global number of nodes). + // globalIdxs: global linear index of each basis function/node in current cell. + // bsrc: global right side source vector. + + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[0]],__double_as_longlong(-(1.5*phiBC[3])+0.8660254037844386*phiBC[2]-0.8660254037844386*phiBC[1]+0.5*phiBC[0])); + #else + bsrc[nodeOff+globalIdxs[0]] = -(1.5*phiBC[3])+0.8660254037844386*phiBC[2]-0.8660254037844386*phiBC[1]+0.5*phiBC[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[1]],__double_as_longlong(1.5*phiBC[3]+0.8660254037844386*phiBC[2]+0.8660254037844386*phiBC[1]+0.5*phiBC[0])); + #else + bsrc[nodeOff+globalIdxs[1]] = 1.5*phiBC[3]+0.8660254037844386*phiBC[2]+0.8660254037844386*phiBC[1]+0.5*phiBC[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[2]],-(0.16666666666666669*rho[3])+0.2886751345948129*rho[2]-0.2886751345948129*rho[1]+0.5*rho[0]); + #else + bsrc[nodeOff+globalIdxs[2]] += -(0.16666666666666669*rho[3])+0.2886751345948129*rho[2]-0.2886751345948129*rho[1]+0.5*rho[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[3]],0.16666666666666669*rho[3]+0.2886751345948129*rho[2]+0.2886751345948129*rho[1]+0.5*rho[0]); + #else + bsrc[nodeOff+globalIdxs[3]] += 0.16666666666666669*rho[3]+0.2886751345948129*rho[2]+0.2886751345948129*rho[1]+0.5*rho[0]; + #endif + +} + +GKYL_CU_DH void fem_parproj_src_stencil_noweight_2x_ser_p2_loy_dirichlet_ghosty(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +{ + // rho: right side source. + // weight: Weight in the projection operation. + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. + // nodeOff: node offset (prob idx * global number of nodes). + // globalIdxs: global linear index of each basis function/node in current cell. + // bsrc: global right side source vector. + + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[0]],__double_as_longlong(-(1.9364916731037085*phiBC[7])+1.9364916731037085*phiBC[6]+1.118033988749895*phiBC[5]+1.118033988749895*phiBC[4]-1.5*phiBC[3]+0.8660254037844386*phiBC[2]-0.8660254037844386*phiBC[1]+0.5*phiBC[0])); + #else + bsrc[nodeOff+globalIdxs[0]] = -(1.9364916731037085*phiBC[7])+1.9364916731037085*phiBC[6]+1.118033988749895*phiBC[5]+1.118033988749895*phiBC[4]-1.5*phiBC[3]+0.8660254037844386*phiBC[2]-0.8660254037844386*phiBC[1]+0.5*phiBC[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[1]],__double_as_longlong(-(0.9682458365518543*phiBC[6])+1.118033988749895*phiBC[5]-0.5590169943749475*phiBC[4]+0.8660254037844386*phiBC[2]+0.5*phiBC[0])); + #else + bsrc[nodeOff+globalIdxs[1]] = -(0.9682458365518543*phiBC[6])+1.118033988749895*phiBC[5]-0.5590169943749475*phiBC[4]+0.8660254037844386*phiBC[2]+0.5*phiBC[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[2]],__double_as_longlong(1.9364916731037085*phiBC[7]+1.9364916731037085*phiBC[6]+1.118033988749895*phiBC[5]+1.118033988749895*phiBC[4]+1.5*phiBC[3]+0.8660254037844386*phiBC[2]+0.8660254037844386*phiBC[1]+0.5*phiBC[0])); + #else + bsrc[nodeOff+globalIdxs[2]] = 1.9364916731037085*phiBC[7]+1.9364916731037085*phiBC[6]+1.118033988749895*phiBC[5]+1.118033988749895*phiBC[4]+1.5*phiBC[3]+0.8660254037844386*phiBC[2]+0.8660254037844386*phiBC[1]+0.5*phiBC[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[3]],0.17213259316477406*rho[7]-0.2981423969999719*rho[5]-0.38490017945975047*rho[1]+0.6666666666666665*rho[0]); + #else + bsrc[nodeOff+globalIdxs[3]] += 0.17213259316477406*rho[7]-0.2981423969999719*rho[5]-0.38490017945975047*rho[1]+0.6666666666666665*rho[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[4]],-(0.17213259316477406*rho[7])-0.2981423969999719*rho[5]+0.38490017945975047*rho[1]+0.6666666666666665*rho[0]); + #else + bsrc[nodeOff+globalIdxs[4]] += -(0.17213259316477406*rho[7])-0.2981423969999719*rho[5]+0.38490017945975047*rho[1]+0.6666666666666665*rho[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[5]],-(0.08606629658238707*rho[7])+0.08606629658238707*rho[6]+0.149071198499986*rho[5]+0.149071198499986*rho[4]-0.1666666666666667*rho[3]+0.09622504486493766*rho[2]-0.09622504486493766*rho[1]-0.1666666666666667*rho[0]); + #else + bsrc[nodeOff+globalIdxs[5]] += -(0.08606629658238707*rho[7])+0.08606629658238707*rho[6]+0.149071198499986*rho[5]+0.149071198499986*rho[4]-0.1666666666666667*rho[3]+0.09622504486493766*rho[2]-0.09622504486493766*rho[1]-0.1666666666666667*rho[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[6]],-(0.17213259316477406*rho[6])-0.2981423969999719*rho[4]+0.38490017945975047*rho[2]+0.6666666666666665*rho[0]); + #else + bsrc[nodeOff+globalIdxs[6]] += -(0.17213259316477406*rho[6])-0.2981423969999719*rho[4]+0.38490017945975047*rho[2]+0.6666666666666665*rho[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[7]],0.08606629658238704*rho[7]+0.08606629658238704*rho[6]+0.14907119849998599*rho[5]+0.14907119849998599*rho[4]+0.16666666666666669*rho[3]+0.09622504486493762*rho[2]+0.09622504486493762*rho[1]-0.16666666666666669*rho[0]); + #else + bsrc[nodeOff+globalIdxs[7]] += 0.08606629658238704*rho[7]+0.08606629658238704*rho[6]+0.14907119849998599*rho[5]+0.14907119849998599*rho[4]+0.16666666666666669*rho[3]+0.09622504486493762*rho[2]+0.09622504486493762*rho[1]-0.16666666666666669*rho[0]; + #endif + +} + +GKYL_CU_DH void fem_parproj_src_stencil_noweight_2x_ser_p1_loy_dirichlet_skiny(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) { // rho: right side source. // weight: Weight in the projection operation. - // phiBC: Dirichlet boundary potential, given as a DG expansion in the ghost cell (volume). + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. // nodeOff: node offset (prob idx * global number of nodes). // globalIdxs: global linear index of each basis function/node in current cell. // bsrc: global right side source vector. @@ -445,11 +627,11 @@ GKYL_CU_DH void fem_parproj_src_stencil_noweight_2x_ser_p1_loy_dirichlety(const } -GKYL_CU_DH void fem_parproj_src_stencil_noweight_2x_ser_p2_loy_dirichlety(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +GKYL_CU_DH void fem_parproj_src_stencil_noweight_2x_ser_p2_loy_dirichlet_skiny(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) { // rho: right side source. // weight: Weight in the projection operation. - // phiBC: Dirichlet boundary potential, given as a DG expansion in the ghost cell (volume). + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. // nodeOff: node offset (prob idx * global number of nodes). // globalIdxs: global linear index of each basis function/node in current cell. // bsrc: global right side source vector. @@ -501,7 +683,7 @@ GKYL_CU_DH void fem_parproj_src_stencil_noweight_2x_ser_p1_upy_nondirichlety(con { // rho: right side source. // weight: Weight in the projection operation. - // phiBC: Dirichlet boundary potential, given as a DG expansion in the ghost cell (volume). + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. // nodeOff: node offset (prob idx * global number of nodes). // globalIdxs: global linear index of each basis function/node in current cell. // bsrc: global right side source vector. @@ -533,7 +715,7 @@ GKYL_CU_DH void fem_parproj_src_stencil_noweight_2x_ser_p2_upy_nondirichlety(con { // rho: right side source. // weight: Weight in the projection operation. - // phiBC: Dirichlet boundary potential, given as a DG expansion in the ghost cell (volume). + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. // nodeOff: node offset (prob idx * global number of nodes). // globalIdxs: global linear index of each basis function/node in current cell. // bsrc: global right side source vector. @@ -581,11 +763,95 @@ GKYL_CU_DH void fem_parproj_src_stencil_noweight_2x_ser_p2_upy_nondirichlety(con } -GKYL_CU_DH void fem_parproj_src_stencil_noweight_2x_ser_p1_upy_dirichlety(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +GKYL_CU_DH void fem_parproj_src_stencil_noweight_2x_ser_p1_upy_dirichlet_ghosty(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +{ + // rho: right side source. + // weight: Weight in the projection operation. + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. + // nodeOff: node offset (prob idx * global number of nodes). + // globalIdxs: global linear index of each basis function/node in current cell. + // bsrc: global right side source vector. + + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[0]],0.16666666666666666*rho[3]-0.28867513459481287*rho[2]-0.28867513459481287*rho[1]+0.5*rho[0]); + #else + bsrc[nodeOff+globalIdxs[0]] += 0.16666666666666666*rho[3]-0.28867513459481287*rho[2]-0.28867513459481287*rho[1]+0.5*rho[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[1]],-(0.16666666666666666*rho[3])-0.28867513459481287*rho[2]+0.28867513459481287*rho[1]+0.5*rho[0]); + #else + bsrc[nodeOff+globalIdxs[1]] += -(0.16666666666666666*rho[3])-0.28867513459481287*rho[2]+0.28867513459481287*rho[1]+0.5*rho[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[2]],__double_as_longlong(1.5*phiBC[3]-0.8660254037844386*phiBC[2]-0.8660254037844386*phiBC[1]+0.5*phiBC[0])); + #else + bsrc[nodeOff+globalIdxs[2]] = 1.5*phiBC[3]-0.8660254037844386*phiBC[2]-0.8660254037844386*phiBC[1]+0.5*phiBC[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[3]],__double_as_longlong(-(1.5*phiBC[3])-0.8660254037844386*phiBC[2]+0.8660254037844386*phiBC[1]+0.5*phiBC[0])); + #else + bsrc[nodeOff+globalIdxs[3]] = -(1.5*phiBC[3])-0.8660254037844386*phiBC[2]+0.8660254037844386*phiBC[1]+0.5*phiBC[0]; + #endif + +} + +GKYL_CU_DH void fem_parproj_src_stencil_noweight_2x_ser_p2_upy_dirichlet_ghosty(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +{ + // rho: right side source. + // weight: Weight in the projection operation. + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. + // nodeOff: node offset (prob idx * global number of nodes). + // globalIdxs: global linear index of each basis function/node in current cell. + // bsrc: global right side source vector. + + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[0]],-(0.08606629658238704*rho[7])-0.08606629658238704*rho[6]+0.14907119849998599*rho[5]+0.14907119849998599*rho[4]+0.16666666666666669*rho[3]-0.09622504486493762*rho[2]-0.09622504486493762*rho[1]-0.16666666666666669*rho[0]); + #else + bsrc[nodeOff+globalIdxs[0]] += -(0.08606629658238704*rho[7])-0.08606629658238704*rho[6]+0.14907119849998599*rho[5]+0.14907119849998599*rho[4]+0.16666666666666669*rho[3]-0.09622504486493762*rho[2]-0.09622504486493762*rho[1]-0.16666666666666669*rho[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[1]],0.17213259316477408*rho[6]-0.29814239699997197*rho[4]-0.3849001794597506*rho[2]+0.6666666666666667*rho[0]); + #else + bsrc[nodeOff+globalIdxs[1]] += 0.17213259316477408*rho[6]-0.29814239699997197*rho[4]-0.3849001794597506*rho[2]+0.6666666666666667*rho[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[2]],0.08606629658238704*rho[7]-0.08606629658238704*rho[6]+0.14907119849998599*rho[5]+0.14907119849998599*rho[4]-0.16666666666666669*rho[3]-0.09622504486493762*rho[2]+0.09622504486493762*rho[1]-0.16666666666666669*rho[0]); + #else + bsrc[nodeOff+globalIdxs[2]] += 0.08606629658238704*rho[7]-0.08606629658238704*rho[6]+0.14907119849998599*rho[5]+0.14907119849998599*rho[4]-0.16666666666666669*rho[3]-0.09622504486493762*rho[2]+0.09622504486493762*rho[1]-0.16666666666666669*rho[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[3]],0.17213259316477406*rho[7]-0.2981423969999719*rho[5]-0.38490017945975047*rho[1]+0.6666666666666665*rho[0]); + #else + bsrc[nodeOff+globalIdxs[3]] += 0.17213259316477406*rho[7]-0.2981423969999719*rho[5]-0.38490017945975047*rho[1]+0.6666666666666665*rho[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[4]],-(0.17213259316477406*rho[7])-0.2981423969999719*rho[5]+0.38490017945975047*rho[1]+0.6666666666666665*rho[0]); + #else + bsrc[nodeOff+globalIdxs[4]] += -(0.17213259316477406*rho[7])-0.2981423969999719*rho[5]+0.38490017945975047*rho[1]+0.6666666666666665*rho[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[5]],__double_as_longlong(-(1.9364916731037085*phiBC[7])-1.9364916731037085*phiBC[6]+1.118033988749895*phiBC[5]+1.118033988749895*phiBC[4]+1.5*phiBC[3]-0.8660254037844386*phiBC[2]-0.8660254037844386*phiBC[1]+0.5*phiBC[0])); + #else + bsrc[nodeOff+globalIdxs[5]] = -(1.9364916731037085*phiBC[7])-1.9364916731037085*phiBC[6]+1.118033988749895*phiBC[5]+1.118033988749895*phiBC[4]+1.5*phiBC[3]-0.8660254037844386*phiBC[2]-0.8660254037844386*phiBC[1]+0.5*phiBC[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[6]],__double_as_longlong(0.9682458365518543*phiBC[6]+1.118033988749895*phiBC[5]-0.5590169943749475*phiBC[4]-0.8660254037844386*phiBC[2]+0.5*phiBC[0])); + #else + bsrc[nodeOff+globalIdxs[6]] = 0.9682458365518543*phiBC[6]+1.118033988749895*phiBC[5]-0.5590169943749475*phiBC[4]-0.8660254037844386*phiBC[2]+0.5*phiBC[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[7]],__double_as_longlong(1.9364916731037085*phiBC[7]-1.9364916731037085*phiBC[6]+1.118033988749895*phiBC[5]+1.118033988749895*phiBC[4]-1.5*phiBC[3]-0.8660254037844386*phiBC[2]+0.8660254037844386*phiBC[1]+0.5*phiBC[0])); + #else + bsrc[nodeOff+globalIdxs[7]] = 1.9364916731037085*phiBC[7]-1.9364916731037085*phiBC[6]+1.118033988749895*phiBC[5]+1.118033988749895*phiBC[4]-1.5*phiBC[3]-0.8660254037844386*phiBC[2]+0.8660254037844386*phiBC[1]+0.5*phiBC[0]; + #endif + +} + +GKYL_CU_DH void fem_parproj_src_stencil_noweight_2x_ser_p1_upy_dirichlet_skiny(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) { // rho: right side source. // weight: Weight in the projection operation. - // phiBC: Dirichlet boundary potential, given as a DG expansion in the ghost cell (volume). + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. // nodeOff: node offset (prob idx * global number of nodes). // globalIdxs: global linear index of each basis function/node in current cell. // bsrc: global right side source vector. @@ -613,11 +879,11 @@ GKYL_CU_DH void fem_parproj_src_stencil_noweight_2x_ser_p1_upy_dirichlety(const } -GKYL_CU_DH void fem_parproj_src_stencil_noweight_2x_ser_p2_upy_dirichlety(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +GKYL_CU_DH void fem_parproj_src_stencil_noweight_2x_ser_p2_upy_dirichlet_skiny(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) { // rho: right side source. // weight: Weight in the projection operation. - // phiBC: Dirichlet boundary potential, given as a DG expansion in the ghost cell (volume). + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. // nodeOff: node offset (prob idx * global number of nodes). // globalIdxs: global linear index of each basis function/node in current cell. // bsrc: global right side source vector. @@ -669,7 +935,7 @@ GKYL_CU_DH void fem_parproj_src_stencil_noweight_3x_ser_p1_inz_nondirichletz(con { // rho: right side source. // weight: Weight in the projection operation. - // phiBC: Dirichlet boundary potential, given as a DG expansion in the ghost cell (volume). + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. // nodeOff: node offset (prob idx * global number of nodes). // globalIdxs: global linear index of each basis function/node in current cell. // bsrc: global right side source vector. @@ -721,7 +987,7 @@ GKYL_CU_DH void fem_parproj_src_stencil_noweight_3x_ser_p2_inz_nondirichletz(con { // rho: right side source. // weight: Weight in the projection operation. - // phiBC: Dirichlet boundary potential, given as a DG expansion in the ghost cell (volume). + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. // nodeOff: node offset (prob idx * global number of nodes). // globalIdxs: global linear index of each basis function/node in current cell. // bsrc: global right side source vector. @@ -833,7 +1099,7 @@ GKYL_CU_DH void fem_parproj_src_stencil_noweight_3x_ser_p1_loz_nondirichletz(con { // rho: right side source. // weight: Weight in the projection operation. - // phiBC: Dirichlet boundary potential, given as a DG expansion in the ghost cell (volume). + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. // nodeOff: node offset (prob idx * global number of nodes). // globalIdxs: global linear index of each basis function/node in current cell. // bsrc: global right side source vector. @@ -885,7 +1151,7 @@ GKYL_CU_DH void fem_parproj_src_stencil_noweight_3x_ser_p2_loz_nondirichletz(con { // rho: right side source. // weight: Weight in the projection operation. - // phiBC: Dirichlet boundary potential, given as a DG expansion in the ghost cell (volume). + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. // nodeOff: node offset (prob idx * global number of nodes). // globalIdxs: global linear index of each basis function/node in current cell. // bsrc: global right side source vector. @@ -993,34 +1259,34 @@ GKYL_CU_DH void fem_parproj_src_stencil_noweight_3x_ser_p2_loz_nondirichletz(con } -GKYL_CU_DH void fem_parproj_src_stencil_noweight_3x_ser_p1_loz_dirichletz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +GKYL_CU_DH void fem_parproj_src_stencil_noweight_3x_ser_p1_loz_dirichlet_ghostz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) { // rho: right side source. // weight: Weight in the projection operation. - // phiBC: Dirichlet boundary potential, given as a DG expansion in the ghost cell (volume). + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. // nodeOff: node offset (prob idx * global number of nodes). // globalIdxs: global linear index of each basis function/node in current cell. // bsrc: global right side source vector. #ifdef __CUDA_ARCH__ - atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[0]],__double_as_longlong(-(1.8371173070873836*phiBC[7])+1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[0]],__double_as_longlong(1.8371173070873836*phiBC[7]-1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); #else - bsrc[nodeOff+globalIdxs[0]] = -(1.8371173070873836*phiBC[7])+1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; + bsrc[nodeOff+globalIdxs[0]] = 1.8371173070873836*phiBC[7]-1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; #endif #ifdef __CUDA_ARCH__ - atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[1]],__double_as_longlong(1.8371173070873836*phiBC[7]+1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[1]],__double_as_longlong(-(1.8371173070873836*phiBC[7])-1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); #else - bsrc[nodeOff+globalIdxs[1]] = 1.8371173070873836*phiBC[7]+1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; + bsrc[nodeOff+globalIdxs[1]] = -(1.8371173070873836*phiBC[7])-1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; #endif #ifdef __CUDA_ARCH__ - atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[2]],__double_as_longlong(1.8371173070873836*phiBC[7]-1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[2]],__double_as_longlong(-(1.8371173070873836*phiBC[7])+1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); #else - bsrc[nodeOff+globalIdxs[2]] = 1.8371173070873836*phiBC[7]-1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; + bsrc[nodeOff+globalIdxs[2]] = -(1.8371173070873836*phiBC[7])+1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; #endif #ifdef __CUDA_ARCH__ - atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[3]],__double_as_longlong(-(1.8371173070873836*phiBC[7])-1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[3]],__double_as_longlong(1.8371173070873836*phiBC[7]+1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); #else - bsrc[nodeOff+globalIdxs[3]] = -(1.8371173070873836*phiBC[7])-1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; + bsrc[nodeOff+globalIdxs[3]] = 1.8371173070873836*phiBC[7]+1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; #endif #ifdef __CUDA_ARCH__ atomicAdd(&bsrc[nodeOff+globalIdxs[4]],0.06804138174397718*rho[7]-0.11785113019775795*rho[6]-0.11785113019775795*rho[5]+0.11785113019775795*rho[4]+0.20412414523193156*rho[3]-0.20412414523193156*rho[2]-0.20412414523193156*rho[1]+0.35355339059327384*rho[0]); @@ -1045,54 +1311,54 @@ GKYL_CU_DH void fem_parproj_src_stencil_noweight_3x_ser_p1_loz_dirichletz(const } -GKYL_CU_DH void fem_parproj_src_stencil_noweight_3x_ser_p2_loz_dirichletz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +GKYL_CU_DH void fem_parproj_src_stencil_noweight_3x_ser_p2_loz_dirichlet_ghostz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) { // rho: right side source. // weight: Weight in the projection operation. - // phiBC: Dirichlet boundary potential, given as a DG expansion in the ghost cell (volume). + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. // nodeOff: node offset (prob idx * global number of nodes). // globalIdxs: global linear index of each basis function/node in current cell. // bsrc: global right side source vector. #ifdef __CUDA_ARCH__ - atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[0]],__double_as_longlong(2.3717082451262845*phiBC[19]+2.3717082451262845*phiBC[18]+2.3717082451262845*phiBC[17]-1.3693063937629155*phiBC[16]-1.3693063937629155*phiBC[15]-1.3693063937629155*phiBC[14]-1.3693063937629155*phiBC[13]-1.3693063937629155*phiBC[12]-1.3693063937629155*phiBC[11]-1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]+1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[0]],__double_as_longlong(2.3717082451262845*phiBC[19]-2.3717082451262845*phiBC[18]-2.3717082451262845*phiBC[17]-1.3693063937629155*phiBC[16]-1.3693063937629155*phiBC[15]+1.3693063937629155*phiBC[14]+1.3693063937629155*phiBC[13]-1.3693063937629155*phiBC[12]-1.3693063937629155*phiBC[11]+1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]-1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); #else - bsrc[nodeOff+globalIdxs[0]] = 2.3717082451262845*phiBC[19]+2.3717082451262845*phiBC[18]+2.3717082451262845*phiBC[17]-1.3693063937629155*phiBC[16]-1.3693063937629155*phiBC[15]-1.3693063937629155*phiBC[14]-1.3693063937629155*phiBC[13]-1.3693063937629155*phiBC[12]-1.3693063937629155*phiBC[11]-1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]+1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; + bsrc[nodeOff+globalIdxs[0]] = 2.3717082451262845*phiBC[19]-2.3717082451262845*phiBC[18]-2.3717082451262845*phiBC[17]-1.3693063937629155*phiBC[16]-1.3693063937629155*phiBC[15]+1.3693063937629155*phiBC[14]+1.3693063937629155*phiBC[13]-1.3693063937629155*phiBC[12]-1.3693063937629155*phiBC[11]+1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]-1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; #endif #ifdef __CUDA_ARCH__ - atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[1]],__double_as_longlong(-(1.1858541225631423*phiBC[17])-1.3693063937629155*phiBC[16]-1.3693063937629155*phiBC[14]+0.6846531968814578*phiBC[13]+0.6846531968814578*phiBC[11]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]-0.39528470752104744*phiBC[7]+1.0606601717798214*phiBC[6]-0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]+0.3535533905932738*phiBC[0])); + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[1]],__double_as_longlong(1.1858541225631423*phiBC[17]-1.3693063937629155*phiBC[16]+1.3693063937629155*phiBC[14]-0.6846531968814578*phiBC[13]+0.6846531968814578*phiBC[11]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]-0.39528470752104744*phiBC[7]-1.0606601717798214*phiBC[6]+0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]+0.3535533905932738*phiBC[0])); #else - bsrc[nodeOff+globalIdxs[1]] = -(1.1858541225631423*phiBC[17])-1.3693063937629155*phiBC[16]-1.3693063937629155*phiBC[14]+0.6846531968814578*phiBC[13]+0.6846531968814578*phiBC[11]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]-0.39528470752104744*phiBC[7]+1.0606601717798214*phiBC[6]-0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]+0.3535533905932738*phiBC[0]; + bsrc[nodeOff+globalIdxs[1]] = 1.1858541225631423*phiBC[17]-1.3693063937629155*phiBC[16]+1.3693063937629155*phiBC[14]-0.6846531968814578*phiBC[13]+0.6846531968814578*phiBC[11]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]-0.39528470752104744*phiBC[7]-1.0606601717798214*phiBC[6]+0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]+0.3535533905932738*phiBC[0]; #endif #ifdef __CUDA_ARCH__ - atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[2]],__double_as_longlong(-(2.3717082451262845*phiBC[19])-2.3717082451262845*phiBC[18]+2.3717082451262845*phiBC[17]-1.3693063937629155*phiBC[16]+1.3693063937629155*phiBC[15]-1.3693063937629155*phiBC[14]-1.3693063937629155*phiBC[13]+1.3693063937629155*phiBC[12]-1.3693063937629155*phiBC[11]+1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]+1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[2]],__double_as_longlong(-(2.3717082451262845*phiBC[19])+2.3717082451262845*phiBC[18]-2.3717082451262845*phiBC[17]-1.3693063937629155*phiBC[16]+1.3693063937629155*phiBC[15]+1.3693063937629155*phiBC[14]+1.3693063937629155*phiBC[13]+1.3693063937629155*phiBC[12]-1.3693063937629155*phiBC[11]-1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]-1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); #else - bsrc[nodeOff+globalIdxs[2]] = -(2.3717082451262845*phiBC[19])-2.3717082451262845*phiBC[18]+2.3717082451262845*phiBC[17]-1.3693063937629155*phiBC[16]+1.3693063937629155*phiBC[15]-1.3693063937629155*phiBC[14]-1.3693063937629155*phiBC[13]+1.3693063937629155*phiBC[12]-1.3693063937629155*phiBC[11]+1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]+1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; + bsrc[nodeOff+globalIdxs[2]] = -(2.3717082451262845*phiBC[19])+2.3717082451262845*phiBC[18]-2.3717082451262845*phiBC[17]-1.3693063937629155*phiBC[16]+1.3693063937629155*phiBC[15]+1.3693063937629155*phiBC[14]+1.3693063937629155*phiBC[13]+1.3693063937629155*phiBC[12]-1.3693063937629155*phiBC[11]-1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]-1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; #endif #ifdef __CUDA_ARCH__ - atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[3]],__double_as_longlong(-(1.1858541225631423*phiBC[18])-1.3693063937629155*phiBC[15]+0.6846531968814578*phiBC[14]-1.3693063937629155*phiBC[13]+0.6846531968814578*phiBC[12]+0.7905694150420949*phiBC[9]-0.39528470752104744*phiBC[8]+0.7905694150420949*phiBC[7]+1.0606601717798214*phiBC[5]-0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[3]],__double_as_longlong(1.1858541225631423*phiBC[18]-1.3693063937629155*phiBC[15]-0.6846531968814578*phiBC[14]+1.3693063937629155*phiBC[13]+0.6846531968814578*phiBC[12]+0.7905694150420949*phiBC[9]-0.39528470752104744*phiBC[8]+0.7905694150420949*phiBC[7]-1.0606601717798214*phiBC[5]+0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); #else - bsrc[nodeOff+globalIdxs[3]] = -(1.1858541225631423*phiBC[18])-1.3693063937629155*phiBC[15]+0.6846531968814578*phiBC[14]-1.3693063937629155*phiBC[13]+0.6846531968814578*phiBC[12]+0.7905694150420949*phiBC[9]-0.39528470752104744*phiBC[8]+0.7905694150420949*phiBC[7]+1.0606601717798214*phiBC[5]-0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; + bsrc[nodeOff+globalIdxs[3]] = 1.1858541225631423*phiBC[18]-1.3693063937629155*phiBC[15]-0.6846531968814578*phiBC[14]+1.3693063937629155*phiBC[13]+0.6846531968814578*phiBC[12]+0.7905694150420949*phiBC[9]-0.39528470752104744*phiBC[8]+0.7905694150420949*phiBC[7]-1.0606601717798214*phiBC[5]+0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; #endif #ifdef __CUDA_ARCH__ - atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[4]],__double_as_longlong(1.1858541225631423*phiBC[18]+1.3693063937629155*phiBC[15]+0.6846531968814578*phiBC[14]-1.3693063937629155*phiBC[13]-0.6846531968814578*phiBC[12]+0.7905694150420949*phiBC[9]-0.39528470752104744*phiBC[8]+0.7905694150420949*phiBC[7]-1.0606601717798214*phiBC[5]-0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[4]],__double_as_longlong(-(1.1858541225631423*phiBC[18])+1.3693063937629155*phiBC[15]-0.6846531968814578*phiBC[14]+1.3693063937629155*phiBC[13]-0.6846531968814578*phiBC[12]+0.7905694150420949*phiBC[9]-0.39528470752104744*phiBC[8]+0.7905694150420949*phiBC[7]+1.0606601717798214*phiBC[5]+0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); #else - bsrc[nodeOff+globalIdxs[4]] = 1.1858541225631423*phiBC[18]+1.3693063937629155*phiBC[15]+0.6846531968814578*phiBC[14]-1.3693063937629155*phiBC[13]-0.6846531968814578*phiBC[12]+0.7905694150420949*phiBC[9]-0.39528470752104744*phiBC[8]+0.7905694150420949*phiBC[7]-1.0606601717798214*phiBC[5]-0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; + bsrc[nodeOff+globalIdxs[4]] = -(1.1858541225631423*phiBC[18])+1.3693063937629155*phiBC[15]-0.6846531968814578*phiBC[14]+1.3693063937629155*phiBC[13]-0.6846531968814578*phiBC[12]+0.7905694150420949*phiBC[9]-0.39528470752104744*phiBC[8]+0.7905694150420949*phiBC[7]+1.0606601717798214*phiBC[5]+0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; #endif #ifdef __CUDA_ARCH__ - atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[5]],__double_as_longlong(-(2.3717082451262845*phiBC[19])+2.3717082451262845*phiBC[18]-2.3717082451262845*phiBC[17]+1.3693063937629155*phiBC[16]-1.3693063937629155*phiBC[15]-1.3693063937629155*phiBC[14]-1.3693063937629155*phiBC[13]-1.3693063937629155*phiBC[12]+1.3693063937629155*phiBC[11]+1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]-1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[5]],__double_as_longlong(-(2.3717082451262845*phiBC[19])-2.3717082451262845*phiBC[18]+2.3717082451262845*phiBC[17]+1.3693063937629155*phiBC[16]-1.3693063937629155*phiBC[15]+1.3693063937629155*phiBC[14]+1.3693063937629155*phiBC[13]-1.3693063937629155*phiBC[12]+1.3693063937629155*phiBC[11]-1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]+1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); #else - bsrc[nodeOff+globalIdxs[5]] = -(2.3717082451262845*phiBC[19])+2.3717082451262845*phiBC[18]-2.3717082451262845*phiBC[17]+1.3693063937629155*phiBC[16]-1.3693063937629155*phiBC[15]-1.3693063937629155*phiBC[14]-1.3693063937629155*phiBC[13]-1.3693063937629155*phiBC[12]+1.3693063937629155*phiBC[11]+1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]-1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; + bsrc[nodeOff+globalIdxs[5]] = -(2.3717082451262845*phiBC[19])-2.3717082451262845*phiBC[18]+2.3717082451262845*phiBC[17]+1.3693063937629155*phiBC[16]-1.3693063937629155*phiBC[15]+1.3693063937629155*phiBC[14]+1.3693063937629155*phiBC[13]-1.3693063937629155*phiBC[12]+1.3693063937629155*phiBC[11]-1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]+1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; #endif #ifdef __CUDA_ARCH__ - atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[6]],__double_as_longlong(1.1858541225631423*phiBC[17]+1.3693063937629155*phiBC[16]-1.3693063937629155*phiBC[14]+0.6846531968814578*phiBC[13]-0.6846531968814578*phiBC[11]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]-0.39528470752104744*phiBC[7]-1.0606601717798214*phiBC[6]-0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]+0.3535533905932738*phiBC[0])); + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[6]],__double_as_longlong(-(1.1858541225631423*phiBC[17])+1.3693063937629155*phiBC[16]+1.3693063937629155*phiBC[14]-0.6846531968814578*phiBC[13]-0.6846531968814578*phiBC[11]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]-0.39528470752104744*phiBC[7]+1.0606601717798214*phiBC[6]+0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]+0.3535533905932738*phiBC[0])); #else - bsrc[nodeOff+globalIdxs[6]] = 1.1858541225631423*phiBC[17]+1.3693063937629155*phiBC[16]-1.3693063937629155*phiBC[14]+0.6846531968814578*phiBC[13]-0.6846531968814578*phiBC[11]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]-0.39528470752104744*phiBC[7]-1.0606601717798214*phiBC[6]-0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]+0.3535533905932738*phiBC[0]; + bsrc[nodeOff+globalIdxs[6]] = -(1.1858541225631423*phiBC[17])+1.3693063937629155*phiBC[16]+1.3693063937629155*phiBC[14]-0.6846531968814578*phiBC[13]-0.6846531968814578*phiBC[11]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]-0.39528470752104744*phiBC[7]+1.0606601717798214*phiBC[6]+0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]+0.3535533905932738*phiBC[0]; #endif #ifdef __CUDA_ARCH__ - atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[7]],__double_as_longlong(2.3717082451262845*phiBC[19]-2.3717082451262845*phiBC[18]-2.3717082451262845*phiBC[17]+1.3693063937629155*phiBC[16]+1.3693063937629155*phiBC[15]-1.3693063937629155*phiBC[14]-1.3693063937629155*phiBC[13]+1.3693063937629155*phiBC[12]+1.3693063937629155*phiBC[11]-1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]-1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[7]],__double_as_longlong(2.3717082451262845*phiBC[19]+2.3717082451262845*phiBC[18]+2.3717082451262845*phiBC[17]+1.3693063937629155*phiBC[16]+1.3693063937629155*phiBC[15]+1.3693063937629155*phiBC[14]+1.3693063937629155*phiBC[13]+1.3693063937629155*phiBC[12]+1.3693063937629155*phiBC[11]+1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]+1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); #else - bsrc[nodeOff+globalIdxs[7]] = 2.3717082451262845*phiBC[19]-2.3717082451262845*phiBC[18]-2.3717082451262845*phiBC[17]+1.3693063937629155*phiBC[16]+1.3693063937629155*phiBC[15]-1.3693063937629155*phiBC[14]-1.3693063937629155*phiBC[13]+1.3693063937629155*phiBC[12]+1.3693063937629155*phiBC[11]-1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]-1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; + bsrc[nodeOff+globalIdxs[7]] = 2.3717082451262845*phiBC[19]+2.3717082451262845*phiBC[18]+2.3717082451262845*phiBC[17]+1.3693063937629155*phiBC[16]+1.3693063937629155*phiBC[15]+1.3693063937629155*phiBC[14]+1.3693063937629155*phiBC[13]+1.3693063937629155*phiBC[12]+1.3693063937629155*phiBC[11]+1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]+1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; #endif #ifdef __CUDA_ARCH__ atomicAdd(&bsrc[nodeOff+globalIdxs[8]],-(0.07027283689263064*rho[19])+0.12171612389003691*rho[16]+0.12171612389003691*rho[15]-0.21081851067789192*rho[9]+0.15713484026367722*rho[4]-0.2721655269759087*rho[2]-0.2721655269759087*rho[1]+0.4714045207910317*rho[0]); @@ -1157,34 +1423,34 @@ GKYL_CU_DH void fem_parproj_src_stencil_noweight_3x_ser_p2_loz_dirichletz(const } -GKYL_CU_DH void fem_parproj_src_stencil_noweight_3x_ser_p1_upz_nondirichletz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +GKYL_CU_DH void fem_parproj_src_stencil_noweight_3x_ser_p1_loz_dirichlet_skinz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) { // rho: right side source. // weight: Weight in the projection operation. - // phiBC: Dirichlet boundary potential, given as a DG expansion in the ghost cell (volume). + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. // nodeOff: node offset (prob idx * global number of nodes). // globalIdxs: global linear index of each basis function/node in current cell. // bsrc: global right side source vector. #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[0]],-(0.06804138174397718*rho[7])+0.11785113019775795*rho[6]+0.11785113019775795*rho[5]+0.11785113019775795*rho[4]-0.20412414523193156*rho[3]-0.20412414523193156*rho[2]-0.20412414523193156*rho[1]+0.35355339059327384*rho[0]); + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[0]],__double_as_longlong(-(1.8371173070873836*phiBC[7])+1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); #else - bsrc[nodeOff+globalIdxs[0]] += -(0.06804138174397718*rho[7])+0.11785113019775795*rho[6]+0.11785113019775795*rho[5]+0.11785113019775795*rho[4]-0.20412414523193156*rho[3]-0.20412414523193156*rho[2]-0.20412414523193156*rho[1]+0.35355339059327384*rho[0]; + bsrc[nodeOff+globalIdxs[0]] = -(1.8371173070873836*phiBC[7])+1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; #endif #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[1]],0.06804138174397718*rho[7]+0.11785113019775795*rho[6]-0.11785113019775795*rho[5]-0.11785113019775795*rho[4]-0.20412414523193156*rho[3]-0.20412414523193156*rho[2]+0.20412414523193156*rho[1]+0.35355339059327384*rho[0]); + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[1]],__double_as_longlong(1.8371173070873836*phiBC[7]+1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); #else - bsrc[nodeOff+globalIdxs[1]] += 0.06804138174397718*rho[7]+0.11785113019775795*rho[6]-0.11785113019775795*rho[5]-0.11785113019775795*rho[4]-0.20412414523193156*rho[3]-0.20412414523193156*rho[2]+0.20412414523193156*rho[1]+0.35355339059327384*rho[0]; + bsrc[nodeOff+globalIdxs[1]] = 1.8371173070873836*phiBC[7]+1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; #endif #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[2]],0.06804138174397718*rho[7]-0.11785113019775795*rho[6]+0.11785113019775795*rho[5]-0.11785113019775795*rho[4]-0.20412414523193156*rho[3]+0.20412414523193156*rho[2]-0.20412414523193156*rho[1]+0.35355339059327384*rho[0]); + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[2]],__double_as_longlong(1.8371173070873836*phiBC[7]-1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); #else - bsrc[nodeOff+globalIdxs[2]] += 0.06804138174397718*rho[7]-0.11785113019775795*rho[6]+0.11785113019775795*rho[5]-0.11785113019775795*rho[4]-0.20412414523193156*rho[3]+0.20412414523193156*rho[2]-0.20412414523193156*rho[1]+0.35355339059327384*rho[0]; + bsrc[nodeOff+globalIdxs[2]] = 1.8371173070873836*phiBC[7]-1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; #endif #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[3]],-(0.06804138174397718*rho[7])-0.11785113019775795*rho[6]-0.11785113019775795*rho[5]+0.11785113019775795*rho[4]-0.20412414523193156*rho[3]+0.20412414523193156*rho[2]+0.20412414523193156*rho[1]+0.35355339059327384*rho[0]); + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[3]],__double_as_longlong(-(1.8371173070873836*phiBC[7])-1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); #else - bsrc[nodeOff+globalIdxs[3]] += -(0.06804138174397718*rho[7])-0.11785113019775795*rho[6]-0.11785113019775795*rho[5]+0.11785113019775795*rho[4]-0.20412414523193156*rho[3]+0.20412414523193156*rho[2]+0.20412414523193156*rho[1]+0.35355339059327384*rho[0]; + bsrc[nodeOff+globalIdxs[3]] = -(1.8371173070873836*phiBC[7])-1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; #endif #ifdef __CUDA_ARCH__ atomicAdd(&bsrc[nodeOff+globalIdxs[4]],0.06804138174397718*rho[7]-0.11785113019775795*rho[6]-0.11785113019775795*rho[5]+0.11785113019775795*rho[4]+0.20412414523193156*rho[3]-0.20412414523193156*rho[2]-0.20412414523193156*rho[1]+0.35355339059327384*rho[0]); @@ -1209,54 +1475,54 @@ GKYL_CU_DH void fem_parproj_src_stencil_noweight_3x_ser_p1_upz_nondirichletz(con } -GKYL_CU_DH void fem_parproj_src_stencil_noweight_3x_ser_p2_upz_nondirichletz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +GKYL_CU_DH void fem_parproj_src_stencil_noweight_3x_ser_p2_loz_dirichlet_skinz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) { // rho: right side source. // weight: Weight in the projection operation. - // phiBC: Dirichlet boundary potential, given as a DG expansion in the ghost cell (volume). + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. // nodeOff: node offset (prob idx * global number of nodes). // globalIdxs: global linear index of each basis function/node in current cell. // bsrc: global right side source vector. #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[0]],0.03513641844631534*rho[19]+0.03513641844631534*rho[18]+0.03513641844631534*rho[17]-0.06085806194501849*rho[16]-0.06085806194501849*rho[15]-0.06085806194501849*rho[14]-0.06085806194501849*rho[13]-0.06085806194501849*rho[12]-0.06085806194501849*rho[11]-0.0680413817439772*rho[10]+0.10540925533894603*rho[9]+0.10540925533894603*rho[8]+0.10540925533894603*rho[7]+0.039283710065919325*rho[6]+0.039283710065919325*rho[5]+0.039283710065919325*rho[4]+0.0680413817439772*rho[3]+0.0680413817439772*rho[2]+0.0680413817439772*rho[1]-0.3535533905932739*rho[0]); + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[0]],__double_as_longlong(2.3717082451262845*phiBC[19]+2.3717082451262845*phiBC[18]+2.3717082451262845*phiBC[17]-1.3693063937629155*phiBC[16]-1.3693063937629155*phiBC[15]-1.3693063937629155*phiBC[14]-1.3693063937629155*phiBC[13]-1.3693063937629155*phiBC[12]-1.3693063937629155*phiBC[11]-1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]+1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); #else - bsrc[nodeOff+globalIdxs[0]] += 0.03513641844631534*rho[19]+0.03513641844631534*rho[18]+0.03513641844631534*rho[17]-0.06085806194501849*rho[16]-0.06085806194501849*rho[15]-0.06085806194501849*rho[14]-0.06085806194501849*rho[13]-0.06085806194501849*rho[12]-0.06085806194501849*rho[11]-0.0680413817439772*rho[10]+0.10540925533894603*rho[9]+0.10540925533894603*rho[8]+0.10540925533894603*rho[7]+0.039283710065919325*rho[6]+0.039283710065919325*rho[5]+0.039283710065919325*rho[4]+0.0680413817439772*rho[3]+0.0680413817439772*rho[2]+0.0680413817439772*rho[1]-0.3535533905932739*rho[0]; + bsrc[nodeOff+globalIdxs[0]] = 2.3717082451262845*phiBC[19]+2.3717082451262845*phiBC[18]+2.3717082451262845*phiBC[17]-1.3693063937629155*phiBC[16]-1.3693063937629155*phiBC[15]-1.3693063937629155*phiBC[14]-1.3693063937629155*phiBC[13]-1.3693063937629155*phiBC[12]-1.3693063937629155*phiBC[11]-1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]+1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; #endif #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[1]],-(0.07027283689263068*rho[17])+0.12171612389003698*rho[13]+0.12171612389003698*rho[11]-0.21081851067789206*rho[7]+0.1571348402636773*rho[6]-0.2721655269759088*rho[3]-0.2721655269759088*rho[2]+0.4714045207910319*rho[0]); + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[1]],__double_as_longlong(-(1.1858541225631423*phiBC[17])-1.3693063937629155*phiBC[16]-1.3693063937629155*phiBC[14]+0.6846531968814578*phiBC[13]+0.6846531968814578*phiBC[11]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]-0.39528470752104744*phiBC[7]+1.0606601717798214*phiBC[6]-0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]+0.3535533905932738*phiBC[0])); #else - bsrc[nodeOff+globalIdxs[1]] += -(0.07027283689263068*rho[17])+0.12171612389003698*rho[13]+0.12171612389003698*rho[11]-0.21081851067789206*rho[7]+0.1571348402636773*rho[6]-0.2721655269759088*rho[3]-0.2721655269759088*rho[2]+0.4714045207910319*rho[0]; + bsrc[nodeOff+globalIdxs[1]] = -(1.1858541225631423*phiBC[17])-1.3693063937629155*phiBC[16]-1.3693063937629155*phiBC[14]+0.6846531968814578*phiBC[13]+0.6846531968814578*phiBC[11]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]-0.39528470752104744*phiBC[7]+1.0606601717798214*phiBC[6]-0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]+0.3535533905932738*phiBC[0]; #endif #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[2]],-(0.03513641844631534*rho[19])-0.03513641844631534*rho[18]+0.03513641844631534*rho[17]-0.06085806194501848*rho[16]+0.06085806194501848*rho[15]-0.06085806194501848*rho[14]-0.06085806194501848*rho[13]+0.06085806194501848*rho[12]-0.06085806194501848*rho[11]+0.0680413817439772*rho[10]+0.10540925533894599*rho[9]+0.10540925533894599*rho[8]+0.10540925533894599*rho[7]+0.03928371006591932*rho[6]-0.03928371006591932*rho[5]-0.03928371006591932*rho[4]+0.0680413817439772*rho[3]+0.0680413817439772*rho[2]-0.0680413817439772*rho[1]-0.3535533905932739*rho[0]); + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[2]],__double_as_longlong(-(2.3717082451262845*phiBC[19])-2.3717082451262845*phiBC[18]+2.3717082451262845*phiBC[17]-1.3693063937629155*phiBC[16]+1.3693063937629155*phiBC[15]-1.3693063937629155*phiBC[14]-1.3693063937629155*phiBC[13]+1.3693063937629155*phiBC[12]-1.3693063937629155*phiBC[11]+1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]+1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); #else - bsrc[nodeOff+globalIdxs[2]] += -(0.03513641844631534*rho[19])-0.03513641844631534*rho[18]+0.03513641844631534*rho[17]-0.06085806194501848*rho[16]+0.06085806194501848*rho[15]-0.06085806194501848*rho[14]-0.06085806194501848*rho[13]+0.06085806194501848*rho[12]-0.06085806194501848*rho[11]+0.0680413817439772*rho[10]+0.10540925533894599*rho[9]+0.10540925533894599*rho[8]+0.10540925533894599*rho[7]+0.03928371006591932*rho[6]-0.03928371006591932*rho[5]-0.03928371006591932*rho[4]+0.0680413817439772*rho[3]+0.0680413817439772*rho[2]-0.0680413817439772*rho[1]-0.3535533905932739*rho[0]; + bsrc[nodeOff+globalIdxs[2]] = -(2.3717082451262845*phiBC[19])-2.3717082451262845*phiBC[18]+2.3717082451262845*phiBC[17]-1.3693063937629155*phiBC[16]+1.3693063937629155*phiBC[15]-1.3693063937629155*phiBC[14]-1.3693063937629155*phiBC[13]+1.3693063937629155*phiBC[12]-1.3693063937629155*phiBC[11]+1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]+1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; #endif #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[3]],-(0.07027283689263064*rho[18])+0.12171612389003689*rho[14]+0.12171612389003689*rho[12]-0.21081851067789192*rho[8]+0.1571348402636772*rho[5]-0.2721655269759087*rho[3]-0.2721655269759087*rho[1]+0.47140452079103157*rho[0]); + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[3]],__double_as_longlong(-(1.1858541225631423*phiBC[18])-1.3693063937629155*phiBC[15]+0.6846531968814578*phiBC[14]-1.3693063937629155*phiBC[13]+0.6846531968814578*phiBC[12]+0.7905694150420949*phiBC[9]-0.39528470752104744*phiBC[8]+0.7905694150420949*phiBC[7]+1.0606601717798214*phiBC[5]-0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); #else - bsrc[nodeOff+globalIdxs[3]] += -(0.07027283689263064*rho[18])+0.12171612389003689*rho[14]+0.12171612389003689*rho[12]-0.21081851067789192*rho[8]+0.1571348402636772*rho[5]-0.2721655269759087*rho[3]-0.2721655269759087*rho[1]+0.47140452079103157*rho[0]; + bsrc[nodeOff+globalIdxs[3]] = -(1.1858541225631423*phiBC[18])-1.3693063937629155*phiBC[15]+0.6846531968814578*phiBC[14]-1.3693063937629155*phiBC[13]+0.6846531968814578*phiBC[12]+0.7905694150420949*phiBC[9]-0.39528470752104744*phiBC[8]+0.7905694150420949*phiBC[7]+1.0606601717798214*phiBC[5]-0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; #endif #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[4]],0.07027283689263068*rho[18]+0.12171612389003694*rho[14]-0.12171612389003694*rho[12]-0.21081851067789203*rho[8]-0.1571348402636773*rho[5]-0.27216552697590873*rho[3]+0.27216552697590873*rho[1]+0.47140452079103184*rho[0]); + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[4]],__double_as_longlong(1.1858541225631423*phiBC[18]+1.3693063937629155*phiBC[15]+0.6846531968814578*phiBC[14]-1.3693063937629155*phiBC[13]-0.6846531968814578*phiBC[12]+0.7905694150420949*phiBC[9]-0.39528470752104744*phiBC[8]+0.7905694150420949*phiBC[7]-1.0606601717798214*phiBC[5]-0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); #else - bsrc[nodeOff+globalIdxs[4]] += 0.07027283689263068*rho[18]+0.12171612389003694*rho[14]-0.12171612389003694*rho[12]-0.21081851067789203*rho[8]-0.1571348402636773*rho[5]-0.27216552697590873*rho[3]+0.27216552697590873*rho[1]+0.47140452079103184*rho[0]; + bsrc[nodeOff+globalIdxs[4]] = 1.1858541225631423*phiBC[18]+1.3693063937629155*phiBC[15]+0.6846531968814578*phiBC[14]-1.3693063937629155*phiBC[13]-0.6846531968814578*phiBC[12]+0.7905694150420949*phiBC[9]-0.39528470752104744*phiBC[8]+0.7905694150420949*phiBC[7]-1.0606601717798214*phiBC[5]-0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; #endif #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[5]],-(0.03513641844631532*rho[19])+0.03513641844631532*rho[18]-0.03513641844631532*rho[17]+0.06085806194501844*rho[16]-0.06085806194501844*rho[15]-0.06085806194501844*rho[14]-0.06085806194501844*rho[13]-0.06085806194501844*rho[12]+0.06085806194501844*rho[11]+0.06804138174397717*rho[10]+0.10540925533894596*rho[9]+0.10540925533894596*rho[8]+0.10540925533894596*rho[7]-0.0392837100659193*rho[6]+0.0392837100659193*rho[5]-0.0392837100659193*rho[4]+0.06804138174397717*rho[3]-0.06804138174397717*rho[2]+0.06804138174397717*rho[1]-0.35355339059327373*rho[0]); + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[5]],__double_as_longlong(-(2.3717082451262845*phiBC[19])+2.3717082451262845*phiBC[18]-2.3717082451262845*phiBC[17]+1.3693063937629155*phiBC[16]-1.3693063937629155*phiBC[15]-1.3693063937629155*phiBC[14]-1.3693063937629155*phiBC[13]-1.3693063937629155*phiBC[12]+1.3693063937629155*phiBC[11]+1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]-1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); #else - bsrc[nodeOff+globalIdxs[5]] += -(0.03513641844631532*rho[19])+0.03513641844631532*rho[18]-0.03513641844631532*rho[17]+0.06085806194501844*rho[16]-0.06085806194501844*rho[15]-0.06085806194501844*rho[14]-0.06085806194501844*rho[13]-0.06085806194501844*rho[12]+0.06085806194501844*rho[11]+0.06804138174397717*rho[10]+0.10540925533894596*rho[9]+0.10540925533894596*rho[8]+0.10540925533894596*rho[7]-0.0392837100659193*rho[6]+0.0392837100659193*rho[5]-0.0392837100659193*rho[4]+0.06804138174397717*rho[3]-0.06804138174397717*rho[2]+0.06804138174397717*rho[1]-0.35355339059327373*rho[0]; + bsrc[nodeOff+globalIdxs[5]] = -(2.3717082451262845*phiBC[19])+2.3717082451262845*phiBC[18]-2.3717082451262845*phiBC[17]+1.3693063937629155*phiBC[16]-1.3693063937629155*phiBC[15]-1.3693063937629155*phiBC[14]-1.3693063937629155*phiBC[13]-1.3693063937629155*phiBC[12]+1.3693063937629155*phiBC[11]+1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]-1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; #endif #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[6]],0.07027283689263068*rho[17]+0.12171612389003694*rho[13]-0.12171612389003694*rho[11]-0.21081851067789203*rho[7]-0.1571348402636773*rho[6]-0.27216552697590873*rho[3]+0.27216552697590873*rho[2]+0.47140452079103184*rho[0]); + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[6]],__double_as_longlong(1.1858541225631423*phiBC[17]+1.3693063937629155*phiBC[16]-1.3693063937629155*phiBC[14]+0.6846531968814578*phiBC[13]-0.6846531968814578*phiBC[11]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]-0.39528470752104744*phiBC[7]-1.0606601717798214*phiBC[6]-0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]+0.3535533905932738*phiBC[0])); #else - bsrc[nodeOff+globalIdxs[6]] += 0.07027283689263068*rho[17]+0.12171612389003694*rho[13]-0.12171612389003694*rho[11]-0.21081851067789203*rho[7]-0.1571348402636773*rho[6]-0.27216552697590873*rho[3]+0.27216552697590873*rho[2]+0.47140452079103184*rho[0]; + bsrc[nodeOff+globalIdxs[6]] = 1.1858541225631423*phiBC[17]+1.3693063937629155*phiBC[16]-1.3693063937629155*phiBC[14]+0.6846531968814578*phiBC[13]-0.6846531968814578*phiBC[11]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]-0.39528470752104744*phiBC[7]-1.0606601717798214*phiBC[6]-0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]+0.3535533905932738*phiBC[0]; #endif #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[7]],0.03513641844631532*rho[19]-0.03513641844631532*rho[18]-0.03513641844631532*rho[17]+0.06085806194501846*rho[16]+0.06085806194501846*rho[15]-0.06085806194501846*rho[14]-0.06085806194501846*rho[13]+0.06085806194501846*rho[12]+0.06085806194501846*rho[11]-0.06804138174397717*rho[10]+0.10540925533894596*rho[9]+0.10540925533894596*rho[8]+0.10540925533894596*rho[7]-0.039283710065919304*rho[6]-0.039283710065919304*rho[5]+0.039283710065919304*rho[4]+0.06804138174397717*rho[3]-0.06804138174397717*rho[2]-0.06804138174397717*rho[1]-0.35355339059327373*rho[0]); + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[7]],__double_as_longlong(2.3717082451262845*phiBC[19]-2.3717082451262845*phiBC[18]-2.3717082451262845*phiBC[17]+1.3693063937629155*phiBC[16]+1.3693063937629155*phiBC[15]-1.3693063937629155*phiBC[14]-1.3693063937629155*phiBC[13]+1.3693063937629155*phiBC[12]+1.3693063937629155*phiBC[11]-1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]-1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); #else - bsrc[nodeOff+globalIdxs[7]] += 0.03513641844631532*rho[19]-0.03513641844631532*rho[18]-0.03513641844631532*rho[17]+0.06085806194501846*rho[16]+0.06085806194501846*rho[15]-0.06085806194501846*rho[14]-0.06085806194501846*rho[13]+0.06085806194501846*rho[12]+0.06085806194501846*rho[11]-0.06804138174397717*rho[10]+0.10540925533894596*rho[9]+0.10540925533894596*rho[8]+0.10540925533894596*rho[7]-0.039283710065919304*rho[6]-0.039283710065919304*rho[5]+0.039283710065919304*rho[4]+0.06804138174397717*rho[3]-0.06804138174397717*rho[2]-0.06804138174397717*rho[1]-0.35355339059327373*rho[0]; + bsrc[nodeOff+globalIdxs[7]] = 2.3717082451262845*phiBC[19]-2.3717082451262845*phiBC[18]-2.3717082451262845*phiBC[17]+1.3693063937629155*phiBC[16]+1.3693063937629155*phiBC[15]-1.3693063937629155*phiBC[14]-1.3693063937629155*phiBC[13]+1.3693063937629155*phiBC[12]+1.3693063937629155*phiBC[11]-1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]-1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; #endif #ifdef __CUDA_ARCH__ atomicAdd(&bsrc[nodeOff+globalIdxs[8]],-(0.07027283689263064*rho[19])+0.12171612389003691*rho[16]+0.12171612389003691*rho[15]-0.21081851067789192*rho[9]+0.15713484026367722*rho[4]-0.2721655269759087*rho[2]-0.2721655269759087*rho[1]+0.4714045207910317*rho[0]); @@ -1321,11 +1587,11 @@ GKYL_CU_DH void fem_parproj_src_stencil_noweight_3x_ser_p2_upz_nondirichletz(con } -GKYL_CU_DH void fem_parproj_src_stencil_noweight_3x_ser_p1_upz_dirichletz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +GKYL_CU_DH void fem_parproj_src_stencil_noweight_3x_ser_p1_upz_nondirichletz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) { // rho: right side source. // weight: Weight in the projection operation. - // phiBC: Dirichlet boundary potential, given as a DG expansion in the ghost cell (volume). + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. // nodeOff: node offset (prob idx * global number of nodes). // globalIdxs: global linear index of each basis function/node in current cell. // bsrc: global right side source vector. @@ -1351,33 +1617,33 @@ GKYL_CU_DH void fem_parproj_src_stencil_noweight_3x_ser_p1_upz_dirichletz(const bsrc[nodeOff+globalIdxs[3]] += -(0.06804138174397718*rho[7])-0.11785113019775795*rho[6]-0.11785113019775795*rho[5]+0.11785113019775795*rho[4]-0.20412414523193156*rho[3]+0.20412414523193156*rho[2]+0.20412414523193156*rho[1]+0.35355339059327384*rho[0]; #endif #ifdef __CUDA_ARCH__ - atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[4]],__double_as_longlong(1.8371173070873836*phiBC[7]-1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); + atomicAdd(&bsrc[nodeOff+globalIdxs[4]],0.06804138174397718*rho[7]-0.11785113019775795*rho[6]-0.11785113019775795*rho[5]+0.11785113019775795*rho[4]+0.20412414523193156*rho[3]-0.20412414523193156*rho[2]-0.20412414523193156*rho[1]+0.35355339059327384*rho[0]); #else - bsrc[nodeOff+globalIdxs[4]] = 1.8371173070873836*phiBC[7]-1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; + bsrc[nodeOff+globalIdxs[4]] += 0.06804138174397718*rho[7]-0.11785113019775795*rho[6]-0.11785113019775795*rho[5]+0.11785113019775795*rho[4]+0.20412414523193156*rho[3]-0.20412414523193156*rho[2]-0.20412414523193156*rho[1]+0.35355339059327384*rho[0]; #endif #ifdef __CUDA_ARCH__ - atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[5]],__double_as_longlong(-(1.8371173070873836*phiBC[7])-1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); + atomicAdd(&bsrc[nodeOff+globalIdxs[5]],-(0.06804138174397718*rho[7])-0.11785113019775795*rho[6]+0.11785113019775795*rho[5]-0.11785113019775795*rho[4]+0.20412414523193156*rho[3]-0.20412414523193156*rho[2]+0.20412414523193156*rho[1]+0.35355339059327384*rho[0]); #else - bsrc[nodeOff+globalIdxs[5]] = -(1.8371173070873836*phiBC[7])-1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; + bsrc[nodeOff+globalIdxs[5]] += -(0.06804138174397718*rho[7])-0.11785113019775795*rho[6]+0.11785113019775795*rho[5]-0.11785113019775795*rho[4]+0.20412414523193156*rho[3]-0.20412414523193156*rho[2]+0.20412414523193156*rho[1]+0.35355339059327384*rho[0]; #endif #ifdef __CUDA_ARCH__ - atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[6]],__double_as_longlong(-(1.8371173070873836*phiBC[7])+1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); + atomicAdd(&bsrc[nodeOff+globalIdxs[6]],-(0.06804138174397718*rho[7])+0.11785113019775795*rho[6]-0.11785113019775795*rho[5]-0.11785113019775795*rho[4]+0.20412414523193156*rho[3]+0.20412414523193156*rho[2]-0.20412414523193156*rho[1]+0.35355339059327384*rho[0]); #else - bsrc[nodeOff+globalIdxs[6]] = -(1.8371173070873836*phiBC[7])+1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; + bsrc[nodeOff+globalIdxs[6]] += -(0.06804138174397718*rho[7])+0.11785113019775795*rho[6]-0.11785113019775795*rho[5]-0.11785113019775795*rho[4]+0.20412414523193156*rho[3]+0.20412414523193156*rho[2]-0.20412414523193156*rho[1]+0.35355339059327384*rho[0]; #endif #ifdef __CUDA_ARCH__ - atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[7]],__double_as_longlong(1.8371173070873836*phiBC[7]+1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); + atomicAdd(&bsrc[nodeOff+globalIdxs[7]],0.06804138174397718*rho[7]+0.11785113019775795*rho[6]+0.11785113019775795*rho[5]+0.11785113019775795*rho[4]+0.20412414523193156*rho[3]+0.20412414523193156*rho[2]+0.20412414523193156*rho[1]+0.35355339059327384*rho[0]); #else - bsrc[nodeOff+globalIdxs[7]] = 1.8371173070873836*phiBC[7]+1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; + bsrc[nodeOff+globalIdxs[7]] += 0.06804138174397718*rho[7]+0.11785113019775795*rho[6]+0.11785113019775795*rho[5]+0.11785113019775795*rho[4]+0.20412414523193156*rho[3]+0.20412414523193156*rho[2]+0.20412414523193156*rho[1]+0.35355339059327384*rho[0]; #endif } -GKYL_CU_DH void fem_parproj_src_stencil_noweight_3x_ser_p2_upz_dirichletz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +GKYL_CU_DH void fem_parproj_src_stencil_noweight_3x_ser_p2_upz_nondirichletz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) { // rho: right side source. // weight: Weight in the projection operation. - // phiBC: Dirichlet boundary potential, given as a DG expansion in the ghost cell (volume). + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. // nodeOff: node offset (prob idx * global number of nodes). // globalIdxs: global linear index of each basis function/node in current cell. // bsrc: global right side source vector. @@ -1443,311 +1709,989 @@ GKYL_CU_DH void fem_parproj_src_stencil_noweight_3x_ser_p2_upz_dirichletz(const bsrc[nodeOff+globalIdxs[11]] += -(0.07027283689263064*rho[19])-0.12171612389003691*rho[16]-0.12171612389003691*rho[15]-0.21081851067789192*rho[9]+0.15713484026367722*rho[4]+0.2721655269759087*rho[2]+0.2721655269759087*rho[1]+0.4714045207910317*rho[0]; #endif #ifdef __CUDA_ARCH__ - atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[12]],__double_as_longlong(2.3717082451262845*phiBC[19]-2.3717082451262845*phiBC[18]-2.3717082451262845*phiBC[17]-1.3693063937629155*phiBC[16]-1.3693063937629155*phiBC[15]+1.3693063937629155*phiBC[14]+1.3693063937629155*phiBC[13]-1.3693063937629155*phiBC[12]-1.3693063937629155*phiBC[11]+1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]-1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); + atomicAdd(&bsrc[nodeOff+globalIdxs[12]],0.03513641844631534*rho[19]-0.03513641844631534*rho[18]-0.03513641844631534*rho[17]-0.06085806194501847*rho[16]-0.06085806194501847*rho[15]+0.06085806194501847*rho[14]+0.06085806194501847*rho[13]-0.06085806194501847*rho[12]-0.06085806194501847*rho[11]+0.06804138174397718*rho[10]+0.10540925533894602*rho[9]+0.10540925533894602*rho[8]+0.10540925533894602*rho[7]-0.039283710065919325*rho[6]-0.039283710065919325*rho[5]+0.039283710065919325*rho[4]-0.06804138174397718*rho[3]+0.06804138174397718*rho[2]+0.06804138174397718*rho[1]-0.35355339059327384*rho[0]); #else - bsrc[nodeOff+globalIdxs[12]] = 2.3717082451262845*phiBC[19]-2.3717082451262845*phiBC[18]-2.3717082451262845*phiBC[17]-1.3693063937629155*phiBC[16]-1.3693063937629155*phiBC[15]+1.3693063937629155*phiBC[14]+1.3693063937629155*phiBC[13]-1.3693063937629155*phiBC[12]-1.3693063937629155*phiBC[11]+1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]-1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; + bsrc[nodeOff+globalIdxs[12]] += 0.03513641844631534*rho[19]-0.03513641844631534*rho[18]-0.03513641844631534*rho[17]-0.06085806194501847*rho[16]-0.06085806194501847*rho[15]+0.06085806194501847*rho[14]+0.06085806194501847*rho[13]-0.06085806194501847*rho[12]-0.06085806194501847*rho[11]+0.06804138174397718*rho[10]+0.10540925533894602*rho[9]+0.10540925533894602*rho[8]+0.10540925533894602*rho[7]-0.039283710065919325*rho[6]-0.039283710065919325*rho[5]+0.039283710065919325*rho[4]-0.06804138174397718*rho[3]+0.06804138174397718*rho[2]+0.06804138174397718*rho[1]-0.35355339059327384*rho[0]; #endif #ifdef __CUDA_ARCH__ - atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[13]],__double_as_longlong(1.1858541225631423*phiBC[17]-1.3693063937629155*phiBC[16]+1.3693063937629155*phiBC[14]-0.6846531968814578*phiBC[13]+0.6846531968814578*phiBC[11]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]-0.39528470752104744*phiBC[7]-1.0606601717798214*phiBC[6]+0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]+0.3535533905932738*phiBC[0])); + atomicAdd(&bsrc[nodeOff+globalIdxs[13]],0.07027283689263068*rho[17]-0.12171612389003694*rho[13]+0.12171612389003694*rho[11]-0.21081851067789203*rho[7]-0.1571348402636773*rho[6]+0.27216552697590873*rho[3]-0.27216552697590873*rho[2]+0.47140452079103184*rho[0]); #else - bsrc[nodeOff+globalIdxs[13]] = 1.1858541225631423*phiBC[17]-1.3693063937629155*phiBC[16]+1.3693063937629155*phiBC[14]-0.6846531968814578*phiBC[13]+0.6846531968814578*phiBC[11]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]-0.39528470752104744*phiBC[7]-1.0606601717798214*phiBC[6]+0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]+0.3535533905932738*phiBC[0]; + bsrc[nodeOff+globalIdxs[13]] += 0.07027283689263068*rho[17]-0.12171612389003694*rho[13]+0.12171612389003694*rho[11]-0.21081851067789203*rho[7]-0.1571348402636773*rho[6]+0.27216552697590873*rho[3]-0.27216552697590873*rho[2]+0.47140452079103184*rho[0]; #endif #ifdef __CUDA_ARCH__ - atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[14]],__double_as_longlong(-(2.3717082451262845*phiBC[19])+2.3717082451262845*phiBC[18]-2.3717082451262845*phiBC[17]-1.3693063937629155*phiBC[16]+1.3693063937629155*phiBC[15]+1.3693063937629155*phiBC[14]+1.3693063937629155*phiBC[13]+1.3693063937629155*phiBC[12]-1.3693063937629155*phiBC[11]-1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]-1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); + atomicAdd(&bsrc[nodeOff+globalIdxs[14]],-(0.03513641844631532*rho[19])+0.03513641844631532*rho[18]-0.03513641844631532*rho[17]-0.06085806194501844*rho[16]+0.06085806194501844*rho[15]+0.06085806194501844*rho[14]+0.06085806194501844*rho[13]+0.06085806194501844*rho[12]-0.06085806194501844*rho[11]-0.06804138174397717*rho[10]+0.10540925533894596*rho[9]+0.10540925533894596*rho[8]+0.10540925533894596*rho[7]-0.0392837100659193*rho[6]+0.0392837100659193*rho[5]-0.0392837100659193*rho[4]-0.06804138174397717*rho[3]+0.06804138174397717*rho[2]-0.06804138174397717*rho[1]-0.35355339059327373*rho[0]); #else - bsrc[nodeOff+globalIdxs[14]] = -(2.3717082451262845*phiBC[19])+2.3717082451262845*phiBC[18]-2.3717082451262845*phiBC[17]-1.3693063937629155*phiBC[16]+1.3693063937629155*phiBC[15]+1.3693063937629155*phiBC[14]+1.3693063937629155*phiBC[13]+1.3693063937629155*phiBC[12]-1.3693063937629155*phiBC[11]-1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]-1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; + bsrc[nodeOff+globalIdxs[14]] += -(0.03513641844631532*rho[19])+0.03513641844631532*rho[18]-0.03513641844631532*rho[17]-0.06085806194501844*rho[16]+0.06085806194501844*rho[15]+0.06085806194501844*rho[14]+0.06085806194501844*rho[13]+0.06085806194501844*rho[12]-0.06085806194501844*rho[11]-0.06804138174397717*rho[10]+0.10540925533894596*rho[9]+0.10540925533894596*rho[8]+0.10540925533894596*rho[7]-0.0392837100659193*rho[6]+0.0392837100659193*rho[5]-0.0392837100659193*rho[4]-0.06804138174397717*rho[3]+0.06804138174397717*rho[2]-0.06804138174397717*rho[1]-0.35355339059327373*rho[0]; #endif #ifdef __CUDA_ARCH__ - atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[15]],__double_as_longlong(1.1858541225631423*phiBC[18]-1.3693063937629155*phiBC[15]-0.6846531968814578*phiBC[14]+1.3693063937629155*phiBC[13]+0.6846531968814578*phiBC[12]+0.7905694150420949*phiBC[9]-0.39528470752104744*phiBC[8]+0.7905694150420949*phiBC[7]-1.0606601717798214*phiBC[5]+0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); + atomicAdd(&bsrc[nodeOff+globalIdxs[15]],0.07027283689263068*rho[18]-0.12171612389003696*rho[14]+0.12171612389003696*rho[12]-0.21081851067789198*rho[8]-0.15713484026367727*rho[5]+0.2721655269759088*rho[3]-0.2721655269759088*rho[1]+0.4714045207910319*rho[0]); #else - bsrc[nodeOff+globalIdxs[15]] = 1.1858541225631423*phiBC[18]-1.3693063937629155*phiBC[15]-0.6846531968814578*phiBC[14]+1.3693063937629155*phiBC[13]+0.6846531968814578*phiBC[12]+0.7905694150420949*phiBC[9]-0.39528470752104744*phiBC[8]+0.7905694150420949*phiBC[7]-1.0606601717798214*phiBC[5]+0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; + bsrc[nodeOff+globalIdxs[15]] += 0.07027283689263068*rho[18]-0.12171612389003696*rho[14]+0.12171612389003696*rho[12]-0.21081851067789198*rho[8]-0.15713484026367727*rho[5]+0.2721655269759088*rho[3]-0.2721655269759088*rho[1]+0.4714045207910319*rho[0]; #endif #ifdef __CUDA_ARCH__ - atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[16]],__double_as_longlong(-(1.1858541225631423*phiBC[18])+1.3693063937629155*phiBC[15]-0.6846531968814578*phiBC[14]+1.3693063937629155*phiBC[13]-0.6846531968814578*phiBC[12]+0.7905694150420949*phiBC[9]-0.39528470752104744*phiBC[8]+0.7905694150420949*phiBC[7]+1.0606601717798214*phiBC[5]+0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); + atomicAdd(&bsrc[nodeOff+globalIdxs[16]],-(0.07027283689263068*rho[18])-0.12171612389003696*rho[14]-0.12171612389003696*rho[12]-0.21081851067789198*rho[8]+0.15713484026367727*rho[5]+0.2721655269759088*rho[3]+0.2721655269759088*rho[1]+0.4714045207910319*rho[0]); #else - bsrc[nodeOff+globalIdxs[16]] = -(1.1858541225631423*phiBC[18])+1.3693063937629155*phiBC[15]-0.6846531968814578*phiBC[14]+1.3693063937629155*phiBC[13]-0.6846531968814578*phiBC[12]+0.7905694150420949*phiBC[9]-0.39528470752104744*phiBC[8]+0.7905694150420949*phiBC[7]+1.0606601717798214*phiBC[5]+0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; + bsrc[nodeOff+globalIdxs[16]] += -(0.07027283689263068*rho[18])-0.12171612389003696*rho[14]-0.12171612389003696*rho[12]-0.21081851067789198*rho[8]+0.15713484026367727*rho[5]+0.2721655269759088*rho[3]+0.2721655269759088*rho[1]+0.4714045207910319*rho[0]; #endif #ifdef __CUDA_ARCH__ - atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[17]],__double_as_longlong(-(2.3717082451262845*phiBC[19])-2.3717082451262845*phiBC[18]+2.3717082451262845*phiBC[17]+1.3693063937629155*phiBC[16]-1.3693063937629155*phiBC[15]+1.3693063937629155*phiBC[14]+1.3693063937629155*phiBC[13]-1.3693063937629155*phiBC[12]+1.3693063937629155*phiBC[11]-1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]+1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); + atomicAdd(&bsrc[nodeOff+globalIdxs[17]],-(0.035136418446315335*rho[19])-0.035136418446315335*rho[18]+0.035136418446315335*rho[17]+0.060858061945018485*rho[16]-0.060858061945018485*rho[15]+0.060858061945018485*rho[14]+0.060858061945018485*rho[13]-0.060858061945018485*rho[12]+0.060858061945018485*rho[11]-0.06804138174397718*rho[10]+0.105409255338946*rho[9]+0.105409255338946*rho[8]+0.105409255338946*rho[7]+0.039283710065919325*rho[6]-0.039283710065919325*rho[5]-0.039283710065919325*rho[4]-0.06804138174397718*rho[3]-0.06804138174397718*rho[2]+0.06804138174397718*rho[1]-0.3535533905932739*rho[0]); #else - bsrc[nodeOff+globalIdxs[17]] = -(2.3717082451262845*phiBC[19])-2.3717082451262845*phiBC[18]+2.3717082451262845*phiBC[17]+1.3693063937629155*phiBC[16]-1.3693063937629155*phiBC[15]+1.3693063937629155*phiBC[14]+1.3693063937629155*phiBC[13]-1.3693063937629155*phiBC[12]+1.3693063937629155*phiBC[11]-1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]+1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; + bsrc[nodeOff+globalIdxs[17]] += -(0.035136418446315335*rho[19])-0.035136418446315335*rho[18]+0.035136418446315335*rho[17]+0.060858061945018485*rho[16]-0.060858061945018485*rho[15]+0.060858061945018485*rho[14]+0.060858061945018485*rho[13]-0.060858061945018485*rho[12]+0.060858061945018485*rho[11]-0.06804138174397718*rho[10]+0.105409255338946*rho[9]+0.105409255338946*rho[8]+0.105409255338946*rho[7]+0.039283710065919325*rho[6]-0.039283710065919325*rho[5]-0.039283710065919325*rho[4]-0.06804138174397718*rho[3]-0.06804138174397718*rho[2]+0.06804138174397718*rho[1]-0.3535533905932739*rho[0]; #endif #ifdef __CUDA_ARCH__ - atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[18]],__double_as_longlong(-(1.1858541225631423*phiBC[17])+1.3693063937629155*phiBC[16]+1.3693063937629155*phiBC[14]-0.6846531968814578*phiBC[13]-0.6846531968814578*phiBC[11]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]-0.39528470752104744*phiBC[7]+1.0606601717798214*phiBC[6]+0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]+0.3535533905932738*phiBC[0])); + atomicAdd(&bsrc[nodeOff+globalIdxs[18]],-(0.07027283689263068*rho[17])-0.12171612389003694*rho[13]-0.12171612389003694*rho[11]-0.21081851067789203*rho[7]+0.1571348402636773*rho[6]+0.27216552697590873*rho[3]+0.27216552697590873*rho[2]+0.47140452079103184*rho[0]); #else - bsrc[nodeOff+globalIdxs[18]] = -(1.1858541225631423*phiBC[17])+1.3693063937629155*phiBC[16]+1.3693063937629155*phiBC[14]-0.6846531968814578*phiBC[13]-0.6846531968814578*phiBC[11]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]-0.39528470752104744*phiBC[7]+1.0606601717798214*phiBC[6]+0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]+0.3535533905932738*phiBC[0]; + bsrc[nodeOff+globalIdxs[18]] += -(0.07027283689263068*rho[17])-0.12171612389003694*rho[13]-0.12171612389003694*rho[11]-0.21081851067789203*rho[7]+0.1571348402636773*rho[6]+0.27216552697590873*rho[3]+0.27216552697590873*rho[2]+0.47140452079103184*rho[0]; #endif #ifdef __CUDA_ARCH__ - atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[19]],__double_as_longlong(2.3717082451262845*phiBC[19]+2.3717082451262845*phiBC[18]+2.3717082451262845*phiBC[17]+1.3693063937629155*phiBC[16]+1.3693063937629155*phiBC[15]+1.3693063937629155*phiBC[14]+1.3693063937629155*phiBC[13]+1.3693063937629155*phiBC[12]+1.3693063937629155*phiBC[11]+1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]+1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); + atomicAdd(&bsrc[nodeOff+globalIdxs[19]],0.03513641844631532*rho[19]+0.03513641844631532*rho[18]+0.03513641844631532*rho[17]+0.06085806194501844*rho[16]+0.06085806194501844*rho[15]+0.06085806194501844*rho[14]+0.06085806194501844*rho[13]+0.06085806194501844*rho[12]+0.06085806194501844*rho[11]+0.06804138174397717*rho[10]+0.10540925533894596*rho[9]+0.10540925533894596*rho[8]+0.10540925533894596*rho[7]+0.0392837100659193*rho[6]+0.0392837100659193*rho[5]+0.0392837100659193*rho[4]-0.06804138174397717*rho[3]-0.06804138174397717*rho[2]-0.06804138174397717*rho[1]-0.35355339059327373*rho[0]); #else - bsrc[nodeOff+globalIdxs[19]] = 2.3717082451262845*phiBC[19]+2.3717082451262845*phiBC[18]+2.3717082451262845*phiBC[17]+1.3693063937629155*phiBC[16]+1.3693063937629155*phiBC[15]+1.3693063937629155*phiBC[14]+1.3693063937629155*phiBC[13]+1.3693063937629155*phiBC[12]+1.3693063937629155*phiBC[11]+1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]+1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; + bsrc[nodeOff+globalIdxs[19]] += 0.03513641844631532*rho[19]+0.03513641844631532*rho[18]+0.03513641844631532*rho[17]+0.06085806194501844*rho[16]+0.06085806194501844*rho[15]+0.06085806194501844*rho[14]+0.06085806194501844*rho[13]+0.06085806194501844*rho[12]+0.06085806194501844*rho[11]+0.06804138174397717*rho[10]+0.10540925533894596*rho[9]+0.10540925533894596*rho[8]+0.10540925533894596*rho[7]+0.0392837100659193*rho[6]+0.0392837100659193*rho[5]+0.0392837100659193*rho[4]-0.06804138174397717*rho[3]-0.06804138174397717*rho[2]-0.06804138174397717*rho[1]-0.35355339059327373*rho[0]; #endif } -GKYL_CU_DH void fem_parproj_src_stencil_weighted_1x_ser_p1_inx_nondirichletx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +GKYL_CU_DH void fem_parproj_src_stencil_noweight_3x_ser_p1_upz_dirichlet_ghostz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) { // rho: right side source. // weight: Weight in the projection operation. - // phiBC: Dirichlet boundary potential, given as a DG expansion in the ghost cell (volume). + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. // nodeOff: node offset (prob idx * global number of nodes). // globalIdxs: global linear index of each basis function/node in current cell. // bsrc: global right side source vector. #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[0]],0.5*rho[1]*weight[1]-0.28867513459481287*rho[0]*weight[1]-0.28867513459481287*weight[0]*rho[1]+0.5*rho[0]*weight[0]); + atomicAdd(&bsrc[nodeOff+globalIdxs[0]],-(0.06804138174397718*rho[7])+0.11785113019775795*rho[6]+0.11785113019775795*rho[5]+0.11785113019775795*rho[4]-0.20412414523193156*rho[3]-0.20412414523193156*rho[2]-0.20412414523193156*rho[1]+0.35355339059327384*rho[0]); #else - bsrc[nodeOff+globalIdxs[0]] += 0.5*rho[1]*weight[1]-0.28867513459481287*rho[0]*weight[1]-0.28867513459481287*weight[0]*rho[1]+0.5*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[0]] += -(0.06804138174397718*rho[7])+0.11785113019775795*rho[6]+0.11785113019775795*rho[5]+0.11785113019775795*rho[4]-0.20412414523193156*rho[3]-0.20412414523193156*rho[2]-0.20412414523193156*rho[1]+0.35355339059327384*rho[0]; #endif #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[1]],0.5*rho[1]*weight[1]+0.28867513459481287*rho[0]*weight[1]+0.28867513459481287*weight[0]*rho[1]+0.5*rho[0]*weight[0]); + atomicAdd(&bsrc[nodeOff+globalIdxs[1]],0.06804138174397718*rho[7]+0.11785113019775795*rho[6]-0.11785113019775795*rho[5]-0.11785113019775795*rho[4]-0.20412414523193156*rho[3]-0.20412414523193156*rho[2]+0.20412414523193156*rho[1]+0.35355339059327384*rho[0]); #else - bsrc[nodeOff+globalIdxs[1]] += 0.5*rho[1]*weight[1]+0.28867513459481287*rho[0]*weight[1]+0.28867513459481287*weight[0]*rho[1]+0.5*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[1]] += 0.06804138174397718*rho[7]+0.11785113019775795*rho[6]-0.11785113019775795*rho[5]-0.11785113019775795*rho[4]-0.20412414523193156*rho[3]-0.20412414523193156*rho[2]+0.20412414523193156*rho[1]+0.35355339059327384*rho[0]; #endif - -} - -GKYL_CU_DH void fem_parproj_src_stencil_weighted_1x_ser_p2_inx_nondirichletx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) -{ - // rho: right side source. - // weight: Weight in the projection operation. - // phiBC: Dirichlet boundary potential, given as a DG expansion in the ghost cell (volume). - // nodeOff: node offset (prob idx * global number of nodes). - // globalIdxs: global linear index of each basis function/node in current cell. - // bsrc: global right side source vector. - #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[0]],0.2619047619047619*rho[2]*weight[2]-0.25819888974716115*rho[1]*weight[2]+0.149071198499986*rho[0]*weight[2]-0.25819888974716115*weight[1]*rho[2]+0.149071198499986*weight[0]*rho[2]+0.30000000000000004*rho[1]*weight[1]-0.2886751345948129*rho[0]*weight[1]-0.2886751345948129*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]); + atomicAdd(&bsrc[nodeOff+globalIdxs[2]],0.06804138174397718*rho[7]-0.11785113019775795*rho[6]+0.11785113019775795*rho[5]-0.11785113019775795*rho[4]-0.20412414523193156*rho[3]+0.20412414523193156*rho[2]-0.20412414523193156*rho[1]+0.35355339059327384*rho[0]); #else - bsrc[nodeOff+globalIdxs[0]] += 0.2619047619047619*rho[2]*weight[2]-0.25819888974716115*rho[1]*weight[2]+0.149071198499986*rho[0]*weight[2]-0.25819888974716115*weight[1]*rho[2]+0.149071198499986*weight[0]*rho[2]+0.30000000000000004*rho[1]*weight[1]-0.2886751345948129*rho[0]*weight[1]-0.2886751345948129*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[2]] += 0.06804138174397718*rho[7]-0.11785113019775795*rho[6]+0.11785113019775795*rho[5]-0.11785113019775795*rho[4]-0.20412414523193156*rho[3]+0.20412414523193156*rho[2]-0.20412414523193156*rho[1]+0.35355339059327384*rho[0]; #endif #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[1]],0.4761904761904762*rho[2]*weight[2]-0.298142396999972*rho[0]*weight[2]-0.298142396999972*weight[0]*rho[2]+0.4*rho[1]*weight[1]+0.6666666666666667*rho[0]*weight[0]); + atomicAdd(&bsrc[nodeOff+globalIdxs[3]],-(0.06804138174397718*rho[7])-0.11785113019775795*rho[6]-0.11785113019775795*rho[5]+0.11785113019775795*rho[4]-0.20412414523193156*rho[3]+0.20412414523193156*rho[2]+0.20412414523193156*rho[1]+0.35355339059327384*rho[0]); #else - bsrc[nodeOff+globalIdxs[1]] += 0.4761904761904762*rho[2]*weight[2]-0.298142396999972*rho[0]*weight[2]-0.298142396999972*weight[0]*rho[2]+0.4*rho[1]*weight[1]+0.6666666666666667*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[3]] += -(0.06804138174397718*rho[7])-0.11785113019775795*rho[6]-0.11785113019775795*rho[5]+0.11785113019775795*rho[4]-0.20412414523193156*rho[3]+0.20412414523193156*rho[2]+0.20412414523193156*rho[1]+0.35355339059327384*rho[0]; #endif #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[2]],0.2619047619047619*rho[2]*weight[2]+0.25819888974716115*rho[1]*weight[2]+0.149071198499986*rho[0]*weight[2]+0.25819888974716115*weight[1]*rho[2]+0.149071198499986*weight[0]*rho[2]+0.30000000000000004*rho[1]*weight[1]+0.2886751345948129*rho[0]*weight[1]+0.2886751345948129*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]); + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[4]],__double_as_longlong(-(1.8371173070873836*phiBC[7])+1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); #else - bsrc[nodeOff+globalIdxs[2]] += 0.2619047619047619*rho[2]*weight[2]+0.25819888974716115*rho[1]*weight[2]+0.149071198499986*rho[0]*weight[2]+0.25819888974716115*weight[1]*rho[2]+0.149071198499986*weight[0]*rho[2]+0.30000000000000004*rho[1]*weight[1]+0.2886751345948129*rho[0]*weight[1]+0.2886751345948129*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[4]] = -(1.8371173070873836*phiBC[7])+1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[5]],__double_as_longlong(1.8371173070873836*phiBC[7]+1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); + #else + bsrc[nodeOff+globalIdxs[5]] = 1.8371173070873836*phiBC[7]+1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[6]],__double_as_longlong(1.8371173070873836*phiBC[7]-1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); + #else + bsrc[nodeOff+globalIdxs[6]] = 1.8371173070873836*phiBC[7]-1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[7]],__double_as_longlong(-(1.8371173070873836*phiBC[7])-1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); + #else + bsrc[nodeOff+globalIdxs[7]] = -(1.8371173070873836*phiBC[7])-1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; #endif } -GKYL_CU_DH void fem_parproj_src_stencil_weighted_1x_ser_p1_lox_nondirichletx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +GKYL_CU_DH void fem_parproj_src_stencil_noweight_3x_ser_p2_upz_dirichlet_ghostz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) { // rho: right side source. // weight: Weight in the projection operation. - // phiBC: Dirichlet boundary potential, given as a DG expansion in the ghost cell (volume). + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. // nodeOff: node offset (prob idx * global number of nodes). // globalIdxs: global linear index of each basis function/node in current cell. // bsrc: global right side source vector. #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[0]],0.5*rho[1]*weight[1]-0.28867513459481287*rho[0]*weight[1]-0.28867513459481287*weight[0]*rho[1]+0.5*rho[0]*weight[0]); + atomicAdd(&bsrc[nodeOff+globalIdxs[0]],0.03513641844631534*rho[19]+0.03513641844631534*rho[18]+0.03513641844631534*rho[17]-0.06085806194501849*rho[16]-0.06085806194501849*rho[15]-0.06085806194501849*rho[14]-0.06085806194501849*rho[13]-0.06085806194501849*rho[12]-0.06085806194501849*rho[11]-0.0680413817439772*rho[10]+0.10540925533894603*rho[9]+0.10540925533894603*rho[8]+0.10540925533894603*rho[7]+0.039283710065919325*rho[6]+0.039283710065919325*rho[5]+0.039283710065919325*rho[4]+0.0680413817439772*rho[3]+0.0680413817439772*rho[2]+0.0680413817439772*rho[1]-0.3535533905932739*rho[0]); #else - bsrc[nodeOff+globalIdxs[0]] += 0.5*rho[1]*weight[1]-0.28867513459481287*rho[0]*weight[1]-0.28867513459481287*weight[0]*rho[1]+0.5*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[0]] += 0.03513641844631534*rho[19]+0.03513641844631534*rho[18]+0.03513641844631534*rho[17]-0.06085806194501849*rho[16]-0.06085806194501849*rho[15]-0.06085806194501849*rho[14]-0.06085806194501849*rho[13]-0.06085806194501849*rho[12]-0.06085806194501849*rho[11]-0.0680413817439772*rho[10]+0.10540925533894603*rho[9]+0.10540925533894603*rho[8]+0.10540925533894603*rho[7]+0.039283710065919325*rho[6]+0.039283710065919325*rho[5]+0.039283710065919325*rho[4]+0.0680413817439772*rho[3]+0.0680413817439772*rho[2]+0.0680413817439772*rho[1]-0.3535533905932739*rho[0]; #endif #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[1]],0.5*rho[1]*weight[1]+0.28867513459481287*rho[0]*weight[1]+0.28867513459481287*weight[0]*rho[1]+0.5*rho[0]*weight[0]); + atomicAdd(&bsrc[nodeOff+globalIdxs[1]],-(0.07027283689263068*rho[17])+0.12171612389003698*rho[13]+0.12171612389003698*rho[11]-0.21081851067789206*rho[7]+0.1571348402636773*rho[6]-0.2721655269759088*rho[3]-0.2721655269759088*rho[2]+0.4714045207910319*rho[0]); #else - bsrc[nodeOff+globalIdxs[1]] += 0.5*rho[1]*weight[1]+0.28867513459481287*rho[0]*weight[1]+0.28867513459481287*weight[0]*rho[1]+0.5*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[1]] += -(0.07027283689263068*rho[17])+0.12171612389003698*rho[13]+0.12171612389003698*rho[11]-0.21081851067789206*rho[7]+0.1571348402636773*rho[6]-0.2721655269759088*rho[3]-0.2721655269759088*rho[2]+0.4714045207910319*rho[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[2]],-(0.03513641844631534*rho[19])-0.03513641844631534*rho[18]+0.03513641844631534*rho[17]-0.06085806194501848*rho[16]+0.06085806194501848*rho[15]-0.06085806194501848*rho[14]-0.06085806194501848*rho[13]+0.06085806194501848*rho[12]-0.06085806194501848*rho[11]+0.0680413817439772*rho[10]+0.10540925533894599*rho[9]+0.10540925533894599*rho[8]+0.10540925533894599*rho[7]+0.03928371006591932*rho[6]-0.03928371006591932*rho[5]-0.03928371006591932*rho[4]+0.0680413817439772*rho[3]+0.0680413817439772*rho[2]-0.0680413817439772*rho[1]-0.3535533905932739*rho[0]); + #else + bsrc[nodeOff+globalIdxs[2]] += -(0.03513641844631534*rho[19])-0.03513641844631534*rho[18]+0.03513641844631534*rho[17]-0.06085806194501848*rho[16]+0.06085806194501848*rho[15]-0.06085806194501848*rho[14]-0.06085806194501848*rho[13]+0.06085806194501848*rho[12]-0.06085806194501848*rho[11]+0.0680413817439772*rho[10]+0.10540925533894599*rho[9]+0.10540925533894599*rho[8]+0.10540925533894599*rho[7]+0.03928371006591932*rho[6]-0.03928371006591932*rho[5]-0.03928371006591932*rho[4]+0.0680413817439772*rho[3]+0.0680413817439772*rho[2]-0.0680413817439772*rho[1]-0.3535533905932739*rho[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[3]],-(0.07027283689263064*rho[18])+0.12171612389003689*rho[14]+0.12171612389003689*rho[12]-0.21081851067789192*rho[8]+0.1571348402636772*rho[5]-0.2721655269759087*rho[3]-0.2721655269759087*rho[1]+0.47140452079103157*rho[0]); + #else + bsrc[nodeOff+globalIdxs[3]] += -(0.07027283689263064*rho[18])+0.12171612389003689*rho[14]+0.12171612389003689*rho[12]-0.21081851067789192*rho[8]+0.1571348402636772*rho[5]-0.2721655269759087*rho[3]-0.2721655269759087*rho[1]+0.47140452079103157*rho[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[4]],0.07027283689263068*rho[18]+0.12171612389003694*rho[14]-0.12171612389003694*rho[12]-0.21081851067789203*rho[8]-0.1571348402636773*rho[5]-0.27216552697590873*rho[3]+0.27216552697590873*rho[1]+0.47140452079103184*rho[0]); + #else + bsrc[nodeOff+globalIdxs[4]] += 0.07027283689263068*rho[18]+0.12171612389003694*rho[14]-0.12171612389003694*rho[12]-0.21081851067789203*rho[8]-0.1571348402636773*rho[5]-0.27216552697590873*rho[3]+0.27216552697590873*rho[1]+0.47140452079103184*rho[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[5]],-(0.03513641844631532*rho[19])+0.03513641844631532*rho[18]-0.03513641844631532*rho[17]+0.06085806194501844*rho[16]-0.06085806194501844*rho[15]-0.06085806194501844*rho[14]-0.06085806194501844*rho[13]-0.06085806194501844*rho[12]+0.06085806194501844*rho[11]+0.06804138174397717*rho[10]+0.10540925533894596*rho[9]+0.10540925533894596*rho[8]+0.10540925533894596*rho[7]-0.0392837100659193*rho[6]+0.0392837100659193*rho[5]-0.0392837100659193*rho[4]+0.06804138174397717*rho[3]-0.06804138174397717*rho[2]+0.06804138174397717*rho[1]-0.35355339059327373*rho[0]); + #else + bsrc[nodeOff+globalIdxs[5]] += -(0.03513641844631532*rho[19])+0.03513641844631532*rho[18]-0.03513641844631532*rho[17]+0.06085806194501844*rho[16]-0.06085806194501844*rho[15]-0.06085806194501844*rho[14]-0.06085806194501844*rho[13]-0.06085806194501844*rho[12]+0.06085806194501844*rho[11]+0.06804138174397717*rho[10]+0.10540925533894596*rho[9]+0.10540925533894596*rho[8]+0.10540925533894596*rho[7]-0.0392837100659193*rho[6]+0.0392837100659193*rho[5]-0.0392837100659193*rho[4]+0.06804138174397717*rho[3]-0.06804138174397717*rho[2]+0.06804138174397717*rho[1]-0.35355339059327373*rho[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[6]],0.07027283689263068*rho[17]+0.12171612389003694*rho[13]-0.12171612389003694*rho[11]-0.21081851067789203*rho[7]-0.1571348402636773*rho[6]-0.27216552697590873*rho[3]+0.27216552697590873*rho[2]+0.47140452079103184*rho[0]); + #else + bsrc[nodeOff+globalIdxs[6]] += 0.07027283689263068*rho[17]+0.12171612389003694*rho[13]-0.12171612389003694*rho[11]-0.21081851067789203*rho[7]-0.1571348402636773*rho[6]-0.27216552697590873*rho[3]+0.27216552697590873*rho[2]+0.47140452079103184*rho[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[7]],0.03513641844631532*rho[19]-0.03513641844631532*rho[18]-0.03513641844631532*rho[17]+0.06085806194501846*rho[16]+0.06085806194501846*rho[15]-0.06085806194501846*rho[14]-0.06085806194501846*rho[13]+0.06085806194501846*rho[12]+0.06085806194501846*rho[11]-0.06804138174397717*rho[10]+0.10540925533894596*rho[9]+0.10540925533894596*rho[8]+0.10540925533894596*rho[7]-0.039283710065919304*rho[6]-0.039283710065919304*rho[5]+0.039283710065919304*rho[4]+0.06804138174397717*rho[3]-0.06804138174397717*rho[2]-0.06804138174397717*rho[1]-0.35355339059327373*rho[0]); + #else + bsrc[nodeOff+globalIdxs[7]] += 0.03513641844631532*rho[19]-0.03513641844631532*rho[18]-0.03513641844631532*rho[17]+0.06085806194501846*rho[16]+0.06085806194501846*rho[15]-0.06085806194501846*rho[14]-0.06085806194501846*rho[13]+0.06085806194501846*rho[12]+0.06085806194501846*rho[11]-0.06804138174397717*rho[10]+0.10540925533894596*rho[9]+0.10540925533894596*rho[8]+0.10540925533894596*rho[7]-0.039283710065919304*rho[6]-0.039283710065919304*rho[5]+0.039283710065919304*rho[4]+0.06804138174397717*rho[3]-0.06804138174397717*rho[2]-0.06804138174397717*rho[1]-0.35355339059327373*rho[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[8]],-(0.07027283689263064*rho[19])+0.12171612389003691*rho[16]+0.12171612389003691*rho[15]-0.21081851067789192*rho[9]+0.15713484026367722*rho[4]-0.2721655269759087*rho[2]-0.2721655269759087*rho[1]+0.4714045207910317*rho[0]); + #else + bsrc[nodeOff+globalIdxs[8]] += -(0.07027283689263064*rho[19])+0.12171612389003691*rho[16]+0.12171612389003691*rho[15]-0.21081851067789192*rho[9]+0.15713484026367722*rho[4]-0.2721655269759087*rho[2]-0.2721655269759087*rho[1]+0.4714045207910317*rho[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[9]],0.07027283689263068*rho[19]+0.12171612389003698*rho[16]-0.12171612389003698*rho[15]-0.21081851067789206*rho[9]-0.1571348402636773*rho[4]-0.2721655269759088*rho[2]+0.2721655269759088*rho[1]+0.4714045207910319*rho[0]); + #else + bsrc[nodeOff+globalIdxs[9]] += 0.07027283689263068*rho[19]+0.12171612389003698*rho[16]-0.12171612389003698*rho[15]-0.21081851067789206*rho[9]-0.1571348402636773*rho[4]-0.2721655269759088*rho[2]+0.2721655269759088*rho[1]+0.4714045207910319*rho[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[10]],0.07027283689263068*rho[19]-0.12171612389003698*rho[16]+0.12171612389003698*rho[15]-0.21081851067789206*rho[9]-0.1571348402636773*rho[4]+0.2721655269759088*rho[2]-0.2721655269759088*rho[1]+0.4714045207910319*rho[0]); + #else + bsrc[nodeOff+globalIdxs[10]] += 0.07027283689263068*rho[19]-0.12171612389003698*rho[16]+0.12171612389003698*rho[15]-0.21081851067789206*rho[9]-0.1571348402636773*rho[4]+0.2721655269759088*rho[2]-0.2721655269759088*rho[1]+0.4714045207910319*rho[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[11]],-(0.07027283689263064*rho[19])-0.12171612389003691*rho[16]-0.12171612389003691*rho[15]-0.21081851067789192*rho[9]+0.15713484026367722*rho[4]+0.2721655269759087*rho[2]+0.2721655269759087*rho[1]+0.4714045207910317*rho[0]); + #else + bsrc[nodeOff+globalIdxs[11]] += -(0.07027283689263064*rho[19])-0.12171612389003691*rho[16]-0.12171612389003691*rho[15]-0.21081851067789192*rho[9]+0.15713484026367722*rho[4]+0.2721655269759087*rho[2]+0.2721655269759087*rho[1]+0.4714045207910317*rho[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[12]],__double_as_longlong(2.3717082451262845*phiBC[19]+2.3717082451262845*phiBC[18]+2.3717082451262845*phiBC[17]-1.3693063937629155*phiBC[16]-1.3693063937629155*phiBC[15]-1.3693063937629155*phiBC[14]-1.3693063937629155*phiBC[13]-1.3693063937629155*phiBC[12]-1.3693063937629155*phiBC[11]-1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]+1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); + #else + bsrc[nodeOff+globalIdxs[12]] = 2.3717082451262845*phiBC[19]+2.3717082451262845*phiBC[18]+2.3717082451262845*phiBC[17]-1.3693063937629155*phiBC[16]-1.3693063937629155*phiBC[15]-1.3693063937629155*phiBC[14]-1.3693063937629155*phiBC[13]-1.3693063937629155*phiBC[12]-1.3693063937629155*phiBC[11]-1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]+1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[13]],__double_as_longlong(-(1.1858541225631423*phiBC[17])-1.3693063937629155*phiBC[16]-1.3693063937629155*phiBC[14]+0.6846531968814578*phiBC[13]+0.6846531968814578*phiBC[11]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]-0.39528470752104744*phiBC[7]+1.0606601717798214*phiBC[6]-0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]+0.3535533905932738*phiBC[0])); + #else + bsrc[nodeOff+globalIdxs[13]] = -(1.1858541225631423*phiBC[17])-1.3693063937629155*phiBC[16]-1.3693063937629155*phiBC[14]+0.6846531968814578*phiBC[13]+0.6846531968814578*phiBC[11]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]-0.39528470752104744*phiBC[7]+1.0606601717798214*phiBC[6]-0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]+0.3535533905932738*phiBC[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[14]],__double_as_longlong(-(2.3717082451262845*phiBC[19])-2.3717082451262845*phiBC[18]+2.3717082451262845*phiBC[17]-1.3693063937629155*phiBC[16]+1.3693063937629155*phiBC[15]-1.3693063937629155*phiBC[14]-1.3693063937629155*phiBC[13]+1.3693063937629155*phiBC[12]-1.3693063937629155*phiBC[11]+1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]+1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); + #else + bsrc[nodeOff+globalIdxs[14]] = -(2.3717082451262845*phiBC[19])-2.3717082451262845*phiBC[18]+2.3717082451262845*phiBC[17]-1.3693063937629155*phiBC[16]+1.3693063937629155*phiBC[15]-1.3693063937629155*phiBC[14]-1.3693063937629155*phiBC[13]+1.3693063937629155*phiBC[12]-1.3693063937629155*phiBC[11]+1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]+1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[15]],__double_as_longlong(-(1.1858541225631423*phiBC[18])-1.3693063937629155*phiBC[15]+0.6846531968814578*phiBC[14]-1.3693063937629155*phiBC[13]+0.6846531968814578*phiBC[12]+0.7905694150420949*phiBC[9]-0.39528470752104744*phiBC[8]+0.7905694150420949*phiBC[7]+1.0606601717798214*phiBC[5]-0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); + #else + bsrc[nodeOff+globalIdxs[15]] = -(1.1858541225631423*phiBC[18])-1.3693063937629155*phiBC[15]+0.6846531968814578*phiBC[14]-1.3693063937629155*phiBC[13]+0.6846531968814578*phiBC[12]+0.7905694150420949*phiBC[9]-0.39528470752104744*phiBC[8]+0.7905694150420949*phiBC[7]+1.0606601717798214*phiBC[5]-0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[16]],__double_as_longlong(1.1858541225631423*phiBC[18]+1.3693063937629155*phiBC[15]+0.6846531968814578*phiBC[14]-1.3693063937629155*phiBC[13]-0.6846531968814578*phiBC[12]+0.7905694150420949*phiBC[9]-0.39528470752104744*phiBC[8]+0.7905694150420949*phiBC[7]-1.0606601717798214*phiBC[5]-0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); + #else + bsrc[nodeOff+globalIdxs[16]] = 1.1858541225631423*phiBC[18]+1.3693063937629155*phiBC[15]+0.6846531968814578*phiBC[14]-1.3693063937629155*phiBC[13]-0.6846531968814578*phiBC[12]+0.7905694150420949*phiBC[9]-0.39528470752104744*phiBC[8]+0.7905694150420949*phiBC[7]-1.0606601717798214*phiBC[5]-0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[17]],__double_as_longlong(-(2.3717082451262845*phiBC[19])+2.3717082451262845*phiBC[18]-2.3717082451262845*phiBC[17]+1.3693063937629155*phiBC[16]-1.3693063937629155*phiBC[15]-1.3693063937629155*phiBC[14]-1.3693063937629155*phiBC[13]-1.3693063937629155*phiBC[12]+1.3693063937629155*phiBC[11]+1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]-1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); + #else + bsrc[nodeOff+globalIdxs[17]] = -(2.3717082451262845*phiBC[19])+2.3717082451262845*phiBC[18]-2.3717082451262845*phiBC[17]+1.3693063937629155*phiBC[16]-1.3693063937629155*phiBC[15]-1.3693063937629155*phiBC[14]-1.3693063937629155*phiBC[13]-1.3693063937629155*phiBC[12]+1.3693063937629155*phiBC[11]+1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]-1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[18]],__double_as_longlong(1.1858541225631423*phiBC[17]+1.3693063937629155*phiBC[16]-1.3693063937629155*phiBC[14]+0.6846531968814578*phiBC[13]-0.6846531968814578*phiBC[11]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]-0.39528470752104744*phiBC[7]-1.0606601717798214*phiBC[6]-0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]+0.3535533905932738*phiBC[0])); + #else + bsrc[nodeOff+globalIdxs[18]] = 1.1858541225631423*phiBC[17]+1.3693063937629155*phiBC[16]-1.3693063937629155*phiBC[14]+0.6846531968814578*phiBC[13]-0.6846531968814578*phiBC[11]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]-0.39528470752104744*phiBC[7]-1.0606601717798214*phiBC[6]-0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]+0.3535533905932738*phiBC[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[19]],__double_as_longlong(2.3717082451262845*phiBC[19]-2.3717082451262845*phiBC[18]-2.3717082451262845*phiBC[17]+1.3693063937629155*phiBC[16]+1.3693063937629155*phiBC[15]-1.3693063937629155*phiBC[14]-1.3693063937629155*phiBC[13]+1.3693063937629155*phiBC[12]+1.3693063937629155*phiBC[11]-1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]-1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); + #else + bsrc[nodeOff+globalIdxs[19]] = 2.3717082451262845*phiBC[19]-2.3717082451262845*phiBC[18]-2.3717082451262845*phiBC[17]+1.3693063937629155*phiBC[16]+1.3693063937629155*phiBC[15]-1.3693063937629155*phiBC[14]-1.3693063937629155*phiBC[13]+1.3693063937629155*phiBC[12]+1.3693063937629155*phiBC[11]-1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]-1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; #endif } -GKYL_CU_DH void fem_parproj_src_stencil_weighted_1x_ser_p2_lox_nondirichletx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +GKYL_CU_DH void fem_parproj_src_stencil_noweight_3x_ser_p1_upz_dirichlet_skinz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) { // rho: right side source. // weight: Weight in the projection operation. - // phiBC: Dirichlet boundary potential, given as a DG expansion in the ghost cell (volume). + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. // nodeOff: node offset (prob idx * global number of nodes). // globalIdxs: global linear index of each basis function/node in current cell. // bsrc: global right side source vector. #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[0]],0.2619047619047619*rho[2]*weight[2]-0.25819888974716115*rho[1]*weight[2]+0.149071198499986*rho[0]*weight[2]-0.25819888974716115*weight[1]*rho[2]+0.149071198499986*weight[0]*rho[2]+0.30000000000000004*rho[1]*weight[1]-0.2886751345948129*rho[0]*weight[1]-0.2886751345948129*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]); + atomicAdd(&bsrc[nodeOff+globalIdxs[0]],-(0.06804138174397718*rho[7])+0.11785113019775795*rho[6]+0.11785113019775795*rho[5]+0.11785113019775795*rho[4]-0.20412414523193156*rho[3]-0.20412414523193156*rho[2]-0.20412414523193156*rho[1]+0.35355339059327384*rho[0]); #else - bsrc[nodeOff+globalIdxs[0]] += 0.2619047619047619*rho[2]*weight[2]-0.25819888974716115*rho[1]*weight[2]+0.149071198499986*rho[0]*weight[2]-0.25819888974716115*weight[1]*rho[2]+0.149071198499986*weight[0]*rho[2]+0.30000000000000004*rho[1]*weight[1]-0.2886751345948129*rho[0]*weight[1]-0.2886751345948129*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[0]] += -(0.06804138174397718*rho[7])+0.11785113019775795*rho[6]+0.11785113019775795*rho[5]+0.11785113019775795*rho[4]-0.20412414523193156*rho[3]-0.20412414523193156*rho[2]-0.20412414523193156*rho[1]+0.35355339059327384*rho[0]; #endif #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[1]],0.4761904761904762*rho[2]*weight[2]-0.298142396999972*rho[0]*weight[2]-0.298142396999972*weight[0]*rho[2]+0.4*rho[1]*weight[1]+0.6666666666666667*rho[0]*weight[0]); + atomicAdd(&bsrc[nodeOff+globalIdxs[1]],0.06804138174397718*rho[7]+0.11785113019775795*rho[6]-0.11785113019775795*rho[5]-0.11785113019775795*rho[4]-0.20412414523193156*rho[3]-0.20412414523193156*rho[2]+0.20412414523193156*rho[1]+0.35355339059327384*rho[0]); #else - bsrc[nodeOff+globalIdxs[1]] += 0.4761904761904762*rho[2]*weight[2]-0.298142396999972*rho[0]*weight[2]-0.298142396999972*weight[0]*rho[2]+0.4*rho[1]*weight[1]+0.6666666666666667*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[1]] += 0.06804138174397718*rho[7]+0.11785113019775795*rho[6]-0.11785113019775795*rho[5]-0.11785113019775795*rho[4]-0.20412414523193156*rho[3]-0.20412414523193156*rho[2]+0.20412414523193156*rho[1]+0.35355339059327384*rho[0]; #endif #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[2]],0.2619047619047619*rho[2]*weight[2]+0.25819888974716115*rho[1]*weight[2]+0.149071198499986*rho[0]*weight[2]+0.25819888974716115*weight[1]*rho[2]+0.149071198499986*weight[0]*rho[2]+0.30000000000000004*rho[1]*weight[1]+0.2886751345948129*rho[0]*weight[1]+0.2886751345948129*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]); + atomicAdd(&bsrc[nodeOff+globalIdxs[2]],0.06804138174397718*rho[7]-0.11785113019775795*rho[6]+0.11785113019775795*rho[5]-0.11785113019775795*rho[4]-0.20412414523193156*rho[3]+0.20412414523193156*rho[2]-0.20412414523193156*rho[1]+0.35355339059327384*rho[0]); #else - bsrc[nodeOff+globalIdxs[2]] += 0.2619047619047619*rho[2]*weight[2]+0.25819888974716115*rho[1]*weight[2]+0.149071198499986*rho[0]*weight[2]+0.25819888974716115*weight[1]*rho[2]+0.149071198499986*weight[0]*rho[2]+0.30000000000000004*rho[1]*weight[1]+0.2886751345948129*rho[0]*weight[1]+0.2886751345948129*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[2]] += 0.06804138174397718*rho[7]-0.11785113019775795*rho[6]+0.11785113019775795*rho[5]-0.11785113019775795*rho[4]-0.20412414523193156*rho[3]+0.20412414523193156*rho[2]-0.20412414523193156*rho[1]+0.35355339059327384*rho[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[3]],-(0.06804138174397718*rho[7])-0.11785113019775795*rho[6]-0.11785113019775795*rho[5]+0.11785113019775795*rho[4]-0.20412414523193156*rho[3]+0.20412414523193156*rho[2]+0.20412414523193156*rho[1]+0.35355339059327384*rho[0]); + #else + bsrc[nodeOff+globalIdxs[3]] += -(0.06804138174397718*rho[7])-0.11785113019775795*rho[6]-0.11785113019775795*rho[5]+0.11785113019775795*rho[4]-0.20412414523193156*rho[3]+0.20412414523193156*rho[2]+0.20412414523193156*rho[1]+0.35355339059327384*rho[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[4]],__double_as_longlong(1.8371173070873836*phiBC[7]-1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); + #else + bsrc[nodeOff+globalIdxs[4]] = 1.8371173070873836*phiBC[7]-1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[5]],__double_as_longlong(-(1.8371173070873836*phiBC[7])-1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); + #else + bsrc[nodeOff+globalIdxs[5]] = -(1.8371173070873836*phiBC[7])-1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[6]],__double_as_longlong(-(1.8371173070873836*phiBC[7])+1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); + #else + bsrc[nodeOff+globalIdxs[6]] = -(1.8371173070873836*phiBC[7])+1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[7]],__double_as_longlong(1.8371173070873836*phiBC[7]+1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); + #else + bsrc[nodeOff+globalIdxs[7]] = 1.8371173070873836*phiBC[7]+1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; #endif } -GKYL_CU_DH void fem_parproj_src_stencil_weighted_1x_ser_p1_lox_dirichletx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +GKYL_CU_DH void fem_parproj_src_stencil_noweight_3x_ser_p2_upz_dirichlet_skinz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) { // rho: right side source. // weight: Weight in the projection operation. - // phiBC: Dirichlet boundary potential, given as a DG expansion in the ghost cell (volume). + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. // nodeOff: node offset (prob idx * global number of nodes). // globalIdxs: global linear index of each basis function/node in current cell. // bsrc: global right side source vector. #ifdef __CUDA_ARCH__ - atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[0]],__double_as_longlong(0.7071067811865476*phiBC[0]-1.2247448713915892*phiBC[1])); + atomicAdd(&bsrc[nodeOff+globalIdxs[0]],0.03513641844631534*rho[19]+0.03513641844631534*rho[18]+0.03513641844631534*rho[17]-0.06085806194501849*rho[16]-0.06085806194501849*rho[15]-0.06085806194501849*rho[14]-0.06085806194501849*rho[13]-0.06085806194501849*rho[12]-0.06085806194501849*rho[11]-0.0680413817439772*rho[10]+0.10540925533894603*rho[9]+0.10540925533894603*rho[8]+0.10540925533894603*rho[7]+0.039283710065919325*rho[6]+0.039283710065919325*rho[5]+0.039283710065919325*rho[4]+0.0680413817439772*rho[3]+0.0680413817439772*rho[2]+0.0680413817439772*rho[1]-0.3535533905932739*rho[0]); + #else + bsrc[nodeOff+globalIdxs[0]] += 0.03513641844631534*rho[19]+0.03513641844631534*rho[18]+0.03513641844631534*rho[17]-0.06085806194501849*rho[16]-0.06085806194501849*rho[15]-0.06085806194501849*rho[14]-0.06085806194501849*rho[13]-0.06085806194501849*rho[12]-0.06085806194501849*rho[11]-0.0680413817439772*rho[10]+0.10540925533894603*rho[9]+0.10540925533894603*rho[8]+0.10540925533894603*rho[7]+0.039283710065919325*rho[6]+0.039283710065919325*rho[5]+0.039283710065919325*rho[4]+0.0680413817439772*rho[3]+0.0680413817439772*rho[2]+0.0680413817439772*rho[1]-0.3535533905932739*rho[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[1]],-(0.07027283689263068*rho[17])+0.12171612389003698*rho[13]+0.12171612389003698*rho[11]-0.21081851067789206*rho[7]+0.1571348402636773*rho[6]-0.2721655269759088*rho[3]-0.2721655269759088*rho[2]+0.4714045207910319*rho[0]); + #else + bsrc[nodeOff+globalIdxs[1]] += -(0.07027283689263068*rho[17])+0.12171612389003698*rho[13]+0.12171612389003698*rho[11]-0.21081851067789206*rho[7]+0.1571348402636773*rho[6]-0.2721655269759088*rho[3]-0.2721655269759088*rho[2]+0.4714045207910319*rho[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[2]],-(0.03513641844631534*rho[19])-0.03513641844631534*rho[18]+0.03513641844631534*rho[17]-0.06085806194501848*rho[16]+0.06085806194501848*rho[15]-0.06085806194501848*rho[14]-0.06085806194501848*rho[13]+0.06085806194501848*rho[12]-0.06085806194501848*rho[11]+0.0680413817439772*rho[10]+0.10540925533894599*rho[9]+0.10540925533894599*rho[8]+0.10540925533894599*rho[7]+0.03928371006591932*rho[6]-0.03928371006591932*rho[5]-0.03928371006591932*rho[4]+0.0680413817439772*rho[3]+0.0680413817439772*rho[2]-0.0680413817439772*rho[1]-0.3535533905932739*rho[0]); + #else + bsrc[nodeOff+globalIdxs[2]] += -(0.03513641844631534*rho[19])-0.03513641844631534*rho[18]+0.03513641844631534*rho[17]-0.06085806194501848*rho[16]+0.06085806194501848*rho[15]-0.06085806194501848*rho[14]-0.06085806194501848*rho[13]+0.06085806194501848*rho[12]-0.06085806194501848*rho[11]+0.0680413817439772*rho[10]+0.10540925533894599*rho[9]+0.10540925533894599*rho[8]+0.10540925533894599*rho[7]+0.03928371006591932*rho[6]-0.03928371006591932*rho[5]-0.03928371006591932*rho[4]+0.0680413817439772*rho[3]+0.0680413817439772*rho[2]-0.0680413817439772*rho[1]-0.3535533905932739*rho[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[3]],-(0.07027283689263064*rho[18])+0.12171612389003689*rho[14]+0.12171612389003689*rho[12]-0.21081851067789192*rho[8]+0.1571348402636772*rho[5]-0.2721655269759087*rho[3]-0.2721655269759087*rho[1]+0.47140452079103157*rho[0]); + #else + bsrc[nodeOff+globalIdxs[3]] += -(0.07027283689263064*rho[18])+0.12171612389003689*rho[14]+0.12171612389003689*rho[12]-0.21081851067789192*rho[8]+0.1571348402636772*rho[5]-0.2721655269759087*rho[3]-0.2721655269759087*rho[1]+0.47140452079103157*rho[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[4]],0.07027283689263068*rho[18]+0.12171612389003694*rho[14]-0.12171612389003694*rho[12]-0.21081851067789203*rho[8]-0.1571348402636773*rho[5]-0.27216552697590873*rho[3]+0.27216552697590873*rho[1]+0.47140452079103184*rho[0]); + #else + bsrc[nodeOff+globalIdxs[4]] += 0.07027283689263068*rho[18]+0.12171612389003694*rho[14]-0.12171612389003694*rho[12]-0.21081851067789203*rho[8]-0.1571348402636773*rho[5]-0.27216552697590873*rho[3]+0.27216552697590873*rho[1]+0.47140452079103184*rho[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[5]],-(0.03513641844631532*rho[19])+0.03513641844631532*rho[18]-0.03513641844631532*rho[17]+0.06085806194501844*rho[16]-0.06085806194501844*rho[15]-0.06085806194501844*rho[14]-0.06085806194501844*rho[13]-0.06085806194501844*rho[12]+0.06085806194501844*rho[11]+0.06804138174397717*rho[10]+0.10540925533894596*rho[9]+0.10540925533894596*rho[8]+0.10540925533894596*rho[7]-0.0392837100659193*rho[6]+0.0392837100659193*rho[5]-0.0392837100659193*rho[4]+0.06804138174397717*rho[3]-0.06804138174397717*rho[2]+0.06804138174397717*rho[1]-0.35355339059327373*rho[0]); + #else + bsrc[nodeOff+globalIdxs[5]] += -(0.03513641844631532*rho[19])+0.03513641844631532*rho[18]-0.03513641844631532*rho[17]+0.06085806194501844*rho[16]-0.06085806194501844*rho[15]-0.06085806194501844*rho[14]-0.06085806194501844*rho[13]-0.06085806194501844*rho[12]+0.06085806194501844*rho[11]+0.06804138174397717*rho[10]+0.10540925533894596*rho[9]+0.10540925533894596*rho[8]+0.10540925533894596*rho[7]-0.0392837100659193*rho[6]+0.0392837100659193*rho[5]-0.0392837100659193*rho[4]+0.06804138174397717*rho[3]-0.06804138174397717*rho[2]+0.06804138174397717*rho[1]-0.35355339059327373*rho[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[6]],0.07027283689263068*rho[17]+0.12171612389003694*rho[13]-0.12171612389003694*rho[11]-0.21081851067789203*rho[7]-0.1571348402636773*rho[6]-0.27216552697590873*rho[3]+0.27216552697590873*rho[2]+0.47140452079103184*rho[0]); + #else + bsrc[nodeOff+globalIdxs[6]] += 0.07027283689263068*rho[17]+0.12171612389003694*rho[13]-0.12171612389003694*rho[11]-0.21081851067789203*rho[7]-0.1571348402636773*rho[6]-0.27216552697590873*rho[3]+0.27216552697590873*rho[2]+0.47140452079103184*rho[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[7]],0.03513641844631532*rho[19]-0.03513641844631532*rho[18]-0.03513641844631532*rho[17]+0.06085806194501846*rho[16]+0.06085806194501846*rho[15]-0.06085806194501846*rho[14]-0.06085806194501846*rho[13]+0.06085806194501846*rho[12]+0.06085806194501846*rho[11]-0.06804138174397717*rho[10]+0.10540925533894596*rho[9]+0.10540925533894596*rho[8]+0.10540925533894596*rho[7]-0.039283710065919304*rho[6]-0.039283710065919304*rho[5]+0.039283710065919304*rho[4]+0.06804138174397717*rho[3]-0.06804138174397717*rho[2]-0.06804138174397717*rho[1]-0.35355339059327373*rho[0]); + #else + bsrc[nodeOff+globalIdxs[7]] += 0.03513641844631532*rho[19]-0.03513641844631532*rho[18]-0.03513641844631532*rho[17]+0.06085806194501846*rho[16]+0.06085806194501846*rho[15]-0.06085806194501846*rho[14]-0.06085806194501846*rho[13]+0.06085806194501846*rho[12]+0.06085806194501846*rho[11]-0.06804138174397717*rho[10]+0.10540925533894596*rho[9]+0.10540925533894596*rho[8]+0.10540925533894596*rho[7]-0.039283710065919304*rho[6]-0.039283710065919304*rho[5]+0.039283710065919304*rho[4]+0.06804138174397717*rho[3]-0.06804138174397717*rho[2]-0.06804138174397717*rho[1]-0.35355339059327373*rho[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[8]],-(0.07027283689263064*rho[19])+0.12171612389003691*rho[16]+0.12171612389003691*rho[15]-0.21081851067789192*rho[9]+0.15713484026367722*rho[4]-0.2721655269759087*rho[2]-0.2721655269759087*rho[1]+0.4714045207910317*rho[0]); + #else + bsrc[nodeOff+globalIdxs[8]] += -(0.07027283689263064*rho[19])+0.12171612389003691*rho[16]+0.12171612389003691*rho[15]-0.21081851067789192*rho[9]+0.15713484026367722*rho[4]-0.2721655269759087*rho[2]-0.2721655269759087*rho[1]+0.4714045207910317*rho[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[9]],0.07027283689263068*rho[19]+0.12171612389003698*rho[16]-0.12171612389003698*rho[15]-0.21081851067789206*rho[9]-0.1571348402636773*rho[4]-0.2721655269759088*rho[2]+0.2721655269759088*rho[1]+0.4714045207910319*rho[0]); + #else + bsrc[nodeOff+globalIdxs[9]] += 0.07027283689263068*rho[19]+0.12171612389003698*rho[16]-0.12171612389003698*rho[15]-0.21081851067789206*rho[9]-0.1571348402636773*rho[4]-0.2721655269759088*rho[2]+0.2721655269759088*rho[1]+0.4714045207910319*rho[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[10]],0.07027283689263068*rho[19]-0.12171612389003698*rho[16]+0.12171612389003698*rho[15]-0.21081851067789206*rho[9]-0.1571348402636773*rho[4]+0.2721655269759088*rho[2]-0.2721655269759088*rho[1]+0.4714045207910319*rho[0]); + #else + bsrc[nodeOff+globalIdxs[10]] += 0.07027283689263068*rho[19]-0.12171612389003698*rho[16]+0.12171612389003698*rho[15]-0.21081851067789206*rho[9]-0.1571348402636773*rho[4]+0.2721655269759088*rho[2]-0.2721655269759088*rho[1]+0.4714045207910319*rho[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[11]],-(0.07027283689263064*rho[19])-0.12171612389003691*rho[16]-0.12171612389003691*rho[15]-0.21081851067789192*rho[9]+0.15713484026367722*rho[4]+0.2721655269759087*rho[2]+0.2721655269759087*rho[1]+0.4714045207910317*rho[0]); + #else + bsrc[nodeOff+globalIdxs[11]] += -(0.07027283689263064*rho[19])-0.12171612389003691*rho[16]-0.12171612389003691*rho[15]-0.21081851067789192*rho[9]+0.15713484026367722*rho[4]+0.2721655269759087*rho[2]+0.2721655269759087*rho[1]+0.4714045207910317*rho[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[12]],__double_as_longlong(2.3717082451262845*phiBC[19]-2.3717082451262845*phiBC[18]-2.3717082451262845*phiBC[17]-1.3693063937629155*phiBC[16]-1.3693063937629155*phiBC[15]+1.3693063937629155*phiBC[14]+1.3693063937629155*phiBC[13]-1.3693063937629155*phiBC[12]-1.3693063937629155*phiBC[11]+1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]-1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); + #else + bsrc[nodeOff+globalIdxs[12]] = 2.3717082451262845*phiBC[19]-2.3717082451262845*phiBC[18]-2.3717082451262845*phiBC[17]-1.3693063937629155*phiBC[16]-1.3693063937629155*phiBC[15]+1.3693063937629155*phiBC[14]+1.3693063937629155*phiBC[13]-1.3693063937629155*phiBC[12]-1.3693063937629155*phiBC[11]+1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]-1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[13]],__double_as_longlong(1.1858541225631423*phiBC[17]-1.3693063937629155*phiBC[16]+1.3693063937629155*phiBC[14]-0.6846531968814578*phiBC[13]+0.6846531968814578*phiBC[11]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]-0.39528470752104744*phiBC[7]-1.0606601717798214*phiBC[6]+0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]+0.3535533905932738*phiBC[0])); + #else + bsrc[nodeOff+globalIdxs[13]] = 1.1858541225631423*phiBC[17]-1.3693063937629155*phiBC[16]+1.3693063937629155*phiBC[14]-0.6846531968814578*phiBC[13]+0.6846531968814578*phiBC[11]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]-0.39528470752104744*phiBC[7]-1.0606601717798214*phiBC[6]+0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]+0.3535533905932738*phiBC[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[14]],__double_as_longlong(-(2.3717082451262845*phiBC[19])+2.3717082451262845*phiBC[18]-2.3717082451262845*phiBC[17]-1.3693063937629155*phiBC[16]+1.3693063937629155*phiBC[15]+1.3693063937629155*phiBC[14]+1.3693063937629155*phiBC[13]+1.3693063937629155*phiBC[12]-1.3693063937629155*phiBC[11]-1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]-1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); + #else + bsrc[nodeOff+globalIdxs[14]] = -(2.3717082451262845*phiBC[19])+2.3717082451262845*phiBC[18]-2.3717082451262845*phiBC[17]-1.3693063937629155*phiBC[16]+1.3693063937629155*phiBC[15]+1.3693063937629155*phiBC[14]+1.3693063937629155*phiBC[13]+1.3693063937629155*phiBC[12]-1.3693063937629155*phiBC[11]-1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]-1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[15]],__double_as_longlong(1.1858541225631423*phiBC[18]-1.3693063937629155*phiBC[15]-0.6846531968814578*phiBC[14]+1.3693063937629155*phiBC[13]+0.6846531968814578*phiBC[12]+0.7905694150420949*phiBC[9]-0.39528470752104744*phiBC[8]+0.7905694150420949*phiBC[7]-1.0606601717798214*phiBC[5]+0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); + #else + bsrc[nodeOff+globalIdxs[15]] = 1.1858541225631423*phiBC[18]-1.3693063937629155*phiBC[15]-0.6846531968814578*phiBC[14]+1.3693063937629155*phiBC[13]+0.6846531968814578*phiBC[12]+0.7905694150420949*phiBC[9]-0.39528470752104744*phiBC[8]+0.7905694150420949*phiBC[7]-1.0606601717798214*phiBC[5]+0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[16]],__double_as_longlong(-(1.1858541225631423*phiBC[18])+1.3693063937629155*phiBC[15]-0.6846531968814578*phiBC[14]+1.3693063937629155*phiBC[13]-0.6846531968814578*phiBC[12]+0.7905694150420949*phiBC[9]-0.39528470752104744*phiBC[8]+0.7905694150420949*phiBC[7]+1.0606601717798214*phiBC[5]+0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); + #else + bsrc[nodeOff+globalIdxs[16]] = -(1.1858541225631423*phiBC[18])+1.3693063937629155*phiBC[15]-0.6846531968814578*phiBC[14]+1.3693063937629155*phiBC[13]-0.6846531968814578*phiBC[12]+0.7905694150420949*phiBC[9]-0.39528470752104744*phiBC[8]+0.7905694150420949*phiBC[7]+1.0606601717798214*phiBC[5]+0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[17]],__double_as_longlong(-(2.3717082451262845*phiBC[19])-2.3717082451262845*phiBC[18]+2.3717082451262845*phiBC[17]+1.3693063937629155*phiBC[16]-1.3693063937629155*phiBC[15]+1.3693063937629155*phiBC[14]+1.3693063937629155*phiBC[13]-1.3693063937629155*phiBC[12]+1.3693063937629155*phiBC[11]-1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]+1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); + #else + bsrc[nodeOff+globalIdxs[17]] = -(2.3717082451262845*phiBC[19])-2.3717082451262845*phiBC[18]+2.3717082451262845*phiBC[17]+1.3693063937629155*phiBC[16]-1.3693063937629155*phiBC[15]+1.3693063937629155*phiBC[14]+1.3693063937629155*phiBC[13]-1.3693063937629155*phiBC[12]+1.3693063937629155*phiBC[11]-1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]+1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[18]],__double_as_longlong(-(1.1858541225631423*phiBC[17])+1.3693063937629155*phiBC[16]+1.3693063937629155*phiBC[14]-0.6846531968814578*phiBC[13]-0.6846531968814578*phiBC[11]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]-0.39528470752104744*phiBC[7]+1.0606601717798214*phiBC[6]+0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]+0.3535533905932738*phiBC[0])); + #else + bsrc[nodeOff+globalIdxs[18]] = -(1.1858541225631423*phiBC[17])+1.3693063937629155*phiBC[16]+1.3693063937629155*phiBC[14]-0.6846531968814578*phiBC[13]-0.6846531968814578*phiBC[11]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]-0.39528470752104744*phiBC[7]+1.0606601717798214*phiBC[6]+0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]+0.3535533905932738*phiBC[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[19]],__double_as_longlong(2.3717082451262845*phiBC[19]+2.3717082451262845*phiBC[18]+2.3717082451262845*phiBC[17]+1.3693063937629155*phiBC[16]+1.3693063937629155*phiBC[15]+1.3693063937629155*phiBC[14]+1.3693063937629155*phiBC[13]+1.3693063937629155*phiBC[12]+1.3693063937629155*phiBC[11]+1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]+1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); + #else + bsrc[nodeOff+globalIdxs[19]] = 2.3717082451262845*phiBC[19]+2.3717082451262845*phiBC[18]+2.3717082451262845*phiBC[17]+1.3693063937629155*phiBC[16]+1.3693063937629155*phiBC[15]+1.3693063937629155*phiBC[14]+1.3693063937629155*phiBC[13]+1.3693063937629155*phiBC[12]+1.3693063937629155*phiBC[11]+1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]+1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; + #endif + +} + +GKYL_CU_DH void fem_parproj_src_stencil_weighted_1x_ser_p1_inx_nondirichletx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +{ + // rho: right side source. + // weight: Weight in the projection operation. + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. + // nodeOff: node offset (prob idx * global number of nodes). + // globalIdxs: global linear index of each basis function/node in current cell. + // bsrc: global right side source vector. + + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[0]],0.5*rho[1]*weight[1]-0.28867513459481287*rho[0]*weight[1]-0.28867513459481287*weight[0]*rho[1]+0.5*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[0]] += 0.5*rho[1]*weight[1]-0.28867513459481287*rho[0]*weight[1]-0.28867513459481287*weight[0]*rho[1]+0.5*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[1]],0.5*rho[1]*weight[1]+0.28867513459481287*rho[0]*weight[1]+0.28867513459481287*weight[0]*rho[1]+0.5*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[1]] += 0.5*rho[1]*weight[1]+0.28867513459481287*rho[0]*weight[1]+0.28867513459481287*weight[0]*rho[1]+0.5*rho[0]*weight[0]; + #endif + +} + +GKYL_CU_DH void fem_parproj_src_stencil_weighted_1x_ser_p2_inx_nondirichletx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +{ + // rho: right side source. + // weight: Weight in the projection operation. + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. + // nodeOff: node offset (prob idx * global number of nodes). + // globalIdxs: global linear index of each basis function/node in current cell. + // bsrc: global right side source vector. + + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[0]],0.2619047619047619*rho[2]*weight[2]-0.25819888974716115*rho[1]*weight[2]+0.149071198499986*rho[0]*weight[2]-0.25819888974716115*weight[1]*rho[2]+0.149071198499986*weight[0]*rho[2]+0.30000000000000004*rho[1]*weight[1]-0.2886751345948129*rho[0]*weight[1]-0.2886751345948129*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[0]] += 0.2619047619047619*rho[2]*weight[2]-0.25819888974716115*rho[1]*weight[2]+0.149071198499986*rho[0]*weight[2]-0.25819888974716115*weight[1]*rho[2]+0.149071198499986*weight[0]*rho[2]+0.30000000000000004*rho[1]*weight[1]-0.2886751345948129*rho[0]*weight[1]-0.2886751345948129*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[1]],0.4761904761904762*rho[2]*weight[2]-0.298142396999972*rho[0]*weight[2]-0.298142396999972*weight[0]*rho[2]+0.4*rho[1]*weight[1]+0.6666666666666667*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[1]] += 0.4761904761904762*rho[2]*weight[2]-0.298142396999972*rho[0]*weight[2]-0.298142396999972*weight[0]*rho[2]+0.4*rho[1]*weight[1]+0.6666666666666667*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[2]],0.2619047619047619*rho[2]*weight[2]+0.25819888974716115*rho[1]*weight[2]+0.149071198499986*rho[0]*weight[2]+0.25819888974716115*weight[1]*rho[2]+0.149071198499986*weight[0]*rho[2]+0.30000000000000004*rho[1]*weight[1]+0.2886751345948129*rho[0]*weight[1]+0.2886751345948129*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[2]] += 0.2619047619047619*rho[2]*weight[2]+0.25819888974716115*rho[1]*weight[2]+0.149071198499986*rho[0]*weight[2]+0.25819888974716115*weight[1]*rho[2]+0.149071198499986*weight[0]*rho[2]+0.30000000000000004*rho[1]*weight[1]+0.2886751345948129*rho[0]*weight[1]+0.2886751345948129*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]; + #endif + +} + +GKYL_CU_DH void fem_parproj_src_stencil_weighted_1x_ser_p1_lox_nondirichletx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +{ + // rho: right side source. + // weight: Weight in the projection operation. + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. + // nodeOff: node offset (prob idx * global number of nodes). + // globalIdxs: global linear index of each basis function/node in current cell. + // bsrc: global right side source vector. + + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[0]],0.5*rho[1]*weight[1]-0.28867513459481287*rho[0]*weight[1]-0.28867513459481287*weight[0]*rho[1]+0.5*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[0]] += 0.5*rho[1]*weight[1]-0.28867513459481287*rho[0]*weight[1]-0.28867513459481287*weight[0]*rho[1]+0.5*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[1]],0.5*rho[1]*weight[1]+0.28867513459481287*rho[0]*weight[1]+0.28867513459481287*weight[0]*rho[1]+0.5*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[1]] += 0.5*rho[1]*weight[1]+0.28867513459481287*rho[0]*weight[1]+0.28867513459481287*weight[0]*rho[1]+0.5*rho[0]*weight[0]; + #endif + +} + +GKYL_CU_DH void fem_parproj_src_stencil_weighted_1x_ser_p2_lox_nondirichletx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +{ + // rho: right side source. + // weight: Weight in the projection operation. + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. + // nodeOff: node offset (prob idx * global number of nodes). + // globalIdxs: global linear index of each basis function/node in current cell. + // bsrc: global right side source vector. + + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[0]],0.2619047619047619*rho[2]*weight[2]-0.25819888974716115*rho[1]*weight[2]+0.149071198499986*rho[0]*weight[2]-0.25819888974716115*weight[1]*rho[2]+0.149071198499986*weight[0]*rho[2]+0.30000000000000004*rho[1]*weight[1]-0.2886751345948129*rho[0]*weight[1]-0.2886751345948129*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[0]] += 0.2619047619047619*rho[2]*weight[2]-0.25819888974716115*rho[1]*weight[2]+0.149071198499986*rho[0]*weight[2]-0.25819888974716115*weight[1]*rho[2]+0.149071198499986*weight[0]*rho[2]+0.30000000000000004*rho[1]*weight[1]-0.2886751345948129*rho[0]*weight[1]-0.2886751345948129*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[1]],0.4761904761904762*rho[2]*weight[2]-0.298142396999972*rho[0]*weight[2]-0.298142396999972*weight[0]*rho[2]+0.4*rho[1]*weight[1]+0.6666666666666667*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[1]] += 0.4761904761904762*rho[2]*weight[2]-0.298142396999972*rho[0]*weight[2]-0.298142396999972*weight[0]*rho[2]+0.4*rho[1]*weight[1]+0.6666666666666667*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[2]],0.2619047619047619*rho[2]*weight[2]+0.25819888974716115*rho[1]*weight[2]+0.149071198499986*rho[0]*weight[2]+0.25819888974716115*weight[1]*rho[2]+0.149071198499986*weight[0]*rho[2]+0.30000000000000004*rho[1]*weight[1]+0.2886751345948129*rho[0]*weight[1]+0.2886751345948129*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[2]] += 0.2619047619047619*rho[2]*weight[2]+0.25819888974716115*rho[1]*weight[2]+0.149071198499986*rho[0]*weight[2]+0.25819888974716115*weight[1]*rho[2]+0.149071198499986*weight[0]*rho[2]+0.30000000000000004*rho[1]*weight[1]+0.2886751345948129*rho[0]*weight[1]+0.2886751345948129*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]; + #endif + +} + +GKYL_CU_DH void fem_parproj_src_stencil_weighted_1x_ser_p1_lox_dirichlet_ghostx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +{ + // rho: right side source. + // weight: Weight in the projection operation. + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. + // nodeOff: node offset (prob idx * global number of nodes). + // globalIdxs: global linear index of each basis function/node in current cell. + // bsrc: global right side source vector. + + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[0]],__double_as_longlong(1.2247448713915892*phiBC[1]+0.7071067811865476*phiBC[0])); + #else + bsrc[nodeOff+globalIdxs[0]] = 1.2247448713915892*phiBC[1]+0.7071067811865476*phiBC[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[1]],0.5*rho[1]*weight[1]+0.28867513459481287*rho[0]*weight[1]+0.28867513459481287*weight[0]*rho[1]+0.5*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[1]] += 0.5*rho[1]*weight[1]+0.28867513459481287*rho[0]*weight[1]+0.28867513459481287*weight[0]*rho[1]+0.5*rho[0]*weight[0]; + #endif + +} + +GKYL_CU_DH void fem_parproj_src_stencil_weighted_1x_ser_p2_lox_dirichlet_ghostx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +{ + // rho: right side source. + // weight: Weight in the projection operation. + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. + // nodeOff: node offset (prob idx * global number of nodes). + // globalIdxs: global linear index of each basis function/node in current cell. + // bsrc: global right side source vector. + + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[0]],__double_as_longlong(1.5811388300841895*phiBC[2]+1.224744871391589*phiBC[1]+0.7071067811865475*phiBC[0])); + #else + bsrc[nodeOff+globalIdxs[0]] = 1.5811388300841895*phiBC[2]+1.224744871391589*phiBC[1]+0.7071067811865475*phiBC[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[1]],0.4761904761904762*rho[2]*weight[2]-0.298142396999972*rho[0]*weight[2]-0.298142396999972*weight[0]*rho[2]+0.4*rho[1]*weight[1]+0.6666666666666667*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[1]] += 0.4761904761904762*rho[2]*weight[2]-0.298142396999972*rho[0]*weight[2]-0.298142396999972*weight[0]*rho[2]+0.4*rho[1]*weight[1]+0.6666666666666667*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[2]],0.2619047619047619*rho[2]*weight[2]+0.25819888974716115*rho[1]*weight[2]+0.149071198499986*rho[0]*weight[2]+0.25819888974716115*weight[1]*rho[2]+0.149071198499986*weight[0]*rho[2]+0.30000000000000004*rho[1]*weight[1]+0.2886751345948129*rho[0]*weight[1]+0.2886751345948129*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[2]] += 0.2619047619047619*rho[2]*weight[2]+0.25819888974716115*rho[1]*weight[2]+0.149071198499986*rho[0]*weight[2]+0.25819888974716115*weight[1]*rho[2]+0.149071198499986*weight[0]*rho[2]+0.30000000000000004*rho[1]*weight[1]+0.2886751345948129*rho[0]*weight[1]+0.2886751345948129*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]; + #endif + +} + +GKYL_CU_DH void fem_parproj_src_stencil_weighted_1x_ser_p1_lox_dirichlet_skinx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +{ + // rho: right side source. + // weight: Weight in the projection operation. + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. + // nodeOff: node offset (prob idx * global number of nodes). + // globalIdxs: global linear index of each basis function/node in current cell. + // bsrc: global right side source vector. + + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[0]],__double_as_longlong(0.7071067811865476*phiBC[0]-1.2247448713915892*phiBC[1])); + #else + bsrc[nodeOff+globalIdxs[0]] = 0.7071067811865476*phiBC[0]-1.2247448713915892*phiBC[1]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[1]],0.5*rho[1]*weight[1]+0.28867513459481287*rho[0]*weight[1]+0.28867513459481287*weight[0]*rho[1]+0.5*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[1]] += 0.5*rho[1]*weight[1]+0.28867513459481287*rho[0]*weight[1]+0.28867513459481287*weight[0]*rho[1]+0.5*rho[0]*weight[0]; + #endif + +} + +GKYL_CU_DH void fem_parproj_src_stencil_weighted_1x_ser_p2_lox_dirichlet_skinx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +{ + // rho: right side source. + // weight: Weight in the projection operation. + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. + // nodeOff: node offset (prob idx * global number of nodes). + // globalIdxs: global linear index of each basis function/node in current cell. + // bsrc: global right side source vector. + + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[0]],__double_as_longlong(1.5811388300841895*phiBC[2]-1.224744871391589*phiBC[1]+0.7071067811865475*phiBC[0])); + #else + bsrc[nodeOff+globalIdxs[0]] = 1.5811388300841895*phiBC[2]-1.224744871391589*phiBC[1]+0.7071067811865475*phiBC[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[1]],0.4761904761904762*rho[2]*weight[2]-0.298142396999972*rho[0]*weight[2]-0.298142396999972*weight[0]*rho[2]+0.4*rho[1]*weight[1]+0.6666666666666667*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[1]] += 0.4761904761904762*rho[2]*weight[2]-0.298142396999972*rho[0]*weight[2]-0.298142396999972*weight[0]*rho[2]+0.4*rho[1]*weight[1]+0.6666666666666667*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[2]],0.2619047619047619*rho[2]*weight[2]+0.25819888974716115*rho[1]*weight[2]+0.149071198499986*rho[0]*weight[2]+0.25819888974716115*weight[1]*rho[2]+0.149071198499986*weight[0]*rho[2]+0.30000000000000004*rho[1]*weight[1]+0.2886751345948129*rho[0]*weight[1]+0.2886751345948129*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[2]] += 0.2619047619047619*rho[2]*weight[2]+0.25819888974716115*rho[1]*weight[2]+0.149071198499986*rho[0]*weight[2]+0.25819888974716115*weight[1]*rho[2]+0.149071198499986*weight[0]*rho[2]+0.30000000000000004*rho[1]*weight[1]+0.2886751345948129*rho[0]*weight[1]+0.2886751345948129*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]; + #endif + +} + +GKYL_CU_DH void fem_parproj_src_stencil_weighted_1x_ser_p1_upx_nondirichletx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +{ + // rho: right side source. + // weight: Weight in the projection operation. + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. + // nodeOff: node offset (prob idx * global number of nodes). + // globalIdxs: global linear index of each basis function/node in current cell. + // bsrc: global right side source vector. + + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[0]],0.5*rho[1]*weight[1]-0.28867513459481287*rho[0]*weight[1]-0.28867513459481287*weight[0]*rho[1]+0.5*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[0]] += 0.5*rho[1]*weight[1]-0.28867513459481287*rho[0]*weight[1]-0.28867513459481287*weight[0]*rho[1]+0.5*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[1]],0.5*rho[1]*weight[1]+0.28867513459481287*rho[0]*weight[1]+0.28867513459481287*weight[0]*rho[1]+0.5*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[1]] += 0.5*rho[1]*weight[1]+0.28867513459481287*rho[0]*weight[1]+0.28867513459481287*weight[0]*rho[1]+0.5*rho[0]*weight[0]; + #endif + +} + +GKYL_CU_DH void fem_parproj_src_stencil_weighted_1x_ser_p2_upx_nondirichletx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +{ + // rho: right side source. + // weight: Weight in the projection operation. + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. + // nodeOff: node offset (prob idx * global number of nodes). + // globalIdxs: global linear index of each basis function/node in current cell. + // bsrc: global right side source vector. + + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[0]],0.2619047619047619*rho[2]*weight[2]-0.25819888974716115*rho[1]*weight[2]+0.149071198499986*rho[0]*weight[2]-0.25819888974716115*weight[1]*rho[2]+0.149071198499986*weight[0]*rho[2]+0.30000000000000004*rho[1]*weight[1]-0.2886751345948129*rho[0]*weight[1]-0.2886751345948129*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[0]] += 0.2619047619047619*rho[2]*weight[2]-0.25819888974716115*rho[1]*weight[2]+0.149071198499986*rho[0]*weight[2]-0.25819888974716115*weight[1]*rho[2]+0.149071198499986*weight[0]*rho[2]+0.30000000000000004*rho[1]*weight[1]-0.2886751345948129*rho[0]*weight[1]-0.2886751345948129*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[1]],0.4761904761904762*rho[2]*weight[2]-0.298142396999972*rho[0]*weight[2]-0.298142396999972*weight[0]*rho[2]+0.4*rho[1]*weight[1]+0.6666666666666667*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[1]] += 0.4761904761904762*rho[2]*weight[2]-0.298142396999972*rho[0]*weight[2]-0.298142396999972*weight[0]*rho[2]+0.4*rho[1]*weight[1]+0.6666666666666667*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[2]],0.2619047619047619*rho[2]*weight[2]+0.25819888974716115*rho[1]*weight[2]+0.149071198499986*rho[0]*weight[2]+0.25819888974716115*weight[1]*rho[2]+0.149071198499986*weight[0]*rho[2]+0.30000000000000004*rho[1]*weight[1]+0.2886751345948129*rho[0]*weight[1]+0.2886751345948129*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[2]] += 0.2619047619047619*rho[2]*weight[2]+0.25819888974716115*rho[1]*weight[2]+0.149071198499986*rho[0]*weight[2]+0.25819888974716115*weight[1]*rho[2]+0.149071198499986*weight[0]*rho[2]+0.30000000000000004*rho[1]*weight[1]+0.2886751345948129*rho[0]*weight[1]+0.2886751345948129*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]; + #endif + +} + +GKYL_CU_DH void fem_parproj_src_stencil_weighted_1x_ser_p1_upx_dirichlet_ghostx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +{ + // rho: right side source. + // weight: Weight in the projection operation. + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. + // nodeOff: node offset (prob idx * global number of nodes). + // globalIdxs: global linear index of each basis function/node in current cell. + // bsrc: global right side source vector. + + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[0]],0.5*rho[1]*weight[1]-0.28867513459481287*rho[0]*weight[1]-0.28867513459481287*weight[0]*rho[1]+0.5*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[0]] += 0.5*rho[1]*weight[1]-0.28867513459481287*rho[0]*weight[1]-0.28867513459481287*weight[0]*rho[1]+0.5*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[1]],__double_as_longlong(0.7071067811865476*phiBC[0]-1.2247448713915892*phiBC[1])); + #else + bsrc[nodeOff+globalIdxs[1]] = 0.7071067811865476*phiBC[0]-1.2247448713915892*phiBC[1]; + #endif + +} + +GKYL_CU_DH void fem_parproj_src_stencil_weighted_1x_ser_p2_upx_dirichlet_ghostx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +{ + // rho: right side source. + // weight: Weight in the projection operation. + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. + // nodeOff: node offset (prob idx * global number of nodes). + // globalIdxs: global linear index of each basis function/node in current cell. + // bsrc: global right side source vector. + + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[0]],0.2619047619047619*rho[2]*weight[2]-0.25819888974716115*rho[1]*weight[2]+0.149071198499986*rho[0]*weight[2]-0.25819888974716115*weight[1]*rho[2]+0.149071198499986*weight[0]*rho[2]+0.30000000000000004*rho[1]*weight[1]-0.2886751345948129*rho[0]*weight[1]-0.2886751345948129*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[0]] += 0.2619047619047619*rho[2]*weight[2]-0.25819888974716115*rho[1]*weight[2]+0.149071198499986*rho[0]*weight[2]-0.25819888974716115*weight[1]*rho[2]+0.149071198499986*weight[0]*rho[2]+0.30000000000000004*rho[1]*weight[1]-0.2886751345948129*rho[0]*weight[1]-0.2886751345948129*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[1]],0.4761904761904762*rho[2]*weight[2]-0.298142396999972*rho[0]*weight[2]-0.298142396999972*weight[0]*rho[2]+0.4*rho[1]*weight[1]+0.6666666666666667*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[1]] += 0.4761904761904762*rho[2]*weight[2]-0.298142396999972*rho[0]*weight[2]-0.298142396999972*weight[0]*rho[2]+0.4*rho[1]*weight[1]+0.6666666666666667*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[2]],__double_as_longlong(1.5811388300841895*phiBC[2]-1.224744871391589*phiBC[1]+0.7071067811865475*phiBC[0])); + #else + bsrc[nodeOff+globalIdxs[2]] = 1.5811388300841895*phiBC[2]-1.224744871391589*phiBC[1]+0.7071067811865475*phiBC[0]; + #endif + +} + +GKYL_CU_DH void fem_parproj_src_stencil_weighted_1x_ser_p1_upx_dirichlet_skinx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +{ + // rho: right side source. + // weight: Weight in the projection operation. + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. + // nodeOff: node offset (prob idx * global number of nodes). + // globalIdxs: global linear index of each basis function/node in current cell. + // bsrc: global right side source vector. + + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[0]],0.5*rho[1]*weight[1]-0.28867513459481287*rho[0]*weight[1]-0.28867513459481287*weight[0]*rho[1]+0.5*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[0]] += 0.5*rho[1]*weight[1]-0.28867513459481287*rho[0]*weight[1]-0.28867513459481287*weight[0]*rho[1]+0.5*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[1]],__double_as_longlong(1.2247448713915892*phiBC[1]+0.7071067811865476*phiBC[0])); + #else + bsrc[nodeOff+globalIdxs[1]] = 1.2247448713915892*phiBC[1]+0.7071067811865476*phiBC[0]; + #endif + +} + +GKYL_CU_DH void fem_parproj_src_stencil_weighted_1x_ser_p2_upx_dirichlet_skinx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +{ + // rho: right side source. + // weight: Weight in the projection operation. + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. + // nodeOff: node offset (prob idx * global number of nodes). + // globalIdxs: global linear index of each basis function/node in current cell. + // bsrc: global right side source vector. + + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[0]],0.2619047619047619*rho[2]*weight[2]-0.25819888974716115*rho[1]*weight[2]+0.149071198499986*rho[0]*weight[2]-0.25819888974716115*weight[1]*rho[2]+0.149071198499986*weight[0]*rho[2]+0.30000000000000004*rho[1]*weight[1]-0.2886751345948129*rho[0]*weight[1]-0.2886751345948129*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[0]] += 0.2619047619047619*rho[2]*weight[2]-0.25819888974716115*rho[1]*weight[2]+0.149071198499986*rho[0]*weight[2]-0.25819888974716115*weight[1]*rho[2]+0.149071198499986*weight[0]*rho[2]+0.30000000000000004*rho[1]*weight[1]-0.2886751345948129*rho[0]*weight[1]-0.2886751345948129*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[1]],0.4761904761904762*rho[2]*weight[2]-0.298142396999972*rho[0]*weight[2]-0.298142396999972*weight[0]*rho[2]+0.4*rho[1]*weight[1]+0.6666666666666667*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[1]] += 0.4761904761904762*rho[2]*weight[2]-0.298142396999972*rho[0]*weight[2]-0.298142396999972*weight[0]*rho[2]+0.4*rho[1]*weight[1]+0.6666666666666667*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[2]],__double_as_longlong(1.5811388300841895*phiBC[2]+1.224744871391589*phiBC[1]+0.7071067811865475*phiBC[0])); + #else + bsrc[nodeOff+globalIdxs[2]] = 1.5811388300841895*phiBC[2]+1.224744871391589*phiBC[1]+0.7071067811865475*phiBC[0]; + #endif + +} + +GKYL_CU_DH void fem_parproj_src_stencil_weighted_2x_ser_p1_iny_nondirichlety(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +{ + // rho: right side source. + // weight: Weight in the projection operation. + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. + // nodeOff: node offset (prob idx * global number of nodes). + // globalIdxs: global linear index of each basis function/node in current cell. + // bsrc: global right side source vector. + + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[0]],0.25*rho[3]*weight[3]-0.14433756729740643*rho[2]*weight[3]-0.14433756729740643*rho[1]*weight[3]+0.08333333333333333*rho[0]*weight[3]-0.14433756729740643*weight[2]*rho[3]-0.14433756729740643*weight[1]*rho[3]+0.08333333333333333*weight[0]*rho[3]+0.25*rho[2]*weight[2]+0.08333333333333333*rho[1]*weight[2]-0.14433756729740643*rho[0]*weight[2]+0.08333333333333333*weight[1]*rho[2]-0.14433756729740643*weight[0]*rho[2]+0.25*rho[1]*weight[1]-0.14433756729740643*rho[0]*weight[1]-0.14433756729740643*weight[0]*rho[1]+0.25*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[0]] += 0.25*rho[3]*weight[3]-0.14433756729740643*rho[2]*weight[3]-0.14433756729740643*rho[1]*weight[3]+0.08333333333333333*rho[0]*weight[3]-0.14433756729740643*weight[2]*rho[3]-0.14433756729740643*weight[1]*rho[3]+0.08333333333333333*weight[0]*rho[3]+0.25*rho[2]*weight[2]+0.08333333333333333*rho[1]*weight[2]-0.14433756729740643*rho[0]*weight[2]+0.08333333333333333*weight[1]*rho[2]-0.14433756729740643*weight[0]*rho[2]+0.25*rho[1]*weight[1]-0.14433756729740643*rho[0]*weight[1]-0.14433756729740643*weight[0]*rho[1]+0.25*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[1]],0.25*rho[3]*weight[3]+0.14433756729740643*rho[2]*weight[3]-0.14433756729740643*rho[1]*weight[3]-0.08333333333333333*rho[0]*weight[3]+0.14433756729740643*weight[2]*rho[3]-0.14433756729740643*weight[1]*rho[3]-0.08333333333333333*weight[0]*rho[3]+0.25*rho[2]*weight[2]-0.08333333333333333*rho[1]*weight[2]-0.14433756729740643*rho[0]*weight[2]-0.08333333333333333*weight[1]*rho[2]-0.14433756729740643*weight[0]*rho[2]+0.25*rho[1]*weight[1]+0.14433756729740643*rho[0]*weight[1]+0.14433756729740643*weight[0]*rho[1]+0.25*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[1]] += 0.25*rho[3]*weight[3]+0.14433756729740643*rho[2]*weight[3]-0.14433756729740643*rho[1]*weight[3]-0.08333333333333333*rho[0]*weight[3]+0.14433756729740643*weight[2]*rho[3]-0.14433756729740643*weight[1]*rho[3]-0.08333333333333333*weight[0]*rho[3]+0.25*rho[2]*weight[2]-0.08333333333333333*rho[1]*weight[2]-0.14433756729740643*rho[0]*weight[2]-0.08333333333333333*weight[1]*rho[2]-0.14433756729740643*weight[0]*rho[2]+0.25*rho[1]*weight[1]+0.14433756729740643*rho[0]*weight[1]+0.14433756729740643*weight[0]*rho[1]+0.25*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[2]],0.25*rho[3]*weight[3]-0.14433756729740643*rho[2]*weight[3]+0.14433756729740643*rho[1]*weight[3]-0.08333333333333333*rho[0]*weight[3]-0.14433756729740643*weight[2]*rho[3]+0.14433756729740643*weight[1]*rho[3]-0.08333333333333333*weight[0]*rho[3]+0.25*rho[2]*weight[2]-0.08333333333333333*rho[1]*weight[2]+0.14433756729740643*rho[0]*weight[2]-0.08333333333333333*weight[1]*rho[2]+0.14433756729740643*weight[0]*rho[2]+0.25*rho[1]*weight[1]-0.14433756729740643*rho[0]*weight[1]-0.14433756729740643*weight[0]*rho[1]+0.25*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[2]] += 0.25*rho[3]*weight[3]-0.14433756729740643*rho[2]*weight[3]+0.14433756729740643*rho[1]*weight[3]-0.08333333333333333*rho[0]*weight[3]-0.14433756729740643*weight[2]*rho[3]+0.14433756729740643*weight[1]*rho[3]-0.08333333333333333*weight[0]*rho[3]+0.25*rho[2]*weight[2]-0.08333333333333333*rho[1]*weight[2]+0.14433756729740643*rho[0]*weight[2]-0.08333333333333333*weight[1]*rho[2]+0.14433756729740643*weight[0]*rho[2]+0.25*rho[1]*weight[1]-0.14433756729740643*rho[0]*weight[1]-0.14433756729740643*weight[0]*rho[1]+0.25*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[3]],0.25*rho[3]*weight[3]+0.14433756729740643*rho[2]*weight[3]+0.14433756729740643*rho[1]*weight[3]+0.08333333333333333*rho[0]*weight[3]+0.14433756729740643*weight[2]*rho[3]+0.14433756729740643*weight[1]*rho[3]+0.08333333333333333*weight[0]*rho[3]+0.25*rho[2]*weight[2]+0.08333333333333333*rho[1]*weight[2]+0.14433756729740643*rho[0]*weight[2]+0.08333333333333333*weight[1]*rho[2]+0.14433756729740643*weight[0]*rho[2]+0.25*rho[1]*weight[1]+0.14433756729740643*rho[0]*weight[1]+0.14433756729740643*weight[0]*rho[1]+0.25*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[3]] += 0.25*rho[3]*weight[3]+0.14433756729740643*rho[2]*weight[3]+0.14433756729740643*rho[1]*weight[3]+0.08333333333333333*rho[0]*weight[3]+0.14433756729740643*weight[2]*rho[3]+0.14433756729740643*weight[1]*rho[3]+0.08333333333333333*weight[0]*rho[3]+0.25*rho[2]*weight[2]+0.08333333333333333*rho[1]*weight[2]+0.14433756729740643*rho[0]*weight[2]+0.08333333333333333*weight[1]*rho[2]+0.14433756729740643*weight[0]*rho[2]+0.25*rho[1]*weight[1]+0.14433756729740643*rho[0]*weight[1]+0.14433756729740643*weight[0]*rho[1]+0.25*rho[0]*weight[0]; + #endif + +} + +GKYL_CU_DH void fem_parproj_src_stencil_weighted_2x_ser_p2_iny_nondirichlety(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +{ + // rho: right side source. + // weight: Weight in the projection operation. + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. + // nodeOff: node offset (prob idx * global number of nodes). + // globalIdxs: global linear index of each basis function/node in current cell. + // bsrc: global right side source vector. + + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[0]],0.030952380952380953*rho[7]*weight[7]+0.06666666666666667*rho[6]*weight[7]-0.07560539239387958*rho[5]*weight[7]-0.03849001794597506*rho[4]*weight[7]-0.07745966692414834*rho[3]*weight[7]+0.07453559924999299*rho[2]*weight[7]+0.07453559924999299*rho[1]*weight[7]-0.04303314829119352*rho[0]*weight[7]+0.06666666666666667*weight[6]*rho[7]-0.07560539239387958*weight[5]*rho[7]-0.03849001794597506*weight[4]*rho[7]-0.07745966692414834*weight[3]*rho[7]+0.07453559924999299*weight[2]*rho[7]+0.07453559924999299*weight[1]*rho[7]-0.04303314829119352*weight[0]*rho[7]+0.030952380952380953*rho[6]*weight[6]-0.03849001794597506*rho[5]*weight[6]-0.07560539239387958*rho[4]*weight[6]-0.07745966692414834*rho[3]*weight[6]+0.07453559924999299*rho[2]*weight[6]+0.07453559924999299*rho[1]*weight[6]-0.04303314829119352*rho[0]*weight[6]-0.03849001794597506*weight[5]*rho[6]-0.07560539239387958*weight[4]*rho[6]-0.07745966692414834*weight[3]*rho[6]+0.07453559924999299*weight[2]*rho[6]+0.07453559924999299*weight[1]*rho[6]-0.04303314829119352*weight[0]*rho[6]-0.03571428571428571*rho[5]*weight[5]+0.074535599249993*rho[3]*weight[5]-0.04303314829119353*rho[2]*weight[5]-0.04303314829119353*rho[1]*weight[5]+0.074535599249993*rho[0]*weight[5]+0.074535599249993*weight[3]*rho[5]-0.04303314829119353*weight[2]*rho[5]-0.04303314829119353*weight[1]*rho[5]+0.074535599249993*weight[0]*rho[5]-0.03571428571428571*rho[4]*weight[4]+0.074535599249993*rho[3]*weight[4]-0.04303314829119353*rho[2]*weight[4]-0.04303314829119353*rho[1]*weight[4]+0.074535599249993*rho[0]*weight[4]+0.074535599249993*weight[3]*rho[4]-0.04303314829119353*weight[2]*rho[4]-0.04303314829119353*weight[1]*rho[4]+0.074535599249993*weight[0]*rho[4]+0.05*rho[3]*weight[3]-0.08660254037844384*rho[2]*weight[3]-0.08660254037844384*rho[1]*weight[3]+0.08333333333333333*rho[0]*weight[3]-0.08660254037844384*weight[2]*rho[3]-0.08660254037844384*weight[1]*rho[3]+0.08333333333333333*weight[0]*rho[3]-0.016666666666666666*rho[2]*weight[2]+0.08333333333333333*rho[1]*weight[2]-0.04811252243246881*rho[0]*weight[2]+0.08333333333333333*weight[1]*rho[2]-0.04811252243246881*weight[0]*rho[2]-0.016666666666666666*rho[1]*weight[1]-0.04811252243246881*rho[0]*weight[1]-0.04811252243246881*weight[0]*rho[1]-0.08333333333333333*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[0]] += 0.030952380952380953*rho[7]*weight[7]+0.06666666666666667*rho[6]*weight[7]-0.07560539239387958*rho[5]*weight[7]-0.03849001794597506*rho[4]*weight[7]-0.07745966692414834*rho[3]*weight[7]+0.07453559924999299*rho[2]*weight[7]+0.07453559924999299*rho[1]*weight[7]-0.04303314829119352*rho[0]*weight[7]+0.06666666666666667*weight[6]*rho[7]-0.07560539239387958*weight[5]*rho[7]-0.03849001794597506*weight[4]*rho[7]-0.07745966692414834*weight[3]*rho[7]+0.07453559924999299*weight[2]*rho[7]+0.07453559924999299*weight[1]*rho[7]-0.04303314829119352*weight[0]*rho[7]+0.030952380952380953*rho[6]*weight[6]-0.03849001794597506*rho[5]*weight[6]-0.07560539239387958*rho[4]*weight[6]-0.07745966692414834*rho[3]*weight[6]+0.07453559924999299*rho[2]*weight[6]+0.07453559924999299*rho[1]*weight[6]-0.04303314829119352*rho[0]*weight[6]-0.03849001794597506*weight[5]*rho[6]-0.07560539239387958*weight[4]*rho[6]-0.07745966692414834*weight[3]*rho[6]+0.07453559924999299*weight[2]*rho[6]+0.07453559924999299*weight[1]*rho[6]-0.04303314829119352*weight[0]*rho[6]-0.03571428571428571*rho[5]*weight[5]+0.074535599249993*rho[3]*weight[5]-0.04303314829119353*rho[2]*weight[5]-0.04303314829119353*rho[1]*weight[5]+0.074535599249993*rho[0]*weight[5]+0.074535599249993*weight[3]*rho[5]-0.04303314829119353*weight[2]*rho[5]-0.04303314829119353*weight[1]*rho[5]+0.074535599249993*weight[0]*rho[5]-0.03571428571428571*rho[4]*weight[4]+0.074535599249993*rho[3]*weight[4]-0.04303314829119353*rho[2]*weight[4]-0.04303314829119353*rho[1]*weight[4]+0.074535599249993*rho[0]*weight[4]+0.074535599249993*weight[3]*rho[4]-0.04303314829119353*weight[2]*rho[4]-0.04303314829119353*weight[1]*rho[4]+0.074535599249993*weight[0]*rho[4]+0.05*rho[3]*weight[3]-0.08660254037844384*rho[2]*weight[3]-0.08660254037844384*rho[1]*weight[3]+0.08333333333333333*rho[0]*weight[3]-0.08660254037844384*weight[2]*rho[3]-0.08660254037844384*weight[1]*rho[3]+0.08333333333333333*weight[0]*rho[3]-0.016666666666666666*rho[2]*weight[2]+0.08333333333333333*rho[1]*weight[2]-0.04811252243246881*rho[0]*weight[2]+0.08333333333333333*weight[1]*rho[2]-0.04811252243246881*weight[0]*rho[2]-0.016666666666666666*rho[1]*weight[1]-0.04811252243246881*rho[0]*weight[1]-0.04811252243246881*weight[0]*rho[1]-0.08333333333333333*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[1]],0.2*rho[7]*weight[7]-0.10327955589886445*rho[3]*weight[7]-0.10327955589886445*weight[3]*rho[7]+0.23809523809523808*rho[6]*weight[6]+0.07698003589195011*rho[5]*weight[6]-0.1374643498070538*rho[4]*weight[6]-0.14907119849998599*rho[2]*weight[6]+0.08606629658238704*rho[0]*weight[6]+0.07698003589195011*weight[5]*rho[6]-0.1374643498070538*weight[4]*rho[6]-0.14907119849998599*weight[2]*rho[6]+0.08606629658238704*weight[0]*rho[6]+0.3333333333333333*rho[5]*weight[5]-0.1721325931647741*rho[2]*weight[5]-0.1721325931647741*weight[2]*rho[5]+0.23809523809523808*rho[4]*weight[4]+0.08606629658238706*rho[2]*weight[4]-0.149071198499986*rho[0]*weight[4]+0.08606629658238706*weight[2]*rho[4]-0.149071198499986*weight[0]*rho[4]+0.2*rho[3]*weight[3]-0.11547005383792514*rho[1]*weight[3]-0.11547005383792514*weight[1]*rho[3]+0.3333333333333333*rho[2]*weight[2]-0.19245008972987523*rho[0]*weight[2]-0.19245008972987523*weight[0]*rho[2]+0.2*rho[1]*weight[1]+0.3333333333333333*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[1]] += 0.2*rho[7]*weight[7]-0.10327955589886445*rho[3]*weight[7]-0.10327955589886445*weight[3]*rho[7]+0.23809523809523808*rho[6]*weight[6]+0.07698003589195011*rho[5]*weight[6]-0.1374643498070538*rho[4]*weight[6]-0.14907119849998599*rho[2]*weight[6]+0.08606629658238704*rho[0]*weight[6]+0.07698003589195011*weight[5]*rho[6]-0.1374643498070538*weight[4]*rho[6]-0.14907119849998599*weight[2]*rho[6]+0.08606629658238704*weight[0]*rho[6]+0.3333333333333333*rho[5]*weight[5]-0.1721325931647741*rho[2]*weight[5]-0.1721325931647741*weight[2]*rho[5]+0.23809523809523808*rho[4]*weight[4]+0.08606629658238706*rho[2]*weight[4]-0.149071198499986*rho[0]*weight[4]+0.08606629658238706*weight[2]*rho[4]-0.149071198499986*weight[0]*rho[4]+0.2*rho[3]*weight[3]-0.11547005383792514*rho[1]*weight[3]-0.11547005383792514*weight[1]*rho[3]+0.3333333333333333*rho[2]*weight[2]-0.19245008972987523*rho[0]*weight[2]-0.19245008972987523*weight[0]*rho[2]+0.2*rho[1]*weight[1]+0.3333333333333333*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[2]],0.030952380952380953*rho[7]*weight[7]-0.06666666666666667*rho[6]*weight[7]+0.07560539239387958*rho[5]*weight[7]+0.03849001794597506*rho[4]*weight[7]-0.07745966692414834*rho[3]*weight[7]-0.07453559924999299*rho[2]*weight[7]+0.07453559924999299*rho[1]*weight[7]+0.04303314829119352*rho[0]*weight[7]-0.06666666666666667*weight[6]*rho[7]+0.07560539239387958*weight[5]*rho[7]+0.03849001794597506*weight[4]*rho[7]-0.07745966692414834*weight[3]*rho[7]-0.07453559924999299*weight[2]*rho[7]+0.07453559924999299*weight[1]*rho[7]+0.04303314829119352*weight[0]*rho[7]+0.030952380952380953*rho[6]*weight[6]-0.03849001794597506*rho[5]*weight[6]-0.07560539239387958*rho[4]*weight[6]+0.07745966692414834*rho[3]*weight[6]+0.07453559924999299*rho[2]*weight[6]-0.07453559924999299*rho[1]*weight[6]-0.04303314829119352*rho[0]*weight[6]-0.03849001794597506*weight[5]*rho[6]-0.07560539239387958*weight[4]*rho[6]+0.07745966692414834*weight[3]*rho[6]+0.07453559924999299*weight[2]*rho[6]-0.07453559924999299*weight[1]*rho[6]-0.04303314829119352*weight[0]*rho[6]-0.03571428571428571*rho[5]*weight[5]-0.074535599249993*rho[3]*weight[5]-0.04303314829119353*rho[2]*weight[5]+0.04303314829119353*rho[1]*weight[5]+0.074535599249993*rho[0]*weight[5]-0.074535599249993*weight[3]*rho[5]-0.04303314829119353*weight[2]*rho[5]+0.04303314829119353*weight[1]*rho[5]+0.074535599249993*weight[0]*rho[5]-0.03571428571428571*rho[4]*weight[4]-0.074535599249993*rho[3]*weight[4]-0.04303314829119353*rho[2]*weight[4]+0.04303314829119353*rho[1]*weight[4]+0.074535599249993*rho[0]*weight[4]-0.074535599249993*weight[3]*rho[4]-0.04303314829119353*weight[2]*rho[4]+0.04303314829119353*weight[1]*rho[4]+0.074535599249993*weight[0]*rho[4]+0.05*rho[3]*weight[3]+0.08660254037844384*rho[2]*weight[3]-0.08660254037844384*rho[1]*weight[3]-0.08333333333333333*rho[0]*weight[3]+0.08660254037844384*weight[2]*rho[3]-0.08660254037844384*weight[1]*rho[3]-0.08333333333333333*weight[0]*rho[3]-0.016666666666666666*rho[2]*weight[2]-0.08333333333333333*rho[1]*weight[2]-0.04811252243246881*rho[0]*weight[2]-0.08333333333333333*weight[1]*rho[2]-0.04811252243246881*weight[0]*rho[2]-0.016666666666666666*rho[1]*weight[1]+0.04811252243246881*rho[0]*weight[1]+0.04811252243246881*weight[0]*rho[1]-0.08333333333333333*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[2]] += 0.030952380952380953*rho[7]*weight[7]-0.06666666666666667*rho[6]*weight[7]+0.07560539239387958*rho[5]*weight[7]+0.03849001794597506*rho[4]*weight[7]-0.07745966692414834*rho[3]*weight[7]-0.07453559924999299*rho[2]*weight[7]+0.07453559924999299*rho[1]*weight[7]+0.04303314829119352*rho[0]*weight[7]-0.06666666666666667*weight[6]*rho[7]+0.07560539239387958*weight[5]*rho[7]+0.03849001794597506*weight[4]*rho[7]-0.07745966692414834*weight[3]*rho[7]-0.07453559924999299*weight[2]*rho[7]+0.07453559924999299*weight[1]*rho[7]+0.04303314829119352*weight[0]*rho[7]+0.030952380952380953*rho[6]*weight[6]-0.03849001794597506*rho[5]*weight[6]-0.07560539239387958*rho[4]*weight[6]+0.07745966692414834*rho[3]*weight[6]+0.07453559924999299*rho[2]*weight[6]-0.07453559924999299*rho[1]*weight[6]-0.04303314829119352*rho[0]*weight[6]-0.03849001794597506*weight[5]*rho[6]-0.07560539239387958*weight[4]*rho[6]+0.07745966692414834*weight[3]*rho[6]+0.07453559924999299*weight[2]*rho[6]-0.07453559924999299*weight[1]*rho[6]-0.04303314829119352*weight[0]*rho[6]-0.03571428571428571*rho[5]*weight[5]-0.074535599249993*rho[3]*weight[5]-0.04303314829119353*rho[2]*weight[5]+0.04303314829119353*rho[1]*weight[5]+0.074535599249993*rho[0]*weight[5]-0.074535599249993*weight[3]*rho[5]-0.04303314829119353*weight[2]*rho[5]+0.04303314829119353*weight[1]*rho[5]+0.074535599249993*weight[0]*rho[5]-0.03571428571428571*rho[4]*weight[4]-0.074535599249993*rho[3]*weight[4]-0.04303314829119353*rho[2]*weight[4]+0.04303314829119353*rho[1]*weight[4]+0.074535599249993*rho[0]*weight[4]-0.074535599249993*weight[3]*rho[4]-0.04303314829119353*weight[2]*rho[4]+0.04303314829119353*weight[1]*rho[4]+0.074535599249993*weight[0]*rho[4]+0.05*rho[3]*weight[3]+0.08660254037844384*rho[2]*weight[3]-0.08660254037844384*rho[1]*weight[3]-0.08333333333333333*rho[0]*weight[3]+0.08660254037844384*weight[2]*rho[3]-0.08660254037844384*weight[1]*rho[3]-0.08333333333333333*weight[0]*rho[3]-0.016666666666666666*rho[2]*weight[2]-0.08333333333333333*rho[1]*weight[2]-0.04811252243246881*rho[0]*weight[2]-0.08333333333333333*weight[1]*rho[2]-0.04811252243246881*weight[0]*rho[2]-0.016666666666666666*rho[1]*weight[1]+0.04811252243246881*rho[0]*weight[1]+0.04811252243246881*weight[0]*rho[1]-0.08333333333333333*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[3]],0.23809523809523808*rho[7]*weight[7]-0.1374643498070538*rho[5]*weight[7]+0.07698003589195011*rho[4]*weight[7]-0.14907119849998599*rho[1]*weight[7]+0.08606629658238704*rho[0]*weight[7]-0.1374643498070538*weight[5]*rho[7]+0.07698003589195011*weight[4]*rho[7]-0.14907119849998599*weight[1]*rho[7]+0.08606629658238704*weight[0]*rho[7]+0.2*rho[6]*weight[6]-0.10327955589886445*rho[3]*weight[6]-0.10327955589886445*weight[3]*rho[6]+0.23809523809523808*rho[5]*weight[5]+0.08606629658238706*rho[1]*weight[5]-0.149071198499986*rho[0]*weight[5]+0.08606629658238706*weight[1]*rho[5]-0.149071198499986*weight[0]*rho[5]+0.3333333333333333*rho[4]*weight[4]-0.1721325931647741*rho[1]*weight[4]-0.1721325931647741*weight[1]*rho[4]+0.2*rho[3]*weight[3]-0.11547005383792514*rho[2]*weight[3]-0.11547005383792514*weight[2]*rho[3]+0.2*rho[2]*weight[2]+0.3333333333333333*rho[1]*weight[1]-0.19245008972987523*rho[0]*weight[1]-0.19245008972987523*weight[0]*rho[1]+0.3333333333333333*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[3]] += 0.23809523809523808*rho[7]*weight[7]-0.1374643498070538*rho[5]*weight[7]+0.07698003589195011*rho[4]*weight[7]-0.14907119849998599*rho[1]*weight[7]+0.08606629658238704*rho[0]*weight[7]-0.1374643498070538*weight[5]*rho[7]+0.07698003589195011*weight[4]*rho[7]-0.14907119849998599*weight[1]*rho[7]+0.08606629658238704*weight[0]*rho[7]+0.2*rho[6]*weight[6]-0.10327955589886445*rho[3]*weight[6]-0.10327955589886445*weight[3]*rho[6]+0.23809523809523808*rho[5]*weight[5]+0.08606629658238706*rho[1]*weight[5]-0.149071198499986*rho[0]*weight[5]+0.08606629658238706*weight[1]*rho[5]-0.149071198499986*weight[0]*rho[5]+0.3333333333333333*rho[4]*weight[4]-0.1721325931647741*rho[1]*weight[4]-0.1721325931647741*weight[1]*rho[4]+0.2*rho[3]*weight[3]-0.11547005383792514*rho[2]*weight[3]-0.11547005383792514*weight[2]*rho[3]+0.2*rho[2]*weight[2]+0.3333333333333333*rho[1]*weight[1]-0.19245008972987523*rho[0]*weight[1]-0.19245008972987523*weight[0]*rho[1]+0.3333333333333333*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[4]],0.23809523809523808*rho[7]*weight[7]+0.1374643498070538*rho[5]*weight[7]-0.07698003589195011*rho[4]*weight[7]-0.14907119849998599*rho[1]*weight[7]-0.08606629658238704*rho[0]*weight[7]+0.1374643498070538*weight[5]*rho[7]-0.07698003589195011*weight[4]*rho[7]-0.14907119849998599*weight[1]*rho[7]-0.08606629658238704*weight[0]*rho[7]+0.2*rho[6]*weight[6]+0.10327955589886445*rho[3]*weight[6]+0.10327955589886445*weight[3]*rho[6]+0.23809523809523808*rho[5]*weight[5]-0.08606629658238706*rho[1]*weight[5]-0.149071198499986*rho[0]*weight[5]-0.08606629658238706*weight[1]*rho[5]-0.149071198499986*weight[0]*rho[5]+0.3333333333333333*rho[4]*weight[4]+0.1721325931647741*rho[1]*weight[4]+0.1721325931647741*weight[1]*rho[4]+0.2*rho[3]*weight[3]+0.11547005383792514*rho[2]*weight[3]+0.11547005383792514*weight[2]*rho[3]+0.2*rho[2]*weight[2]+0.3333333333333333*rho[1]*weight[1]+0.19245008972987523*rho[0]*weight[1]+0.19245008972987523*weight[0]*rho[1]+0.3333333333333333*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[4]] += 0.23809523809523808*rho[7]*weight[7]+0.1374643498070538*rho[5]*weight[7]-0.07698003589195011*rho[4]*weight[7]-0.14907119849998599*rho[1]*weight[7]-0.08606629658238704*rho[0]*weight[7]+0.1374643498070538*weight[5]*rho[7]-0.07698003589195011*weight[4]*rho[7]-0.14907119849998599*weight[1]*rho[7]-0.08606629658238704*weight[0]*rho[7]+0.2*rho[6]*weight[6]+0.10327955589886445*rho[3]*weight[6]+0.10327955589886445*weight[3]*rho[6]+0.23809523809523808*rho[5]*weight[5]-0.08606629658238706*rho[1]*weight[5]-0.149071198499986*rho[0]*weight[5]-0.08606629658238706*weight[1]*rho[5]-0.149071198499986*weight[0]*rho[5]+0.3333333333333333*rho[4]*weight[4]+0.1721325931647741*rho[1]*weight[4]+0.1721325931647741*weight[1]*rho[4]+0.2*rho[3]*weight[3]+0.11547005383792514*rho[2]*weight[3]+0.11547005383792514*weight[2]*rho[3]+0.2*rho[2]*weight[2]+0.3333333333333333*rho[1]*weight[1]+0.19245008972987523*rho[0]*weight[1]+0.19245008972987523*weight[0]*rho[1]+0.3333333333333333*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[5]],0.030952380952380953*rho[7]*weight[7]-0.06666666666666667*rho[6]*weight[7]-0.07560539239387958*rho[5]*weight[7]-0.03849001794597506*rho[4]*weight[7]+0.07745966692414834*rho[3]*weight[7]-0.07453559924999299*rho[2]*weight[7]+0.07453559924999299*rho[1]*weight[7]-0.04303314829119352*rho[0]*weight[7]-0.06666666666666667*weight[6]*rho[7]-0.07560539239387958*weight[5]*rho[7]-0.03849001794597506*weight[4]*rho[7]+0.07745966692414834*weight[3]*rho[7]-0.07453559924999299*weight[2]*rho[7]+0.07453559924999299*weight[1]*rho[7]-0.04303314829119352*weight[0]*rho[7]+0.030952380952380953*rho[6]*weight[6]+0.03849001794597506*rho[5]*weight[6]+0.07560539239387958*rho[4]*weight[6]-0.07745966692414834*rho[3]*weight[6]+0.07453559924999299*rho[2]*weight[6]-0.07453559924999299*rho[1]*weight[6]+0.04303314829119352*rho[0]*weight[6]+0.03849001794597506*weight[5]*rho[6]+0.07560539239387958*weight[4]*rho[6]-0.07745966692414834*weight[3]*rho[6]+0.07453559924999299*weight[2]*rho[6]-0.07453559924999299*weight[1]*rho[6]+0.04303314829119352*weight[0]*rho[6]-0.03571428571428571*rho[5]*weight[5]-0.074535599249993*rho[3]*weight[5]+0.04303314829119353*rho[2]*weight[5]-0.04303314829119353*rho[1]*weight[5]+0.074535599249993*rho[0]*weight[5]-0.074535599249993*weight[3]*rho[5]+0.04303314829119353*weight[2]*rho[5]-0.04303314829119353*weight[1]*rho[5]+0.074535599249993*weight[0]*rho[5]-0.03571428571428571*rho[4]*weight[4]-0.074535599249993*rho[3]*weight[4]+0.04303314829119353*rho[2]*weight[4]-0.04303314829119353*rho[1]*weight[4]+0.074535599249993*rho[0]*weight[4]-0.074535599249993*weight[3]*rho[4]+0.04303314829119353*weight[2]*rho[4]-0.04303314829119353*weight[1]*rho[4]+0.074535599249993*weight[0]*rho[4]+0.05*rho[3]*weight[3]-0.08660254037844384*rho[2]*weight[3]+0.08660254037844384*rho[1]*weight[3]-0.08333333333333333*rho[0]*weight[3]-0.08660254037844384*weight[2]*rho[3]+0.08660254037844384*weight[1]*rho[3]-0.08333333333333333*weight[0]*rho[3]-0.016666666666666666*rho[2]*weight[2]-0.08333333333333333*rho[1]*weight[2]+0.04811252243246881*rho[0]*weight[2]-0.08333333333333333*weight[1]*rho[2]+0.04811252243246881*weight[0]*rho[2]-0.016666666666666666*rho[1]*weight[1]-0.04811252243246881*rho[0]*weight[1]-0.04811252243246881*weight[0]*rho[1]-0.08333333333333333*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[5]] += 0.030952380952380953*rho[7]*weight[7]-0.06666666666666667*rho[6]*weight[7]-0.07560539239387958*rho[5]*weight[7]-0.03849001794597506*rho[4]*weight[7]+0.07745966692414834*rho[3]*weight[7]-0.07453559924999299*rho[2]*weight[7]+0.07453559924999299*rho[1]*weight[7]-0.04303314829119352*rho[0]*weight[7]-0.06666666666666667*weight[6]*rho[7]-0.07560539239387958*weight[5]*rho[7]-0.03849001794597506*weight[4]*rho[7]+0.07745966692414834*weight[3]*rho[7]-0.07453559924999299*weight[2]*rho[7]+0.07453559924999299*weight[1]*rho[7]-0.04303314829119352*weight[0]*rho[7]+0.030952380952380953*rho[6]*weight[6]+0.03849001794597506*rho[5]*weight[6]+0.07560539239387958*rho[4]*weight[6]-0.07745966692414834*rho[3]*weight[6]+0.07453559924999299*rho[2]*weight[6]-0.07453559924999299*rho[1]*weight[6]+0.04303314829119352*rho[0]*weight[6]+0.03849001794597506*weight[5]*rho[6]+0.07560539239387958*weight[4]*rho[6]-0.07745966692414834*weight[3]*rho[6]+0.07453559924999299*weight[2]*rho[6]-0.07453559924999299*weight[1]*rho[6]+0.04303314829119352*weight[0]*rho[6]-0.03571428571428571*rho[5]*weight[5]-0.074535599249993*rho[3]*weight[5]+0.04303314829119353*rho[2]*weight[5]-0.04303314829119353*rho[1]*weight[5]+0.074535599249993*rho[0]*weight[5]-0.074535599249993*weight[3]*rho[5]+0.04303314829119353*weight[2]*rho[5]-0.04303314829119353*weight[1]*rho[5]+0.074535599249993*weight[0]*rho[5]-0.03571428571428571*rho[4]*weight[4]-0.074535599249993*rho[3]*weight[4]+0.04303314829119353*rho[2]*weight[4]-0.04303314829119353*rho[1]*weight[4]+0.074535599249993*rho[0]*weight[4]-0.074535599249993*weight[3]*rho[4]+0.04303314829119353*weight[2]*rho[4]-0.04303314829119353*weight[1]*rho[4]+0.074535599249993*weight[0]*rho[4]+0.05*rho[3]*weight[3]-0.08660254037844384*rho[2]*weight[3]+0.08660254037844384*rho[1]*weight[3]-0.08333333333333333*rho[0]*weight[3]-0.08660254037844384*weight[2]*rho[3]+0.08660254037844384*weight[1]*rho[3]-0.08333333333333333*weight[0]*rho[3]-0.016666666666666666*rho[2]*weight[2]-0.08333333333333333*rho[1]*weight[2]+0.04811252243246881*rho[0]*weight[2]-0.08333333333333333*weight[1]*rho[2]+0.04811252243246881*weight[0]*rho[2]-0.016666666666666666*rho[1]*weight[1]-0.04811252243246881*rho[0]*weight[1]-0.04811252243246881*weight[0]*rho[1]-0.08333333333333333*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[6]],0.2*rho[7]*weight[7]+0.10327955589886445*rho[3]*weight[7]+0.10327955589886445*weight[3]*rho[7]+0.23809523809523808*rho[6]*weight[6]-0.07698003589195011*rho[5]*weight[6]+0.1374643498070538*rho[4]*weight[6]-0.14907119849998599*rho[2]*weight[6]-0.08606629658238704*rho[0]*weight[6]-0.07698003589195011*weight[5]*rho[6]+0.1374643498070538*weight[4]*rho[6]-0.14907119849998599*weight[2]*rho[6]-0.08606629658238704*weight[0]*rho[6]+0.3333333333333333*rho[5]*weight[5]+0.1721325931647741*rho[2]*weight[5]+0.1721325931647741*weight[2]*rho[5]+0.23809523809523808*rho[4]*weight[4]-0.08606629658238706*rho[2]*weight[4]-0.149071198499986*rho[0]*weight[4]-0.08606629658238706*weight[2]*rho[4]-0.149071198499986*weight[0]*rho[4]+0.2*rho[3]*weight[3]+0.11547005383792514*rho[1]*weight[3]+0.11547005383792514*weight[1]*rho[3]+0.3333333333333333*rho[2]*weight[2]+0.19245008972987523*rho[0]*weight[2]+0.19245008972987523*weight[0]*rho[2]+0.2*rho[1]*weight[1]+0.3333333333333333*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[6]] += 0.2*rho[7]*weight[7]+0.10327955589886445*rho[3]*weight[7]+0.10327955589886445*weight[3]*rho[7]+0.23809523809523808*rho[6]*weight[6]-0.07698003589195011*rho[5]*weight[6]+0.1374643498070538*rho[4]*weight[6]-0.14907119849998599*rho[2]*weight[6]-0.08606629658238704*rho[0]*weight[6]-0.07698003589195011*weight[5]*rho[6]+0.1374643498070538*weight[4]*rho[6]-0.14907119849998599*weight[2]*rho[6]-0.08606629658238704*weight[0]*rho[6]+0.3333333333333333*rho[5]*weight[5]+0.1721325931647741*rho[2]*weight[5]+0.1721325931647741*weight[2]*rho[5]+0.23809523809523808*rho[4]*weight[4]-0.08606629658238706*rho[2]*weight[4]-0.149071198499986*rho[0]*weight[4]-0.08606629658238706*weight[2]*rho[4]-0.149071198499986*weight[0]*rho[4]+0.2*rho[3]*weight[3]+0.11547005383792514*rho[1]*weight[3]+0.11547005383792514*weight[1]*rho[3]+0.3333333333333333*rho[2]*weight[2]+0.19245008972987523*rho[0]*weight[2]+0.19245008972987523*weight[0]*rho[2]+0.2*rho[1]*weight[1]+0.3333333333333333*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[7]],0.030952380952380953*rho[7]*weight[7]+0.06666666666666667*rho[6]*weight[7]+0.07560539239387958*rho[5]*weight[7]+0.03849001794597506*rho[4]*weight[7]+0.07745966692414834*rho[3]*weight[7]+0.07453559924999299*rho[2]*weight[7]+0.07453559924999299*rho[1]*weight[7]+0.04303314829119352*rho[0]*weight[7]+0.06666666666666667*weight[6]*rho[7]+0.07560539239387958*weight[5]*rho[7]+0.03849001794597506*weight[4]*rho[7]+0.07745966692414834*weight[3]*rho[7]+0.07453559924999299*weight[2]*rho[7]+0.07453559924999299*weight[1]*rho[7]+0.04303314829119352*weight[0]*rho[7]+0.030952380952380953*rho[6]*weight[6]+0.03849001794597506*rho[5]*weight[6]+0.07560539239387958*rho[4]*weight[6]+0.07745966692414834*rho[3]*weight[6]+0.07453559924999299*rho[2]*weight[6]+0.07453559924999299*rho[1]*weight[6]+0.04303314829119352*rho[0]*weight[6]+0.03849001794597506*weight[5]*rho[6]+0.07560539239387958*weight[4]*rho[6]+0.07745966692414834*weight[3]*rho[6]+0.07453559924999299*weight[2]*rho[6]+0.07453559924999299*weight[1]*rho[6]+0.04303314829119352*weight[0]*rho[6]-0.03571428571428571*rho[5]*weight[5]+0.074535599249993*rho[3]*weight[5]+0.04303314829119353*rho[2]*weight[5]+0.04303314829119353*rho[1]*weight[5]+0.074535599249993*rho[0]*weight[5]+0.074535599249993*weight[3]*rho[5]+0.04303314829119353*weight[2]*rho[5]+0.04303314829119353*weight[1]*rho[5]+0.074535599249993*weight[0]*rho[5]-0.03571428571428571*rho[4]*weight[4]+0.074535599249993*rho[3]*weight[4]+0.04303314829119353*rho[2]*weight[4]+0.04303314829119353*rho[1]*weight[4]+0.074535599249993*rho[0]*weight[4]+0.074535599249993*weight[3]*rho[4]+0.04303314829119353*weight[2]*rho[4]+0.04303314829119353*weight[1]*rho[4]+0.074535599249993*weight[0]*rho[4]+0.05*rho[3]*weight[3]+0.08660254037844384*rho[2]*weight[3]+0.08660254037844384*rho[1]*weight[3]+0.08333333333333333*rho[0]*weight[3]+0.08660254037844384*weight[2]*rho[3]+0.08660254037844384*weight[1]*rho[3]+0.08333333333333333*weight[0]*rho[3]-0.016666666666666666*rho[2]*weight[2]+0.08333333333333333*rho[1]*weight[2]+0.04811252243246881*rho[0]*weight[2]+0.08333333333333333*weight[1]*rho[2]+0.04811252243246881*weight[0]*rho[2]-0.016666666666666666*rho[1]*weight[1]+0.04811252243246881*rho[0]*weight[1]+0.04811252243246881*weight[0]*rho[1]-0.08333333333333333*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[7]] += 0.030952380952380953*rho[7]*weight[7]+0.06666666666666667*rho[6]*weight[7]+0.07560539239387958*rho[5]*weight[7]+0.03849001794597506*rho[4]*weight[7]+0.07745966692414834*rho[3]*weight[7]+0.07453559924999299*rho[2]*weight[7]+0.07453559924999299*rho[1]*weight[7]+0.04303314829119352*rho[0]*weight[7]+0.06666666666666667*weight[6]*rho[7]+0.07560539239387958*weight[5]*rho[7]+0.03849001794597506*weight[4]*rho[7]+0.07745966692414834*weight[3]*rho[7]+0.07453559924999299*weight[2]*rho[7]+0.07453559924999299*weight[1]*rho[7]+0.04303314829119352*weight[0]*rho[7]+0.030952380952380953*rho[6]*weight[6]+0.03849001794597506*rho[5]*weight[6]+0.07560539239387958*rho[4]*weight[6]+0.07745966692414834*rho[3]*weight[6]+0.07453559924999299*rho[2]*weight[6]+0.07453559924999299*rho[1]*weight[6]+0.04303314829119352*rho[0]*weight[6]+0.03849001794597506*weight[5]*rho[6]+0.07560539239387958*weight[4]*rho[6]+0.07745966692414834*weight[3]*rho[6]+0.07453559924999299*weight[2]*rho[6]+0.07453559924999299*weight[1]*rho[6]+0.04303314829119352*weight[0]*rho[6]-0.03571428571428571*rho[5]*weight[5]+0.074535599249993*rho[3]*weight[5]+0.04303314829119353*rho[2]*weight[5]+0.04303314829119353*rho[1]*weight[5]+0.074535599249993*rho[0]*weight[5]+0.074535599249993*weight[3]*rho[5]+0.04303314829119353*weight[2]*rho[5]+0.04303314829119353*weight[1]*rho[5]+0.074535599249993*weight[0]*rho[5]-0.03571428571428571*rho[4]*weight[4]+0.074535599249993*rho[3]*weight[4]+0.04303314829119353*rho[2]*weight[4]+0.04303314829119353*rho[1]*weight[4]+0.074535599249993*rho[0]*weight[4]+0.074535599249993*weight[3]*rho[4]+0.04303314829119353*weight[2]*rho[4]+0.04303314829119353*weight[1]*rho[4]+0.074535599249993*weight[0]*rho[4]+0.05*rho[3]*weight[3]+0.08660254037844384*rho[2]*weight[3]+0.08660254037844384*rho[1]*weight[3]+0.08333333333333333*rho[0]*weight[3]+0.08660254037844384*weight[2]*rho[3]+0.08660254037844384*weight[1]*rho[3]+0.08333333333333333*weight[0]*rho[3]-0.016666666666666666*rho[2]*weight[2]+0.08333333333333333*rho[1]*weight[2]+0.04811252243246881*rho[0]*weight[2]+0.08333333333333333*weight[1]*rho[2]+0.04811252243246881*weight[0]*rho[2]-0.016666666666666666*rho[1]*weight[1]+0.04811252243246881*rho[0]*weight[1]+0.04811252243246881*weight[0]*rho[1]-0.08333333333333333*rho[0]*weight[0]; + #endif + +} + +GKYL_CU_DH void fem_parproj_src_stencil_weighted_2x_ser_p1_loy_nondirichlety(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +{ + // rho: right side source. + // weight: Weight in the projection operation. + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. + // nodeOff: node offset (prob idx * global number of nodes). + // globalIdxs: global linear index of each basis function/node in current cell. + // bsrc: global right side source vector. + + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[0]],0.25*rho[3]*weight[3]-0.14433756729740643*rho[2]*weight[3]-0.14433756729740643*rho[1]*weight[3]+0.08333333333333333*rho[0]*weight[3]-0.14433756729740643*weight[2]*rho[3]-0.14433756729740643*weight[1]*rho[3]+0.08333333333333333*weight[0]*rho[3]+0.25*rho[2]*weight[2]+0.08333333333333333*rho[1]*weight[2]-0.14433756729740643*rho[0]*weight[2]+0.08333333333333333*weight[1]*rho[2]-0.14433756729740643*weight[0]*rho[2]+0.25*rho[1]*weight[1]-0.14433756729740643*rho[0]*weight[1]-0.14433756729740643*weight[0]*rho[1]+0.25*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[0]] += 0.25*rho[3]*weight[3]-0.14433756729740643*rho[2]*weight[3]-0.14433756729740643*rho[1]*weight[3]+0.08333333333333333*rho[0]*weight[3]-0.14433756729740643*weight[2]*rho[3]-0.14433756729740643*weight[1]*rho[3]+0.08333333333333333*weight[0]*rho[3]+0.25*rho[2]*weight[2]+0.08333333333333333*rho[1]*weight[2]-0.14433756729740643*rho[0]*weight[2]+0.08333333333333333*weight[1]*rho[2]-0.14433756729740643*weight[0]*rho[2]+0.25*rho[1]*weight[1]-0.14433756729740643*rho[0]*weight[1]-0.14433756729740643*weight[0]*rho[1]+0.25*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[1]],0.25*rho[3]*weight[3]+0.14433756729740643*rho[2]*weight[3]-0.14433756729740643*rho[1]*weight[3]-0.08333333333333333*rho[0]*weight[3]+0.14433756729740643*weight[2]*rho[3]-0.14433756729740643*weight[1]*rho[3]-0.08333333333333333*weight[0]*rho[3]+0.25*rho[2]*weight[2]-0.08333333333333333*rho[1]*weight[2]-0.14433756729740643*rho[0]*weight[2]-0.08333333333333333*weight[1]*rho[2]-0.14433756729740643*weight[0]*rho[2]+0.25*rho[1]*weight[1]+0.14433756729740643*rho[0]*weight[1]+0.14433756729740643*weight[0]*rho[1]+0.25*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[1]] += 0.25*rho[3]*weight[3]+0.14433756729740643*rho[2]*weight[3]-0.14433756729740643*rho[1]*weight[3]-0.08333333333333333*rho[0]*weight[3]+0.14433756729740643*weight[2]*rho[3]-0.14433756729740643*weight[1]*rho[3]-0.08333333333333333*weight[0]*rho[3]+0.25*rho[2]*weight[2]-0.08333333333333333*rho[1]*weight[2]-0.14433756729740643*rho[0]*weight[2]-0.08333333333333333*weight[1]*rho[2]-0.14433756729740643*weight[0]*rho[2]+0.25*rho[1]*weight[1]+0.14433756729740643*rho[0]*weight[1]+0.14433756729740643*weight[0]*rho[1]+0.25*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[2]],0.25*rho[3]*weight[3]-0.14433756729740643*rho[2]*weight[3]+0.14433756729740643*rho[1]*weight[3]-0.08333333333333333*rho[0]*weight[3]-0.14433756729740643*weight[2]*rho[3]+0.14433756729740643*weight[1]*rho[3]-0.08333333333333333*weight[0]*rho[3]+0.25*rho[2]*weight[2]-0.08333333333333333*rho[1]*weight[2]+0.14433756729740643*rho[0]*weight[2]-0.08333333333333333*weight[1]*rho[2]+0.14433756729740643*weight[0]*rho[2]+0.25*rho[1]*weight[1]-0.14433756729740643*rho[0]*weight[1]-0.14433756729740643*weight[0]*rho[1]+0.25*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[2]] += 0.25*rho[3]*weight[3]-0.14433756729740643*rho[2]*weight[3]+0.14433756729740643*rho[1]*weight[3]-0.08333333333333333*rho[0]*weight[3]-0.14433756729740643*weight[2]*rho[3]+0.14433756729740643*weight[1]*rho[3]-0.08333333333333333*weight[0]*rho[3]+0.25*rho[2]*weight[2]-0.08333333333333333*rho[1]*weight[2]+0.14433756729740643*rho[0]*weight[2]-0.08333333333333333*weight[1]*rho[2]+0.14433756729740643*weight[0]*rho[2]+0.25*rho[1]*weight[1]-0.14433756729740643*rho[0]*weight[1]-0.14433756729740643*weight[0]*rho[1]+0.25*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[3]],0.25*rho[3]*weight[3]+0.14433756729740643*rho[2]*weight[3]+0.14433756729740643*rho[1]*weight[3]+0.08333333333333333*rho[0]*weight[3]+0.14433756729740643*weight[2]*rho[3]+0.14433756729740643*weight[1]*rho[3]+0.08333333333333333*weight[0]*rho[3]+0.25*rho[2]*weight[2]+0.08333333333333333*rho[1]*weight[2]+0.14433756729740643*rho[0]*weight[2]+0.08333333333333333*weight[1]*rho[2]+0.14433756729740643*weight[0]*rho[2]+0.25*rho[1]*weight[1]+0.14433756729740643*rho[0]*weight[1]+0.14433756729740643*weight[0]*rho[1]+0.25*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[3]] += 0.25*rho[3]*weight[3]+0.14433756729740643*rho[2]*weight[3]+0.14433756729740643*rho[1]*weight[3]+0.08333333333333333*rho[0]*weight[3]+0.14433756729740643*weight[2]*rho[3]+0.14433756729740643*weight[1]*rho[3]+0.08333333333333333*weight[0]*rho[3]+0.25*rho[2]*weight[2]+0.08333333333333333*rho[1]*weight[2]+0.14433756729740643*rho[0]*weight[2]+0.08333333333333333*weight[1]*rho[2]+0.14433756729740643*weight[0]*rho[2]+0.25*rho[1]*weight[1]+0.14433756729740643*rho[0]*weight[1]+0.14433756729740643*weight[0]*rho[1]+0.25*rho[0]*weight[0]; + #endif + +} + +GKYL_CU_DH void fem_parproj_src_stencil_weighted_2x_ser_p2_loy_nondirichlety(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +{ + // rho: right side source. + // weight: Weight in the projection operation. + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. + // nodeOff: node offset (prob idx * global number of nodes). + // globalIdxs: global linear index of each basis function/node in current cell. + // bsrc: global right side source vector. + + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[0]],0.030952380952380953*rho[7]*weight[7]+0.06666666666666667*rho[6]*weight[7]-0.07560539239387958*rho[5]*weight[7]-0.03849001794597506*rho[4]*weight[7]-0.07745966692414834*rho[3]*weight[7]+0.07453559924999299*rho[2]*weight[7]+0.07453559924999299*rho[1]*weight[7]-0.04303314829119352*rho[0]*weight[7]+0.06666666666666667*weight[6]*rho[7]-0.07560539239387958*weight[5]*rho[7]-0.03849001794597506*weight[4]*rho[7]-0.07745966692414834*weight[3]*rho[7]+0.07453559924999299*weight[2]*rho[7]+0.07453559924999299*weight[1]*rho[7]-0.04303314829119352*weight[0]*rho[7]+0.030952380952380953*rho[6]*weight[6]-0.03849001794597506*rho[5]*weight[6]-0.07560539239387958*rho[4]*weight[6]-0.07745966692414834*rho[3]*weight[6]+0.07453559924999299*rho[2]*weight[6]+0.07453559924999299*rho[1]*weight[6]-0.04303314829119352*rho[0]*weight[6]-0.03849001794597506*weight[5]*rho[6]-0.07560539239387958*weight[4]*rho[6]-0.07745966692414834*weight[3]*rho[6]+0.07453559924999299*weight[2]*rho[6]+0.07453559924999299*weight[1]*rho[6]-0.04303314829119352*weight[0]*rho[6]-0.03571428571428571*rho[5]*weight[5]+0.074535599249993*rho[3]*weight[5]-0.04303314829119353*rho[2]*weight[5]-0.04303314829119353*rho[1]*weight[5]+0.074535599249993*rho[0]*weight[5]+0.074535599249993*weight[3]*rho[5]-0.04303314829119353*weight[2]*rho[5]-0.04303314829119353*weight[1]*rho[5]+0.074535599249993*weight[0]*rho[5]-0.03571428571428571*rho[4]*weight[4]+0.074535599249993*rho[3]*weight[4]-0.04303314829119353*rho[2]*weight[4]-0.04303314829119353*rho[1]*weight[4]+0.074535599249993*rho[0]*weight[4]+0.074535599249993*weight[3]*rho[4]-0.04303314829119353*weight[2]*rho[4]-0.04303314829119353*weight[1]*rho[4]+0.074535599249993*weight[0]*rho[4]+0.05*rho[3]*weight[3]-0.08660254037844384*rho[2]*weight[3]-0.08660254037844384*rho[1]*weight[3]+0.08333333333333333*rho[0]*weight[3]-0.08660254037844384*weight[2]*rho[3]-0.08660254037844384*weight[1]*rho[3]+0.08333333333333333*weight[0]*rho[3]-0.016666666666666666*rho[2]*weight[2]+0.08333333333333333*rho[1]*weight[2]-0.04811252243246881*rho[0]*weight[2]+0.08333333333333333*weight[1]*rho[2]-0.04811252243246881*weight[0]*rho[2]-0.016666666666666666*rho[1]*weight[1]-0.04811252243246881*rho[0]*weight[1]-0.04811252243246881*weight[0]*rho[1]-0.08333333333333333*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[0]] += 0.030952380952380953*rho[7]*weight[7]+0.06666666666666667*rho[6]*weight[7]-0.07560539239387958*rho[5]*weight[7]-0.03849001794597506*rho[4]*weight[7]-0.07745966692414834*rho[3]*weight[7]+0.07453559924999299*rho[2]*weight[7]+0.07453559924999299*rho[1]*weight[7]-0.04303314829119352*rho[0]*weight[7]+0.06666666666666667*weight[6]*rho[7]-0.07560539239387958*weight[5]*rho[7]-0.03849001794597506*weight[4]*rho[7]-0.07745966692414834*weight[3]*rho[7]+0.07453559924999299*weight[2]*rho[7]+0.07453559924999299*weight[1]*rho[7]-0.04303314829119352*weight[0]*rho[7]+0.030952380952380953*rho[6]*weight[6]-0.03849001794597506*rho[5]*weight[6]-0.07560539239387958*rho[4]*weight[6]-0.07745966692414834*rho[3]*weight[6]+0.07453559924999299*rho[2]*weight[6]+0.07453559924999299*rho[1]*weight[6]-0.04303314829119352*rho[0]*weight[6]-0.03849001794597506*weight[5]*rho[6]-0.07560539239387958*weight[4]*rho[6]-0.07745966692414834*weight[3]*rho[6]+0.07453559924999299*weight[2]*rho[6]+0.07453559924999299*weight[1]*rho[6]-0.04303314829119352*weight[0]*rho[6]-0.03571428571428571*rho[5]*weight[5]+0.074535599249993*rho[3]*weight[5]-0.04303314829119353*rho[2]*weight[5]-0.04303314829119353*rho[1]*weight[5]+0.074535599249993*rho[0]*weight[5]+0.074535599249993*weight[3]*rho[5]-0.04303314829119353*weight[2]*rho[5]-0.04303314829119353*weight[1]*rho[5]+0.074535599249993*weight[0]*rho[5]-0.03571428571428571*rho[4]*weight[4]+0.074535599249993*rho[3]*weight[4]-0.04303314829119353*rho[2]*weight[4]-0.04303314829119353*rho[1]*weight[4]+0.074535599249993*rho[0]*weight[4]+0.074535599249993*weight[3]*rho[4]-0.04303314829119353*weight[2]*rho[4]-0.04303314829119353*weight[1]*rho[4]+0.074535599249993*weight[0]*rho[4]+0.05*rho[3]*weight[3]-0.08660254037844384*rho[2]*weight[3]-0.08660254037844384*rho[1]*weight[3]+0.08333333333333333*rho[0]*weight[3]-0.08660254037844384*weight[2]*rho[3]-0.08660254037844384*weight[1]*rho[3]+0.08333333333333333*weight[0]*rho[3]-0.016666666666666666*rho[2]*weight[2]+0.08333333333333333*rho[1]*weight[2]-0.04811252243246881*rho[0]*weight[2]+0.08333333333333333*weight[1]*rho[2]-0.04811252243246881*weight[0]*rho[2]-0.016666666666666666*rho[1]*weight[1]-0.04811252243246881*rho[0]*weight[1]-0.04811252243246881*weight[0]*rho[1]-0.08333333333333333*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[1]],0.2*rho[7]*weight[7]-0.10327955589886445*rho[3]*weight[7]-0.10327955589886445*weight[3]*rho[7]+0.23809523809523808*rho[6]*weight[6]+0.07698003589195011*rho[5]*weight[6]-0.1374643498070538*rho[4]*weight[6]-0.14907119849998599*rho[2]*weight[6]+0.08606629658238704*rho[0]*weight[6]+0.07698003589195011*weight[5]*rho[6]-0.1374643498070538*weight[4]*rho[6]-0.14907119849998599*weight[2]*rho[6]+0.08606629658238704*weight[0]*rho[6]+0.3333333333333333*rho[5]*weight[5]-0.1721325931647741*rho[2]*weight[5]-0.1721325931647741*weight[2]*rho[5]+0.23809523809523808*rho[4]*weight[4]+0.08606629658238706*rho[2]*weight[4]-0.149071198499986*rho[0]*weight[4]+0.08606629658238706*weight[2]*rho[4]-0.149071198499986*weight[0]*rho[4]+0.2*rho[3]*weight[3]-0.11547005383792514*rho[1]*weight[3]-0.11547005383792514*weight[1]*rho[3]+0.3333333333333333*rho[2]*weight[2]-0.19245008972987523*rho[0]*weight[2]-0.19245008972987523*weight[0]*rho[2]+0.2*rho[1]*weight[1]+0.3333333333333333*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[1]] += 0.2*rho[7]*weight[7]-0.10327955589886445*rho[3]*weight[7]-0.10327955589886445*weight[3]*rho[7]+0.23809523809523808*rho[6]*weight[6]+0.07698003589195011*rho[5]*weight[6]-0.1374643498070538*rho[4]*weight[6]-0.14907119849998599*rho[2]*weight[6]+0.08606629658238704*rho[0]*weight[6]+0.07698003589195011*weight[5]*rho[6]-0.1374643498070538*weight[4]*rho[6]-0.14907119849998599*weight[2]*rho[6]+0.08606629658238704*weight[0]*rho[6]+0.3333333333333333*rho[5]*weight[5]-0.1721325931647741*rho[2]*weight[5]-0.1721325931647741*weight[2]*rho[5]+0.23809523809523808*rho[4]*weight[4]+0.08606629658238706*rho[2]*weight[4]-0.149071198499986*rho[0]*weight[4]+0.08606629658238706*weight[2]*rho[4]-0.149071198499986*weight[0]*rho[4]+0.2*rho[3]*weight[3]-0.11547005383792514*rho[1]*weight[3]-0.11547005383792514*weight[1]*rho[3]+0.3333333333333333*rho[2]*weight[2]-0.19245008972987523*rho[0]*weight[2]-0.19245008972987523*weight[0]*rho[2]+0.2*rho[1]*weight[1]+0.3333333333333333*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[2]],0.030952380952380953*rho[7]*weight[7]-0.06666666666666667*rho[6]*weight[7]+0.07560539239387958*rho[5]*weight[7]+0.03849001794597506*rho[4]*weight[7]-0.07745966692414834*rho[3]*weight[7]-0.07453559924999299*rho[2]*weight[7]+0.07453559924999299*rho[1]*weight[7]+0.04303314829119352*rho[0]*weight[7]-0.06666666666666667*weight[6]*rho[7]+0.07560539239387958*weight[5]*rho[7]+0.03849001794597506*weight[4]*rho[7]-0.07745966692414834*weight[3]*rho[7]-0.07453559924999299*weight[2]*rho[7]+0.07453559924999299*weight[1]*rho[7]+0.04303314829119352*weight[0]*rho[7]+0.030952380952380953*rho[6]*weight[6]-0.03849001794597506*rho[5]*weight[6]-0.07560539239387958*rho[4]*weight[6]+0.07745966692414834*rho[3]*weight[6]+0.07453559924999299*rho[2]*weight[6]-0.07453559924999299*rho[1]*weight[6]-0.04303314829119352*rho[0]*weight[6]-0.03849001794597506*weight[5]*rho[6]-0.07560539239387958*weight[4]*rho[6]+0.07745966692414834*weight[3]*rho[6]+0.07453559924999299*weight[2]*rho[6]-0.07453559924999299*weight[1]*rho[6]-0.04303314829119352*weight[0]*rho[6]-0.03571428571428571*rho[5]*weight[5]-0.074535599249993*rho[3]*weight[5]-0.04303314829119353*rho[2]*weight[5]+0.04303314829119353*rho[1]*weight[5]+0.074535599249993*rho[0]*weight[5]-0.074535599249993*weight[3]*rho[5]-0.04303314829119353*weight[2]*rho[5]+0.04303314829119353*weight[1]*rho[5]+0.074535599249993*weight[0]*rho[5]-0.03571428571428571*rho[4]*weight[4]-0.074535599249993*rho[3]*weight[4]-0.04303314829119353*rho[2]*weight[4]+0.04303314829119353*rho[1]*weight[4]+0.074535599249993*rho[0]*weight[4]-0.074535599249993*weight[3]*rho[4]-0.04303314829119353*weight[2]*rho[4]+0.04303314829119353*weight[1]*rho[4]+0.074535599249993*weight[0]*rho[4]+0.05*rho[3]*weight[3]+0.08660254037844384*rho[2]*weight[3]-0.08660254037844384*rho[1]*weight[3]-0.08333333333333333*rho[0]*weight[3]+0.08660254037844384*weight[2]*rho[3]-0.08660254037844384*weight[1]*rho[3]-0.08333333333333333*weight[0]*rho[3]-0.016666666666666666*rho[2]*weight[2]-0.08333333333333333*rho[1]*weight[2]-0.04811252243246881*rho[0]*weight[2]-0.08333333333333333*weight[1]*rho[2]-0.04811252243246881*weight[0]*rho[2]-0.016666666666666666*rho[1]*weight[1]+0.04811252243246881*rho[0]*weight[1]+0.04811252243246881*weight[0]*rho[1]-0.08333333333333333*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[2]] += 0.030952380952380953*rho[7]*weight[7]-0.06666666666666667*rho[6]*weight[7]+0.07560539239387958*rho[5]*weight[7]+0.03849001794597506*rho[4]*weight[7]-0.07745966692414834*rho[3]*weight[7]-0.07453559924999299*rho[2]*weight[7]+0.07453559924999299*rho[1]*weight[7]+0.04303314829119352*rho[0]*weight[7]-0.06666666666666667*weight[6]*rho[7]+0.07560539239387958*weight[5]*rho[7]+0.03849001794597506*weight[4]*rho[7]-0.07745966692414834*weight[3]*rho[7]-0.07453559924999299*weight[2]*rho[7]+0.07453559924999299*weight[1]*rho[7]+0.04303314829119352*weight[0]*rho[7]+0.030952380952380953*rho[6]*weight[6]-0.03849001794597506*rho[5]*weight[6]-0.07560539239387958*rho[4]*weight[6]+0.07745966692414834*rho[3]*weight[6]+0.07453559924999299*rho[2]*weight[6]-0.07453559924999299*rho[1]*weight[6]-0.04303314829119352*rho[0]*weight[6]-0.03849001794597506*weight[5]*rho[6]-0.07560539239387958*weight[4]*rho[6]+0.07745966692414834*weight[3]*rho[6]+0.07453559924999299*weight[2]*rho[6]-0.07453559924999299*weight[1]*rho[6]-0.04303314829119352*weight[0]*rho[6]-0.03571428571428571*rho[5]*weight[5]-0.074535599249993*rho[3]*weight[5]-0.04303314829119353*rho[2]*weight[5]+0.04303314829119353*rho[1]*weight[5]+0.074535599249993*rho[0]*weight[5]-0.074535599249993*weight[3]*rho[5]-0.04303314829119353*weight[2]*rho[5]+0.04303314829119353*weight[1]*rho[5]+0.074535599249993*weight[0]*rho[5]-0.03571428571428571*rho[4]*weight[4]-0.074535599249993*rho[3]*weight[4]-0.04303314829119353*rho[2]*weight[4]+0.04303314829119353*rho[1]*weight[4]+0.074535599249993*rho[0]*weight[4]-0.074535599249993*weight[3]*rho[4]-0.04303314829119353*weight[2]*rho[4]+0.04303314829119353*weight[1]*rho[4]+0.074535599249993*weight[0]*rho[4]+0.05*rho[3]*weight[3]+0.08660254037844384*rho[2]*weight[3]-0.08660254037844384*rho[1]*weight[3]-0.08333333333333333*rho[0]*weight[3]+0.08660254037844384*weight[2]*rho[3]-0.08660254037844384*weight[1]*rho[3]-0.08333333333333333*weight[0]*rho[3]-0.016666666666666666*rho[2]*weight[2]-0.08333333333333333*rho[1]*weight[2]-0.04811252243246881*rho[0]*weight[2]-0.08333333333333333*weight[1]*rho[2]-0.04811252243246881*weight[0]*rho[2]-0.016666666666666666*rho[1]*weight[1]+0.04811252243246881*rho[0]*weight[1]+0.04811252243246881*weight[0]*rho[1]-0.08333333333333333*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[3]],0.23809523809523808*rho[7]*weight[7]-0.1374643498070538*rho[5]*weight[7]+0.07698003589195011*rho[4]*weight[7]-0.14907119849998599*rho[1]*weight[7]+0.08606629658238704*rho[0]*weight[7]-0.1374643498070538*weight[5]*rho[7]+0.07698003589195011*weight[4]*rho[7]-0.14907119849998599*weight[1]*rho[7]+0.08606629658238704*weight[0]*rho[7]+0.2*rho[6]*weight[6]-0.10327955589886445*rho[3]*weight[6]-0.10327955589886445*weight[3]*rho[6]+0.23809523809523808*rho[5]*weight[5]+0.08606629658238706*rho[1]*weight[5]-0.149071198499986*rho[0]*weight[5]+0.08606629658238706*weight[1]*rho[5]-0.149071198499986*weight[0]*rho[5]+0.3333333333333333*rho[4]*weight[4]-0.1721325931647741*rho[1]*weight[4]-0.1721325931647741*weight[1]*rho[4]+0.2*rho[3]*weight[3]-0.11547005383792514*rho[2]*weight[3]-0.11547005383792514*weight[2]*rho[3]+0.2*rho[2]*weight[2]+0.3333333333333333*rho[1]*weight[1]-0.19245008972987523*rho[0]*weight[1]-0.19245008972987523*weight[0]*rho[1]+0.3333333333333333*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[3]] += 0.23809523809523808*rho[7]*weight[7]-0.1374643498070538*rho[5]*weight[7]+0.07698003589195011*rho[4]*weight[7]-0.14907119849998599*rho[1]*weight[7]+0.08606629658238704*rho[0]*weight[7]-0.1374643498070538*weight[5]*rho[7]+0.07698003589195011*weight[4]*rho[7]-0.14907119849998599*weight[1]*rho[7]+0.08606629658238704*weight[0]*rho[7]+0.2*rho[6]*weight[6]-0.10327955589886445*rho[3]*weight[6]-0.10327955589886445*weight[3]*rho[6]+0.23809523809523808*rho[5]*weight[5]+0.08606629658238706*rho[1]*weight[5]-0.149071198499986*rho[0]*weight[5]+0.08606629658238706*weight[1]*rho[5]-0.149071198499986*weight[0]*rho[5]+0.3333333333333333*rho[4]*weight[4]-0.1721325931647741*rho[1]*weight[4]-0.1721325931647741*weight[1]*rho[4]+0.2*rho[3]*weight[3]-0.11547005383792514*rho[2]*weight[3]-0.11547005383792514*weight[2]*rho[3]+0.2*rho[2]*weight[2]+0.3333333333333333*rho[1]*weight[1]-0.19245008972987523*rho[0]*weight[1]-0.19245008972987523*weight[0]*rho[1]+0.3333333333333333*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[4]],0.23809523809523808*rho[7]*weight[7]+0.1374643498070538*rho[5]*weight[7]-0.07698003589195011*rho[4]*weight[7]-0.14907119849998599*rho[1]*weight[7]-0.08606629658238704*rho[0]*weight[7]+0.1374643498070538*weight[5]*rho[7]-0.07698003589195011*weight[4]*rho[7]-0.14907119849998599*weight[1]*rho[7]-0.08606629658238704*weight[0]*rho[7]+0.2*rho[6]*weight[6]+0.10327955589886445*rho[3]*weight[6]+0.10327955589886445*weight[3]*rho[6]+0.23809523809523808*rho[5]*weight[5]-0.08606629658238706*rho[1]*weight[5]-0.149071198499986*rho[0]*weight[5]-0.08606629658238706*weight[1]*rho[5]-0.149071198499986*weight[0]*rho[5]+0.3333333333333333*rho[4]*weight[4]+0.1721325931647741*rho[1]*weight[4]+0.1721325931647741*weight[1]*rho[4]+0.2*rho[3]*weight[3]+0.11547005383792514*rho[2]*weight[3]+0.11547005383792514*weight[2]*rho[3]+0.2*rho[2]*weight[2]+0.3333333333333333*rho[1]*weight[1]+0.19245008972987523*rho[0]*weight[1]+0.19245008972987523*weight[0]*rho[1]+0.3333333333333333*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[4]] += 0.23809523809523808*rho[7]*weight[7]+0.1374643498070538*rho[5]*weight[7]-0.07698003589195011*rho[4]*weight[7]-0.14907119849998599*rho[1]*weight[7]-0.08606629658238704*rho[0]*weight[7]+0.1374643498070538*weight[5]*rho[7]-0.07698003589195011*weight[4]*rho[7]-0.14907119849998599*weight[1]*rho[7]-0.08606629658238704*weight[0]*rho[7]+0.2*rho[6]*weight[6]+0.10327955589886445*rho[3]*weight[6]+0.10327955589886445*weight[3]*rho[6]+0.23809523809523808*rho[5]*weight[5]-0.08606629658238706*rho[1]*weight[5]-0.149071198499986*rho[0]*weight[5]-0.08606629658238706*weight[1]*rho[5]-0.149071198499986*weight[0]*rho[5]+0.3333333333333333*rho[4]*weight[4]+0.1721325931647741*rho[1]*weight[4]+0.1721325931647741*weight[1]*rho[4]+0.2*rho[3]*weight[3]+0.11547005383792514*rho[2]*weight[3]+0.11547005383792514*weight[2]*rho[3]+0.2*rho[2]*weight[2]+0.3333333333333333*rho[1]*weight[1]+0.19245008972987523*rho[0]*weight[1]+0.19245008972987523*weight[0]*rho[1]+0.3333333333333333*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[5]],0.030952380952380953*rho[7]*weight[7]-0.06666666666666667*rho[6]*weight[7]-0.07560539239387958*rho[5]*weight[7]-0.03849001794597506*rho[4]*weight[7]+0.07745966692414834*rho[3]*weight[7]-0.07453559924999299*rho[2]*weight[7]+0.07453559924999299*rho[1]*weight[7]-0.04303314829119352*rho[0]*weight[7]-0.06666666666666667*weight[6]*rho[7]-0.07560539239387958*weight[5]*rho[7]-0.03849001794597506*weight[4]*rho[7]+0.07745966692414834*weight[3]*rho[7]-0.07453559924999299*weight[2]*rho[7]+0.07453559924999299*weight[1]*rho[7]-0.04303314829119352*weight[0]*rho[7]+0.030952380952380953*rho[6]*weight[6]+0.03849001794597506*rho[5]*weight[6]+0.07560539239387958*rho[4]*weight[6]-0.07745966692414834*rho[3]*weight[6]+0.07453559924999299*rho[2]*weight[6]-0.07453559924999299*rho[1]*weight[6]+0.04303314829119352*rho[0]*weight[6]+0.03849001794597506*weight[5]*rho[6]+0.07560539239387958*weight[4]*rho[6]-0.07745966692414834*weight[3]*rho[6]+0.07453559924999299*weight[2]*rho[6]-0.07453559924999299*weight[1]*rho[6]+0.04303314829119352*weight[0]*rho[6]-0.03571428571428571*rho[5]*weight[5]-0.074535599249993*rho[3]*weight[5]+0.04303314829119353*rho[2]*weight[5]-0.04303314829119353*rho[1]*weight[5]+0.074535599249993*rho[0]*weight[5]-0.074535599249993*weight[3]*rho[5]+0.04303314829119353*weight[2]*rho[5]-0.04303314829119353*weight[1]*rho[5]+0.074535599249993*weight[0]*rho[5]-0.03571428571428571*rho[4]*weight[4]-0.074535599249993*rho[3]*weight[4]+0.04303314829119353*rho[2]*weight[4]-0.04303314829119353*rho[1]*weight[4]+0.074535599249993*rho[0]*weight[4]-0.074535599249993*weight[3]*rho[4]+0.04303314829119353*weight[2]*rho[4]-0.04303314829119353*weight[1]*rho[4]+0.074535599249993*weight[0]*rho[4]+0.05*rho[3]*weight[3]-0.08660254037844384*rho[2]*weight[3]+0.08660254037844384*rho[1]*weight[3]-0.08333333333333333*rho[0]*weight[3]-0.08660254037844384*weight[2]*rho[3]+0.08660254037844384*weight[1]*rho[3]-0.08333333333333333*weight[0]*rho[3]-0.016666666666666666*rho[2]*weight[2]-0.08333333333333333*rho[1]*weight[2]+0.04811252243246881*rho[0]*weight[2]-0.08333333333333333*weight[1]*rho[2]+0.04811252243246881*weight[0]*rho[2]-0.016666666666666666*rho[1]*weight[1]-0.04811252243246881*rho[0]*weight[1]-0.04811252243246881*weight[0]*rho[1]-0.08333333333333333*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[5]] += 0.030952380952380953*rho[7]*weight[7]-0.06666666666666667*rho[6]*weight[7]-0.07560539239387958*rho[5]*weight[7]-0.03849001794597506*rho[4]*weight[7]+0.07745966692414834*rho[3]*weight[7]-0.07453559924999299*rho[2]*weight[7]+0.07453559924999299*rho[1]*weight[7]-0.04303314829119352*rho[0]*weight[7]-0.06666666666666667*weight[6]*rho[7]-0.07560539239387958*weight[5]*rho[7]-0.03849001794597506*weight[4]*rho[7]+0.07745966692414834*weight[3]*rho[7]-0.07453559924999299*weight[2]*rho[7]+0.07453559924999299*weight[1]*rho[7]-0.04303314829119352*weight[0]*rho[7]+0.030952380952380953*rho[6]*weight[6]+0.03849001794597506*rho[5]*weight[6]+0.07560539239387958*rho[4]*weight[6]-0.07745966692414834*rho[3]*weight[6]+0.07453559924999299*rho[2]*weight[6]-0.07453559924999299*rho[1]*weight[6]+0.04303314829119352*rho[0]*weight[6]+0.03849001794597506*weight[5]*rho[6]+0.07560539239387958*weight[4]*rho[6]-0.07745966692414834*weight[3]*rho[6]+0.07453559924999299*weight[2]*rho[6]-0.07453559924999299*weight[1]*rho[6]+0.04303314829119352*weight[0]*rho[6]-0.03571428571428571*rho[5]*weight[5]-0.074535599249993*rho[3]*weight[5]+0.04303314829119353*rho[2]*weight[5]-0.04303314829119353*rho[1]*weight[5]+0.074535599249993*rho[0]*weight[5]-0.074535599249993*weight[3]*rho[5]+0.04303314829119353*weight[2]*rho[5]-0.04303314829119353*weight[1]*rho[5]+0.074535599249993*weight[0]*rho[5]-0.03571428571428571*rho[4]*weight[4]-0.074535599249993*rho[3]*weight[4]+0.04303314829119353*rho[2]*weight[4]-0.04303314829119353*rho[1]*weight[4]+0.074535599249993*rho[0]*weight[4]-0.074535599249993*weight[3]*rho[4]+0.04303314829119353*weight[2]*rho[4]-0.04303314829119353*weight[1]*rho[4]+0.074535599249993*weight[0]*rho[4]+0.05*rho[3]*weight[3]-0.08660254037844384*rho[2]*weight[3]+0.08660254037844384*rho[1]*weight[3]-0.08333333333333333*rho[0]*weight[3]-0.08660254037844384*weight[2]*rho[3]+0.08660254037844384*weight[1]*rho[3]-0.08333333333333333*weight[0]*rho[3]-0.016666666666666666*rho[2]*weight[2]-0.08333333333333333*rho[1]*weight[2]+0.04811252243246881*rho[0]*weight[2]-0.08333333333333333*weight[1]*rho[2]+0.04811252243246881*weight[0]*rho[2]-0.016666666666666666*rho[1]*weight[1]-0.04811252243246881*rho[0]*weight[1]-0.04811252243246881*weight[0]*rho[1]-0.08333333333333333*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[6]],0.2*rho[7]*weight[7]+0.10327955589886445*rho[3]*weight[7]+0.10327955589886445*weight[3]*rho[7]+0.23809523809523808*rho[6]*weight[6]-0.07698003589195011*rho[5]*weight[6]+0.1374643498070538*rho[4]*weight[6]-0.14907119849998599*rho[2]*weight[6]-0.08606629658238704*rho[0]*weight[6]-0.07698003589195011*weight[5]*rho[6]+0.1374643498070538*weight[4]*rho[6]-0.14907119849998599*weight[2]*rho[6]-0.08606629658238704*weight[0]*rho[6]+0.3333333333333333*rho[5]*weight[5]+0.1721325931647741*rho[2]*weight[5]+0.1721325931647741*weight[2]*rho[5]+0.23809523809523808*rho[4]*weight[4]-0.08606629658238706*rho[2]*weight[4]-0.149071198499986*rho[0]*weight[4]-0.08606629658238706*weight[2]*rho[4]-0.149071198499986*weight[0]*rho[4]+0.2*rho[3]*weight[3]+0.11547005383792514*rho[1]*weight[3]+0.11547005383792514*weight[1]*rho[3]+0.3333333333333333*rho[2]*weight[2]+0.19245008972987523*rho[0]*weight[2]+0.19245008972987523*weight[0]*rho[2]+0.2*rho[1]*weight[1]+0.3333333333333333*rho[0]*weight[0]); #else - bsrc[nodeOff+globalIdxs[0]] = 0.7071067811865476*phiBC[0]-1.2247448713915892*phiBC[1]; + bsrc[nodeOff+globalIdxs[6]] += 0.2*rho[7]*weight[7]+0.10327955589886445*rho[3]*weight[7]+0.10327955589886445*weight[3]*rho[7]+0.23809523809523808*rho[6]*weight[6]-0.07698003589195011*rho[5]*weight[6]+0.1374643498070538*rho[4]*weight[6]-0.14907119849998599*rho[2]*weight[6]-0.08606629658238704*rho[0]*weight[6]-0.07698003589195011*weight[5]*rho[6]+0.1374643498070538*weight[4]*rho[6]-0.14907119849998599*weight[2]*rho[6]-0.08606629658238704*weight[0]*rho[6]+0.3333333333333333*rho[5]*weight[5]+0.1721325931647741*rho[2]*weight[5]+0.1721325931647741*weight[2]*rho[5]+0.23809523809523808*rho[4]*weight[4]-0.08606629658238706*rho[2]*weight[4]-0.149071198499986*rho[0]*weight[4]-0.08606629658238706*weight[2]*rho[4]-0.149071198499986*weight[0]*rho[4]+0.2*rho[3]*weight[3]+0.11547005383792514*rho[1]*weight[3]+0.11547005383792514*weight[1]*rho[3]+0.3333333333333333*rho[2]*weight[2]+0.19245008972987523*rho[0]*weight[2]+0.19245008972987523*weight[0]*rho[2]+0.2*rho[1]*weight[1]+0.3333333333333333*rho[0]*weight[0]; #endif #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[1]],0.5*rho[1]*weight[1]+0.28867513459481287*rho[0]*weight[1]+0.28867513459481287*weight[0]*rho[1]+0.5*rho[0]*weight[0]); + atomicAdd(&bsrc[nodeOff+globalIdxs[7]],0.030952380952380953*rho[7]*weight[7]+0.06666666666666667*rho[6]*weight[7]+0.07560539239387958*rho[5]*weight[7]+0.03849001794597506*rho[4]*weight[7]+0.07745966692414834*rho[3]*weight[7]+0.07453559924999299*rho[2]*weight[7]+0.07453559924999299*rho[1]*weight[7]+0.04303314829119352*rho[0]*weight[7]+0.06666666666666667*weight[6]*rho[7]+0.07560539239387958*weight[5]*rho[7]+0.03849001794597506*weight[4]*rho[7]+0.07745966692414834*weight[3]*rho[7]+0.07453559924999299*weight[2]*rho[7]+0.07453559924999299*weight[1]*rho[7]+0.04303314829119352*weight[0]*rho[7]+0.030952380952380953*rho[6]*weight[6]+0.03849001794597506*rho[5]*weight[6]+0.07560539239387958*rho[4]*weight[6]+0.07745966692414834*rho[3]*weight[6]+0.07453559924999299*rho[2]*weight[6]+0.07453559924999299*rho[1]*weight[6]+0.04303314829119352*rho[0]*weight[6]+0.03849001794597506*weight[5]*rho[6]+0.07560539239387958*weight[4]*rho[6]+0.07745966692414834*weight[3]*rho[6]+0.07453559924999299*weight[2]*rho[6]+0.07453559924999299*weight[1]*rho[6]+0.04303314829119352*weight[0]*rho[6]-0.03571428571428571*rho[5]*weight[5]+0.074535599249993*rho[3]*weight[5]+0.04303314829119353*rho[2]*weight[5]+0.04303314829119353*rho[1]*weight[5]+0.074535599249993*rho[0]*weight[5]+0.074535599249993*weight[3]*rho[5]+0.04303314829119353*weight[2]*rho[5]+0.04303314829119353*weight[1]*rho[5]+0.074535599249993*weight[0]*rho[5]-0.03571428571428571*rho[4]*weight[4]+0.074535599249993*rho[3]*weight[4]+0.04303314829119353*rho[2]*weight[4]+0.04303314829119353*rho[1]*weight[4]+0.074535599249993*rho[0]*weight[4]+0.074535599249993*weight[3]*rho[4]+0.04303314829119353*weight[2]*rho[4]+0.04303314829119353*weight[1]*rho[4]+0.074535599249993*weight[0]*rho[4]+0.05*rho[3]*weight[3]+0.08660254037844384*rho[2]*weight[3]+0.08660254037844384*rho[1]*weight[3]+0.08333333333333333*rho[0]*weight[3]+0.08660254037844384*weight[2]*rho[3]+0.08660254037844384*weight[1]*rho[3]+0.08333333333333333*weight[0]*rho[3]-0.016666666666666666*rho[2]*weight[2]+0.08333333333333333*rho[1]*weight[2]+0.04811252243246881*rho[0]*weight[2]+0.08333333333333333*weight[1]*rho[2]+0.04811252243246881*weight[0]*rho[2]-0.016666666666666666*rho[1]*weight[1]+0.04811252243246881*rho[0]*weight[1]+0.04811252243246881*weight[0]*rho[1]-0.08333333333333333*rho[0]*weight[0]); #else - bsrc[nodeOff+globalIdxs[1]] += 0.5*rho[1]*weight[1]+0.28867513459481287*rho[0]*weight[1]+0.28867513459481287*weight[0]*rho[1]+0.5*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[7]] += 0.030952380952380953*rho[7]*weight[7]+0.06666666666666667*rho[6]*weight[7]+0.07560539239387958*rho[5]*weight[7]+0.03849001794597506*rho[4]*weight[7]+0.07745966692414834*rho[3]*weight[7]+0.07453559924999299*rho[2]*weight[7]+0.07453559924999299*rho[1]*weight[7]+0.04303314829119352*rho[0]*weight[7]+0.06666666666666667*weight[6]*rho[7]+0.07560539239387958*weight[5]*rho[7]+0.03849001794597506*weight[4]*rho[7]+0.07745966692414834*weight[3]*rho[7]+0.07453559924999299*weight[2]*rho[7]+0.07453559924999299*weight[1]*rho[7]+0.04303314829119352*weight[0]*rho[7]+0.030952380952380953*rho[6]*weight[6]+0.03849001794597506*rho[5]*weight[6]+0.07560539239387958*rho[4]*weight[6]+0.07745966692414834*rho[3]*weight[6]+0.07453559924999299*rho[2]*weight[6]+0.07453559924999299*rho[1]*weight[6]+0.04303314829119352*rho[0]*weight[6]+0.03849001794597506*weight[5]*rho[6]+0.07560539239387958*weight[4]*rho[6]+0.07745966692414834*weight[3]*rho[6]+0.07453559924999299*weight[2]*rho[6]+0.07453559924999299*weight[1]*rho[6]+0.04303314829119352*weight[0]*rho[6]-0.03571428571428571*rho[5]*weight[5]+0.074535599249993*rho[3]*weight[5]+0.04303314829119353*rho[2]*weight[5]+0.04303314829119353*rho[1]*weight[5]+0.074535599249993*rho[0]*weight[5]+0.074535599249993*weight[3]*rho[5]+0.04303314829119353*weight[2]*rho[5]+0.04303314829119353*weight[1]*rho[5]+0.074535599249993*weight[0]*rho[5]-0.03571428571428571*rho[4]*weight[4]+0.074535599249993*rho[3]*weight[4]+0.04303314829119353*rho[2]*weight[4]+0.04303314829119353*rho[1]*weight[4]+0.074535599249993*rho[0]*weight[4]+0.074535599249993*weight[3]*rho[4]+0.04303314829119353*weight[2]*rho[4]+0.04303314829119353*weight[1]*rho[4]+0.074535599249993*weight[0]*rho[4]+0.05*rho[3]*weight[3]+0.08660254037844384*rho[2]*weight[3]+0.08660254037844384*rho[1]*weight[3]+0.08333333333333333*rho[0]*weight[3]+0.08660254037844384*weight[2]*rho[3]+0.08660254037844384*weight[1]*rho[3]+0.08333333333333333*weight[0]*rho[3]-0.016666666666666666*rho[2]*weight[2]+0.08333333333333333*rho[1]*weight[2]+0.04811252243246881*rho[0]*weight[2]+0.08333333333333333*weight[1]*rho[2]+0.04811252243246881*weight[0]*rho[2]-0.016666666666666666*rho[1]*weight[1]+0.04811252243246881*rho[0]*weight[1]+0.04811252243246881*weight[0]*rho[1]-0.08333333333333333*rho[0]*weight[0]; #endif } -GKYL_CU_DH void fem_parproj_src_stencil_weighted_1x_ser_p2_lox_dirichletx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +GKYL_CU_DH void fem_parproj_src_stencil_weighted_2x_ser_p1_loy_dirichlet_ghosty(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) { // rho: right side source. // weight: Weight in the projection operation. - // phiBC: Dirichlet boundary potential, given as a DG expansion in the ghost cell (volume). + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. // nodeOff: node offset (prob idx * global number of nodes). // globalIdxs: global linear index of each basis function/node in current cell. // bsrc: global right side source vector. #ifdef __CUDA_ARCH__ - atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[0]],__double_as_longlong(1.5811388300841895*phiBC[2]-1.224744871391589*phiBC[1]+0.7071067811865475*phiBC[0])); - #else - bsrc[nodeOff+globalIdxs[0]] = 1.5811388300841895*phiBC[2]-1.224744871391589*phiBC[1]+0.7071067811865475*phiBC[0]; - #endif - #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[1]],0.4761904761904762*rho[2]*weight[2]-0.298142396999972*rho[0]*weight[2]-0.298142396999972*weight[0]*rho[2]+0.4*rho[1]*weight[1]+0.6666666666666667*rho[0]*weight[0]); + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[0]],__double_as_longlong(-(1.5*phiBC[3])+0.8660254037844386*phiBC[2]-0.8660254037844386*phiBC[1]+0.5*phiBC[0])); #else - bsrc[nodeOff+globalIdxs[1]] += 0.4761904761904762*rho[2]*weight[2]-0.298142396999972*rho[0]*weight[2]-0.298142396999972*weight[0]*rho[2]+0.4*rho[1]*weight[1]+0.6666666666666667*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[0]] = -(1.5*phiBC[3])+0.8660254037844386*phiBC[2]-0.8660254037844386*phiBC[1]+0.5*phiBC[0]; #endif #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[2]],0.2619047619047619*rho[2]*weight[2]+0.25819888974716115*rho[1]*weight[2]+0.149071198499986*rho[0]*weight[2]+0.25819888974716115*weight[1]*rho[2]+0.149071198499986*weight[0]*rho[2]+0.30000000000000004*rho[1]*weight[1]+0.2886751345948129*rho[0]*weight[1]+0.2886751345948129*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]); + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[1]],__double_as_longlong(1.5*phiBC[3]+0.8660254037844386*phiBC[2]+0.8660254037844386*phiBC[1]+0.5*phiBC[0])); #else - bsrc[nodeOff+globalIdxs[2]] += 0.2619047619047619*rho[2]*weight[2]+0.25819888974716115*rho[1]*weight[2]+0.149071198499986*rho[0]*weight[2]+0.25819888974716115*weight[1]*rho[2]+0.149071198499986*weight[0]*rho[2]+0.30000000000000004*rho[1]*weight[1]+0.2886751345948129*rho[0]*weight[1]+0.2886751345948129*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[1]] = 1.5*phiBC[3]+0.8660254037844386*phiBC[2]+0.8660254037844386*phiBC[1]+0.5*phiBC[0]; #endif - -} - -GKYL_CU_DH void fem_parproj_src_stencil_weighted_1x_ser_p1_upx_nondirichletx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) -{ - // rho: right side source. - // weight: Weight in the projection operation. - // phiBC: Dirichlet boundary potential, given as a DG expansion in the ghost cell (volume). - // nodeOff: node offset (prob idx * global number of nodes). - // globalIdxs: global linear index of each basis function/node in current cell. - // bsrc: global right side source vector. - #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[0]],0.5*rho[1]*weight[1]-0.28867513459481287*rho[0]*weight[1]-0.28867513459481287*weight[0]*rho[1]+0.5*rho[0]*weight[0]); + atomicAdd(&bsrc[nodeOff+globalIdxs[2]],0.25*rho[3]*weight[3]-0.14433756729740643*rho[2]*weight[3]+0.14433756729740643*rho[1]*weight[3]-0.08333333333333333*rho[0]*weight[3]-0.14433756729740643*weight[2]*rho[3]+0.14433756729740643*weight[1]*rho[3]-0.08333333333333333*weight[0]*rho[3]+0.25*rho[2]*weight[2]-0.08333333333333333*rho[1]*weight[2]+0.14433756729740643*rho[0]*weight[2]-0.08333333333333333*weight[1]*rho[2]+0.14433756729740643*weight[0]*rho[2]+0.25*rho[1]*weight[1]-0.14433756729740643*rho[0]*weight[1]-0.14433756729740643*weight[0]*rho[1]+0.25*rho[0]*weight[0]); #else - bsrc[nodeOff+globalIdxs[0]] += 0.5*rho[1]*weight[1]-0.28867513459481287*rho[0]*weight[1]-0.28867513459481287*weight[0]*rho[1]+0.5*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[2]] += 0.25*rho[3]*weight[3]-0.14433756729740643*rho[2]*weight[3]+0.14433756729740643*rho[1]*weight[3]-0.08333333333333333*rho[0]*weight[3]-0.14433756729740643*weight[2]*rho[3]+0.14433756729740643*weight[1]*rho[3]-0.08333333333333333*weight[0]*rho[3]+0.25*rho[2]*weight[2]-0.08333333333333333*rho[1]*weight[2]+0.14433756729740643*rho[0]*weight[2]-0.08333333333333333*weight[1]*rho[2]+0.14433756729740643*weight[0]*rho[2]+0.25*rho[1]*weight[1]-0.14433756729740643*rho[0]*weight[1]-0.14433756729740643*weight[0]*rho[1]+0.25*rho[0]*weight[0]; #endif #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[1]],0.5*rho[1]*weight[1]+0.28867513459481287*rho[0]*weight[1]+0.28867513459481287*weight[0]*rho[1]+0.5*rho[0]*weight[0]); + atomicAdd(&bsrc[nodeOff+globalIdxs[3]],0.25*rho[3]*weight[3]+0.14433756729740643*rho[2]*weight[3]+0.14433756729740643*rho[1]*weight[3]+0.08333333333333333*rho[0]*weight[3]+0.14433756729740643*weight[2]*rho[3]+0.14433756729740643*weight[1]*rho[3]+0.08333333333333333*weight[0]*rho[3]+0.25*rho[2]*weight[2]+0.08333333333333333*rho[1]*weight[2]+0.14433756729740643*rho[0]*weight[2]+0.08333333333333333*weight[1]*rho[2]+0.14433756729740643*weight[0]*rho[2]+0.25*rho[1]*weight[1]+0.14433756729740643*rho[0]*weight[1]+0.14433756729740643*weight[0]*rho[1]+0.25*rho[0]*weight[0]); #else - bsrc[nodeOff+globalIdxs[1]] += 0.5*rho[1]*weight[1]+0.28867513459481287*rho[0]*weight[1]+0.28867513459481287*weight[0]*rho[1]+0.5*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[3]] += 0.25*rho[3]*weight[3]+0.14433756729740643*rho[2]*weight[3]+0.14433756729740643*rho[1]*weight[3]+0.08333333333333333*rho[0]*weight[3]+0.14433756729740643*weight[2]*rho[3]+0.14433756729740643*weight[1]*rho[3]+0.08333333333333333*weight[0]*rho[3]+0.25*rho[2]*weight[2]+0.08333333333333333*rho[1]*weight[2]+0.14433756729740643*rho[0]*weight[2]+0.08333333333333333*weight[1]*rho[2]+0.14433756729740643*weight[0]*rho[2]+0.25*rho[1]*weight[1]+0.14433756729740643*rho[0]*weight[1]+0.14433756729740643*weight[0]*rho[1]+0.25*rho[0]*weight[0]; #endif } -GKYL_CU_DH void fem_parproj_src_stencil_weighted_1x_ser_p2_upx_nondirichletx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +GKYL_CU_DH void fem_parproj_src_stencil_weighted_2x_ser_p2_loy_dirichlet_ghosty(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) { // rho: right side source. // weight: Weight in the projection operation. - // phiBC: Dirichlet boundary potential, given as a DG expansion in the ghost cell (volume). + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. // nodeOff: node offset (prob idx * global number of nodes). // globalIdxs: global linear index of each basis function/node in current cell. // bsrc: global right side source vector. #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[0]],0.2619047619047619*rho[2]*weight[2]-0.25819888974716115*rho[1]*weight[2]+0.149071198499986*rho[0]*weight[2]-0.25819888974716115*weight[1]*rho[2]+0.149071198499986*weight[0]*rho[2]+0.30000000000000004*rho[1]*weight[1]-0.2886751345948129*rho[0]*weight[1]-0.2886751345948129*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]); + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[0]],__double_as_longlong(-(1.9364916731037085*phiBC[7])+1.9364916731037085*phiBC[6]+1.118033988749895*phiBC[5]+1.118033988749895*phiBC[4]-1.5*phiBC[3]+0.8660254037844386*phiBC[2]-0.8660254037844386*phiBC[1]+0.5*phiBC[0])); #else - bsrc[nodeOff+globalIdxs[0]] += 0.2619047619047619*rho[2]*weight[2]-0.25819888974716115*rho[1]*weight[2]+0.149071198499986*rho[0]*weight[2]-0.25819888974716115*weight[1]*rho[2]+0.149071198499986*weight[0]*rho[2]+0.30000000000000004*rho[1]*weight[1]-0.2886751345948129*rho[0]*weight[1]-0.2886751345948129*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[0]] = -(1.9364916731037085*phiBC[7])+1.9364916731037085*phiBC[6]+1.118033988749895*phiBC[5]+1.118033988749895*phiBC[4]-1.5*phiBC[3]+0.8660254037844386*phiBC[2]-0.8660254037844386*phiBC[1]+0.5*phiBC[0]; #endif #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[1]],0.4761904761904762*rho[2]*weight[2]-0.298142396999972*rho[0]*weight[2]-0.298142396999972*weight[0]*rho[2]+0.4*rho[1]*weight[1]+0.6666666666666667*rho[0]*weight[0]); + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[1]],__double_as_longlong(-(0.9682458365518543*phiBC[6])+1.118033988749895*phiBC[5]-0.5590169943749475*phiBC[4]+0.8660254037844386*phiBC[2]+0.5*phiBC[0])); #else - bsrc[nodeOff+globalIdxs[1]] += 0.4761904761904762*rho[2]*weight[2]-0.298142396999972*rho[0]*weight[2]-0.298142396999972*weight[0]*rho[2]+0.4*rho[1]*weight[1]+0.6666666666666667*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[1]] = -(0.9682458365518543*phiBC[6])+1.118033988749895*phiBC[5]-0.5590169943749475*phiBC[4]+0.8660254037844386*phiBC[2]+0.5*phiBC[0]; #endif #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[2]],0.2619047619047619*rho[2]*weight[2]+0.25819888974716115*rho[1]*weight[2]+0.149071198499986*rho[0]*weight[2]+0.25819888974716115*weight[1]*rho[2]+0.149071198499986*weight[0]*rho[2]+0.30000000000000004*rho[1]*weight[1]+0.2886751345948129*rho[0]*weight[1]+0.2886751345948129*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]); + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[2]],__double_as_longlong(1.9364916731037085*phiBC[7]+1.9364916731037085*phiBC[6]+1.118033988749895*phiBC[5]+1.118033988749895*phiBC[4]+1.5*phiBC[3]+0.8660254037844386*phiBC[2]+0.8660254037844386*phiBC[1]+0.5*phiBC[0])); #else - bsrc[nodeOff+globalIdxs[2]] += 0.2619047619047619*rho[2]*weight[2]+0.25819888974716115*rho[1]*weight[2]+0.149071198499986*rho[0]*weight[2]+0.25819888974716115*weight[1]*rho[2]+0.149071198499986*weight[0]*rho[2]+0.30000000000000004*rho[1]*weight[1]+0.2886751345948129*rho[0]*weight[1]+0.2886751345948129*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[2]] = 1.9364916731037085*phiBC[7]+1.9364916731037085*phiBC[6]+1.118033988749895*phiBC[5]+1.118033988749895*phiBC[4]+1.5*phiBC[3]+0.8660254037844386*phiBC[2]+0.8660254037844386*phiBC[1]+0.5*phiBC[0]; #endif - -} - -GKYL_CU_DH void fem_parproj_src_stencil_weighted_1x_ser_p1_upx_dirichletx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) -{ - // rho: right side source. - // weight: Weight in the projection operation. - // phiBC: Dirichlet boundary potential, given as a DG expansion in the ghost cell (volume). - // nodeOff: node offset (prob idx * global number of nodes). - // globalIdxs: global linear index of each basis function/node in current cell. - // bsrc: global right side source vector. - #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[0]],0.5*rho[1]*weight[1]-0.28867513459481287*rho[0]*weight[1]-0.28867513459481287*weight[0]*rho[1]+0.5*rho[0]*weight[0]); + atomicAdd(&bsrc[nodeOff+globalIdxs[3]],0.23809523809523808*rho[7]*weight[7]-0.1374643498070538*rho[5]*weight[7]+0.07698003589195011*rho[4]*weight[7]-0.14907119849998599*rho[1]*weight[7]+0.08606629658238704*rho[0]*weight[7]-0.1374643498070538*weight[5]*rho[7]+0.07698003589195011*weight[4]*rho[7]-0.14907119849998599*weight[1]*rho[7]+0.08606629658238704*weight[0]*rho[7]+0.2*rho[6]*weight[6]-0.10327955589886445*rho[3]*weight[6]-0.10327955589886445*weight[3]*rho[6]+0.23809523809523808*rho[5]*weight[5]+0.08606629658238706*rho[1]*weight[5]-0.149071198499986*rho[0]*weight[5]+0.08606629658238706*weight[1]*rho[5]-0.149071198499986*weight[0]*rho[5]+0.3333333333333333*rho[4]*weight[4]-0.1721325931647741*rho[1]*weight[4]-0.1721325931647741*weight[1]*rho[4]+0.2*rho[3]*weight[3]-0.11547005383792514*rho[2]*weight[3]-0.11547005383792514*weight[2]*rho[3]+0.2*rho[2]*weight[2]+0.3333333333333333*rho[1]*weight[1]-0.19245008972987523*rho[0]*weight[1]-0.19245008972987523*weight[0]*rho[1]+0.3333333333333333*rho[0]*weight[0]); #else - bsrc[nodeOff+globalIdxs[0]] += 0.5*rho[1]*weight[1]-0.28867513459481287*rho[0]*weight[1]-0.28867513459481287*weight[0]*rho[1]+0.5*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[3]] += 0.23809523809523808*rho[7]*weight[7]-0.1374643498070538*rho[5]*weight[7]+0.07698003589195011*rho[4]*weight[7]-0.14907119849998599*rho[1]*weight[7]+0.08606629658238704*rho[0]*weight[7]-0.1374643498070538*weight[5]*rho[7]+0.07698003589195011*weight[4]*rho[7]-0.14907119849998599*weight[1]*rho[7]+0.08606629658238704*weight[0]*rho[7]+0.2*rho[6]*weight[6]-0.10327955589886445*rho[3]*weight[6]-0.10327955589886445*weight[3]*rho[6]+0.23809523809523808*rho[5]*weight[5]+0.08606629658238706*rho[1]*weight[5]-0.149071198499986*rho[0]*weight[5]+0.08606629658238706*weight[1]*rho[5]-0.149071198499986*weight[0]*rho[5]+0.3333333333333333*rho[4]*weight[4]-0.1721325931647741*rho[1]*weight[4]-0.1721325931647741*weight[1]*rho[4]+0.2*rho[3]*weight[3]-0.11547005383792514*rho[2]*weight[3]-0.11547005383792514*weight[2]*rho[3]+0.2*rho[2]*weight[2]+0.3333333333333333*rho[1]*weight[1]-0.19245008972987523*rho[0]*weight[1]-0.19245008972987523*weight[0]*rho[1]+0.3333333333333333*rho[0]*weight[0]; #endif #ifdef __CUDA_ARCH__ - atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[1]],__double_as_longlong(1.2247448713915892*phiBC[1]+0.7071067811865476*phiBC[0])); + atomicAdd(&bsrc[nodeOff+globalIdxs[4]],0.23809523809523808*rho[7]*weight[7]+0.1374643498070538*rho[5]*weight[7]-0.07698003589195011*rho[4]*weight[7]-0.14907119849998599*rho[1]*weight[7]-0.08606629658238704*rho[0]*weight[7]+0.1374643498070538*weight[5]*rho[7]-0.07698003589195011*weight[4]*rho[7]-0.14907119849998599*weight[1]*rho[7]-0.08606629658238704*weight[0]*rho[7]+0.2*rho[6]*weight[6]+0.10327955589886445*rho[3]*weight[6]+0.10327955589886445*weight[3]*rho[6]+0.23809523809523808*rho[5]*weight[5]-0.08606629658238706*rho[1]*weight[5]-0.149071198499986*rho[0]*weight[5]-0.08606629658238706*weight[1]*rho[5]-0.149071198499986*weight[0]*rho[5]+0.3333333333333333*rho[4]*weight[4]+0.1721325931647741*rho[1]*weight[4]+0.1721325931647741*weight[1]*rho[4]+0.2*rho[3]*weight[3]+0.11547005383792514*rho[2]*weight[3]+0.11547005383792514*weight[2]*rho[3]+0.2*rho[2]*weight[2]+0.3333333333333333*rho[1]*weight[1]+0.19245008972987523*rho[0]*weight[1]+0.19245008972987523*weight[0]*rho[1]+0.3333333333333333*rho[0]*weight[0]); #else - bsrc[nodeOff+globalIdxs[1]] = 1.2247448713915892*phiBC[1]+0.7071067811865476*phiBC[0]; + bsrc[nodeOff+globalIdxs[4]] += 0.23809523809523808*rho[7]*weight[7]+0.1374643498070538*rho[5]*weight[7]-0.07698003589195011*rho[4]*weight[7]-0.14907119849998599*rho[1]*weight[7]-0.08606629658238704*rho[0]*weight[7]+0.1374643498070538*weight[5]*rho[7]-0.07698003589195011*weight[4]*rho[7]-0.14907119849998599*weight[1]*rho[7]-0.08606629658238704*weight[0]*rho[7]+0.2*rho[6]*weight[6]+0.10327955589886445*rho[3]*weight[6]+0.10327955589886445*weight[3]*rho[6]+0.23809523809523808*rho[5]*weight[5]-0.08606629658238706*rho[1]*weight[5]-0.149071198499986*rho[0]*weight[5]-0.08606629658238706*weight[1]*rho[5]-0.149071198499986*weight[0]*rho[5]+0.3333333333333333*rho[4]*weight[4]+0.1721325931647741*rho[1]*weight[4]+0.1721325931647741*weight[1]*rho[4]+0.2*rho[3]*weight[3]+0.11547005383792514*rho[2]*weight[3]+0.11547005383792514*weight[2]*rho[3]+0.2*rho[2]*weight[2]+0.3333333333333333*rho[1]*weight[1]+0.19245008972987523*rho[0]*weight[1]+0.19245008972987523*weight[0]*rho[1]+0.3333333333333333*rho[0]*weight[0]; #endif - -} - -GKYL_CU_DH void fem_parproj_src_stencil_weighted_1x_ser_p2_upx_dirichletx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) -{ - // rho: right side source. - // weight: Weight in the projection operation. - // phiBC: Dirichlet boundary potential, given as a DG expansion in the ghost cell (volume). - // nodeOff: node offset (prob idx * global number of nodes). - // globalIdxs: global linear index of each basis function/node in current cell. - // bsrc: global right side source vector. - #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[0]],0.2619047619047619*rho[2]*weight[2]-0.25819888974716115*rho[1]*weight[2]+0.149071198499986*rho[0]*weight[2]-0.25819888974716115*weight[1]*rho[2]+0.149071198499986*weight[0]*rho[2]+0.30000000000000004*rho[1]*weight[1]-0.2886751345948129*rho[0]*weight[1]-0.2886751345948129*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]); + atomicAdd(&bsrc[nodeOff+globalIdxs[5]],0.030952380952380953*rho[7]*weight[7]-0.06666666666666667*rho[6]*weight[7]-0.07560539239387958*rho[5]*weight[7]-0.03849001794597506*rho[4]*weight[7]+0.07745966692414834*rho[3]*weight[7]-0.07453559924999299*rho[2]*weight[7]+0.07453559924999299*rho[1]*weight[7]-0.04303314829119352*rho[0]*weight[7]-0.06666666666666667*weight[6]*rho[7]-0.07560539239387958*weight[5]*rho[7]-0.03849001794597506*weight[4]*rho[7]+0.07745966692414834*weight[3]*rho[7]-0.07453559924999299*weight[2]*rho[7]+0.07453559924999299*weight[1]*rho[7]-0.04303314829119352*weight[0]*rho[7]+0.030952380952380953*rho[6]*weight[6]+0.03849001794597506*rho[5]*weight[6]+0.07560539239387958*rho[4]*weight[6]-0.07745966692414834*rho[3]*weight[6]+0.07453559924999299*rho[2]*weight[6]-0.07453559924999299*rho[1]*weight[6]+0.04303314829119352*rho[0]*weight[6]+0.03849001794597506*weight[5]*rho[6]+0.07560539239387958*weight[4]*rho[6]-0.07745966692414834*weight[3]*rho[6]+0.07453559924999299*weight[2]*rho[6]-0.07453559924999299*weight[1]*rho[6]+0.04303314829119352*weight[0]*rho[6]-0.03571428571428571*rho[5]*weight[5]-0.074535599249993*rho[3]*weight[5]+0.04303314829119353*rho[2]*weight[5]-0.04303314829119353*rho[1]*weight[5]+0.074535599249993*rho[0]*weight[5]-0.074535599249993*weight[3]*rho[5]+0.04303314829119353*weight[2]*rho[5]-0.04303314829119353*weight[1]*rho[5]+0.074535599249993*weight[0]*rho[5]-0.03571428571428571*rho[4]*weight[4]-0.074535599249993*rho[3]*weight[4]+0.04303314829119353*rho[2]*weight[4]-0.04303314829119353*rho[1]*weight[4]+0.074535599249993*rho[0]*weight[4]-0.074535599249993*weight[3]*rho[4]+0.04303314829119353*weight[2]*rho[4]-0.04303314829119353*weight[1]*rho[4]+0.074535599249993*weight[0]*rho[4]+0.05*rho[3]*weight[3]-0.08660254037844384*rho[2]*weight[3]+0.08660254037844384*rho[1]*weight[3]-0.08333333333333333*rho[0]*weight[3]-0.08660254037844384*weight[2]*rho[3]+0.08660254037844384*weight[1]*rho[3]-0.08333333333333333*weight[0]*rho[3]-0.016666666666666666*rho[2]*weight[2]-0.08333333333333333*rho[1]*weight[2]+0.04811252243246881*rho[0]*weight[2]-0.08333333333333333*weight[1]*rho[2]+0.04811252243246881*weight[0]*rho[2]-0.016666666666666666*rho[1]*weight[1]-0.04811252243246881*rho[0]*weight[1]-0.04811252243246881*weight[0]*rho[1]-0.08333333333333333*rho[0]*weight[0]); #else - bsrc[nodeOff+globalIdxs[0]] += 0.2619047619047619*rho[2]*weight[2]-0.25819888974716115*rho[1]*weight[2]+0.149071198499986*rho[0]*weight[2]-0.25819888974716115*weight[1]*rho[2]+0.149071198499986*weight[0]*rho[2]+0.30000000000000004*rho[1]*weight[1]-0.2886751345948129*rho[0]*weight[1]-0.2886751345948129*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[5]] += 0.030952380952380953*rho[7]*weight[7]-0.06666666666666667*rho[6]*weight[7]-0.07560539239387958*rho[5]*weight[7]-0.03849001794597506*rho[4]*weight[7]+0.07745966692414834*rho[3]*weight[7]-0.07453559924999299*rho[2]*weight[7]+0.07453559924999299*rho[1]*weight[7]-0.04303314829119352*rho[0]*weight[7]-0.06666666666666667*weight[6]*rho[7]-0.07560539239387958*weight[5]*rho[7]-0.03849001794597506*weight[4]*rho[7]+0.07745966692414834*weight[3]*rho[7]-0.07453559924999299*weight[2]*rho[7]+0.07453559924999299*weight[1]*rho[7]-0.04303314829119352*weight[0]*rho[7]+0.030952380952380953*rho[6]*weight[6]+0.03849001794597506*rho[5]*weight[6]+0.07560539239387958*rho[4]*weight[6]-0.07745966692414834*rho[3]*weight[6]+0.07453559924999299*rho[2]*weight[6]-0.07453559924999299*rho[1]*weight[6]+0.04303314829119352*rho[0]*weight[6]+0.03849001794597506*weight[5]*rho[6]+0.07560539239387958*weight[4]*rho[6]-0.07745966692414834*weight[3]*rho[6]+0.07453559924999299*weight[2]*rho[6]-0.07453559924999299*weight[1]*rho[6]+0.04303314829119352*weight[0]*rho[6]-0.03571428571428571*rho[5]*weight[5]-0.074535599249993*rho[3]*weight[5]+0.04303314829119353*rho[2]*weight[5]-0.04303314829119353*rho[1]*weight[5]+0.074535599249993*rho[0]*weight[5]-0.074535599249993*weight[3]*rho[5]+0.04303314829119353*weight[2]*rho[5]-0.04303314829119353*weight[1]*rho[5]+0.074535599249993*weight[0]*rho[5]-0.03571428571428571*rho[4]*weight[4]-0.074535599249993*rho[3]*weight[4]+0.04303314829119353*rho[2]*weight[4]-0.04303314829119353*rho[1]*weight[4]+0.074535599249993*rho[0]*weight[4]-0.074535599249993*weight[3]*rho[4]+0.04303314829119353*weight[2]*rho[4]-0.04303314829119353*weight[1]*rho[4]+0.074535599249993*weight[0]*rho[4]+0.05*rho[3]*weight[3]-0.08660254037844384*rho[2]*weight[3]+0.08660254037844384*rho[1]*weight[3]-0.08333333333333333*rho[0]*weight[3]-0.08660254037844384*weight[2]*rho[3]+0.08660254037844384*weight[1]*rho[3]-0.08333333333333333*weight[0]*rho[3]-0.016666666666666666*rho[2]*weight[2]-0.08333333333333333*rho[1]*weight[2]+0.04811252243246881*rho[0]*weight[2]-0.08333333333333333*weight[1]*rho[2]+0.04811252243246881*weight[0]*rho[2]-0.016666666666666666*rho[1]*weight[1]-0.04811252243246881*rho[0]*weight[1]-0.04811252243246881*weight[0]*rho[1]-0.08333333333333333*rho[0]*weight[0]; #endif #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[1]],0.4761904761904762*rho[2]*weight[2]-0.298142396999972*rho[0]*weight[2]-0.298142396999972*weight[0]*rho[2]+0.4*rho[1]*weight[1]+0.6666666666666667*rho[0]*weight[0]); + atomicAdd(&bsrc[nodeOff+globalIdxs[6]],0.2*rho[7]*weight[7]+0.10327955589886445*rho[3]*weight[7]+0.10327955589886445*weight[3]*rho[7]+0.23809523809523808*rho[6]*weight[6]-0.07698003589195011*rho[5]*weight[6]+0.1374643498070538*rho[4]*weight[6]-0.14907119849998599*rho[2]*weight[6]-0.08606629658238704*rho[0]*weight[6]-0.07698003589195011*weight[5]*rho[6]+0.1374643498070538*weight[4]*rho[6]-0.14907119849998599*weight[2]*rho[6]-0.08606629658238704*weight[0]*rho[6]+0.3333333333333333*rho[5]*weight[5]+0.1721325931647741*rho[2]*weight[5]+0.1721325931647741*weight[2]*rho[5]+0.23809523809523808*rho[4]*weight[4]-0.08606629658238706*rho[2]*weight[4]-0.149071198499986*rho[0]*weight[4]-0.08606629658238706*weight[2]*rho[4]-0.149071198499986*weight[0]*rho[4]+0.2*rho[3]*weight[3]+0.11547005383792514*rho[1]*weight[3]+0.11547005383792514*weight[1]*rho[3]+0.3333333333333333*rho[2]*weight[2]+0.19245008972987523*rho[0]*weight[2]+0.19245008972987523*weight[0]*rho[2]+0.2*rho[1]*weight[1]+0.3333333333333333*rho[0]*weight[0]); #else - bsrc[nodeOff+globalIdxs[1]] += 0.4761904761904762*rho[2]*weight[2]-0.298142396999972*rho[0]*weight[2]-0.298142396999972*weight[0]*rho[2]+0.4*rho[1]*weight[1]+0.6666666666666667*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[6]] += 0.2*rho[7]*weight[7]+0.10327955589886445*rho[3]*weight[7]+0.10327955589886445*weight[3]*rho[7]+0.23809523809523808*rho[6]*weight[6]-0.07698003589195011*rho[5]*weight[6]+0.1374643498070538*rho[4]*weight[6]-0.14907119849998599*rho[2]*weight[6]-0.08606629658238704*rho[0]*weight[6]-0.07698003589195011*weight[5]*rho[6]+0.1374643498070538*weight[4]*rho[6]-0.14907119849998599*weight[2]*rho[6]-0.08606629658238704*weight[0]*rho[6]+0.3333333333333333*rho[5]*weight[5]+0.1721325931647741*rho[2]*weight[5]+0.1721325931647741*weight[2]*rho[5]+0.23809523809523808*rho[4]*weight[4]-0.08606629658238706*rho[2]*weight[4]-0.149071198499986*rho[0]*weight[4]-0.08606629658238706*weight[2]*rho[4]-0.149071198499986*weight[0]*rho[4]+0.2*rho[3]*weight[3]+0.11547005383792514*rho[1]*weight[3]+0.11547005383792514*weight[1]*rho[3]+0.3333333333333333*rho[2]*weight[2]+0.19245008972987523*rho[0]*weight[2]+0.19245008972987523*weight[0]*rho[2]+0.2*rho[1]*weight[1]+0.3333333333333333*rho[0]*weight[0]; #endif #ifdef __CUDA_ARCH__ - atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[2]],__double_as_longlong(1.5811388300841895*phiBC[2]+1.224744871391589*phiBC[1]+0.7071067811865475*phiBC[0])); + atomicAdd(&bsrc[nodeOff+globalIdxs[7]],0.030952380952380953*rho[7]*weight[7]+0.06666666666666667*rho[6]*weight[7]+0.07560539239387958*rho[5]*weight[7]+0.03849001794597506*rho[4]*weight[7]+0.07745966692414834*rho[3]*weight[7]+0.07453559924999299*rho[2]*weight[7]+0.07453559924999299*rho[1]*weight[7]+0.04303314829119352*rho[0]*weight[7]+0.06666666666666667*weight[6]*rho[7]+0.07560539239387958*weight[5]*rho[7]+0.03849001794597506*weight[4]*rho[7]+0.07745966692414834*weight[3]*rho[7]+0.07453559924999299*weight[2]*rho[7]+0.07453559924999299*weight[1]*rho[7]+0.04303314829119352*weight[0]*rho[7]+0.030952380952380953*rho[6]*weight[6]+0.03849001794597506*rho[5]*weight[6]+0.07560539239387958*rho[4]*weight[6]+0.07745966692414834*rho[3]*weight[6]+0.07453559924999299*rho[2]*weight[6]+0.07453559924999299*rho[1]*weight[6]+0.04303314829119352*rho[0]*weight[6]+0.03849001794597506*weight[5]*rho[6]+0.07560539239387958*weight[4]*rho[6]+0.07745966692414834*weight[3]*rho[6]+0.07453559924999299*weight[2]*rho[6]+0.07453559924999299*weight[1]*rho[6]+0.04303314829119352*weight[0]*rho[6]-0.03571428571428571*rho[5]*weight[5]+0.074535599249993*rho[3]*weight[5]+0.04303314829119353*rho[2]*weight[5]+0.04303314829119353*rho[1]*weight[5]+0.074535599249993*rho[0]*weight[5]+0.074535599249993*weight[3]*rho[5]+0.04303314829119353*weight[2]*rho[5]+0.04303314829119353*weight[1]*rho[5]+0.074535599249993*weight[0]*rho[5]-0.03571428571428571*rho[4]*weight[4]+0.074535599249993*rho[3]*weight[4]+0.04303314829119353*rho[2]*weight[4]+0.04303314829119353*rho[1]*weight[4]+0.074535599249993*rho[0]*weight[4]+0.074535599249993*weight[3]*rho[4]+0.04303314829119353*weight[2]*rho[4]+0.04303314829119353*weight[1]*rho[4]+0.074535599249993*weight[0]*rho[4]+0.05*rho[3]*weight[3]+0.08660254037844384*rho[2]*weight[3]+0.08660254037844384*rho[1]*weight[3]+0.08333333333333333*rho[0]*weight[3]+0.08660254037844384*weight[2]*rho[3]+0.08660254037844384*weight[1]*rho[3]+0.08333333333333333*weight[0]*rho[3]-0.016666666666666666*rho[2]*weight[2]+0.08333333333333333*rho[1]*weight[2]+0.04811252243246881*rho[0]*weight[2]+0.08333333333333333*weight[1]*rho[2]+0.04811252243246881*weight[0]*rho[2]-0.016666666666666666*rho[1]*weight[1]+0.04811252243246881*rho[0]*weight[1]+0.04811252243246881*weight[0]*rho[1]-0.08333333333333333*rho[0]*weight[0]); #else - bsrc[nodeOff+globalIdxs[2]] = 1.5811388300841895*phiBC[2]+1.224744871391589*phiBC[1]+0.7071067811865475*phiBC[0]; + bsrc[nodeOff+globalIdxs[7]] += 0.030952380952380953*rho[7]*weight[7]+0.06666666666666667*rho[6]*weight[7]+0.07560539239387958*rho[5]*weight[7]+0.03849001794597506*rho[4]*weight[7]+0.07745966692414834*rho[3]*weight[7]+0.07453559924999299*rho[2]*weight[7]+0.07453559924999299*rho[1]*weight[7]+0.04303314829119352*rho[0]*weight[7]+0.06666666666666667*weight[6]*rho[7]+0.07560539239387958*weight[5]*rho[7]+0.03849001794597506*weight[4]*rho[7]+0.07745966692414834*weight[3]*rho[7]+0.07453559924999299*weight[2]*rho[7]+0.07453559924999299*weight[1]*rho[7]+0.04303314829119352*weight[0]*rho[7]+0.030952380952380953*rho[6]*weight[6]+0.03849001794597506*rho[5]*weight[6]+0.07560539239387958*rho[4]*weight[6]+0.07745966692414834*rho[3]*weight[6]+0.07453559924999299*rho[2]*weight[6]+0.07453559924999299*rho[1]*weight[6]+0.04303314829119352*rho[0]*weight[6]+0.03849001794597506*weight[5]*rho[6]+0.07560539239387958*weight[4]*rho[6]+0.07745966692414834*weight[3]*rho[6]+0.07453559924999299*weight[2]*rho[6]+0.07453559924999299*weight[1]*rho[6]+0.04303314829119352*weight[0]*rho[6]-0.03571428571428571*rho[5]*weight[5]+0.074535599249993*rho[3]*weight[5]+0.04303314829119353*rho[2]*weight[5]+0.04303314829119353*rho[1]*weight[5]+0.074535599249993*rho[0]*weight[5]+0.074535599249993*weight[3]*rho[5]+0.04303314829119353*weight[2]*rho[5]+0.04303314829119353*weight[1]*rho[5]+0.074535599249993*weight[0]*rho[5]-0.03571428571428571*rho[4]*weight[4]+0.074535599249993*rho[3]*weight[4]+0.04303314829119353*rho[2]*weight[4]+0.04303314829119353*rho[1]*weight[4]+0.074535599249993*rho[0]*weight[4]+0.074535599249993*weight[3]*rho[4]+0.04303314829119353*weight[2]*rho[4]+0.04303314829119353*weight[1]*rho[4]+0.074535599249993*weight[0]*rho[4]+0.05*rho[3]*weight[3]+0.08660254037844384*rho[2]*weight[3]+0.08660254037844384*rho[1]*weight[3]+0.08333333333333333*rho[0]*weight[3]+0.08660254037844384*weight[2]*rho[3]+0.08660254037844384*weight[1]*rho[3]+0.08333333333333333*weight[0]*rho[3]-0.016666666666666666*rho[2]*weight[2]+0.08333333333333333*rho[1]*weight[2]+0.04811252243246881*rho[0]*weight[2]+0.08333333333333333*weight[1]*rho[2]+0.04811252243246881*weight[0]*rho[2]-0.016666666666666666*rho[1]*weight[1]+0.04811252243246881*rho[0]*weight[1]+0.04811252243246881*weight[0]*rho[1]-0.08333333333333333*rho[0]*weight[0]; #endif } -GKYL_CU_DH void fem_parproj_src_stencil_weighted_2x_ser_p1_iny_nondirichlety(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +GKYL_CU_DH void fem_parproj_src_stencil_weighted_2x_ser_p1_loy_dirichlet_skiny(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) { // rho: right side source. // weight: Weight in the projection operation. - // phiBC: Dirichlet boundary potential, given as a DG expansion in the ghost cell (volume). + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. // nodeOff: node offset (prob idx * global number of nodes). // globalIdxs: global linear index of each basis function/node in current cell. // bsrc: global right side source vector. #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[0]],0.25*rho[3]*weight[3]-0.14433756729740643*rho[2]*weight[3]-0.14433756729740643*rho[1]*weight[3]+0.08333333333333333*rho[0]*weight[3]-0.14433756729740643*weight[2]*rho[3]-0.14433756729740643*weight[1]*rho[3]+0.08333333333333333*weight[0]*rho[3]+0.25*rho[2]*weight[2]+0.08333333333333333*rho[1]*weight[2]-0.14433756729740643*rho[0]*weight[2]+0.08333333333333333*weight[1]*rho[2]-0.14433756729740643*weight[0]*rho[2]+0.25*rho[1]*weight[1]-0.14433756729740643*rho[0]*weight[1]-0.14433756729740643*weight[0]*rho[1]+0.25*rho[0]*weight[0]); + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[0]],__double_as_longlong(1.5*phiBC[3]-0.8660254037844386*phiBC[2]-0.8660254037844386*phiBC[1]+0.5*phiBC[0])); #else - bsrc[nodeOff+globalIdxs[0]] += 0.25*rho[3]*weight[3]-0.14433756729740643*rho[2]*weight[3]-0.14433756729740643*rho[1]*weight[3]+0.08333333333333333*rho[0]*weight[3]-0.14433756729740643*weight[2]*rho[3]-0.14433756729740643*weight[1]*rho[3]+0.08333333333333333*weight[0]*rho[3]+0.25*rho[2]*weight[2]+0.08333333333333333*rho[1]*weight[2]-0.14433756729740643*rho[0]*weight[2]+0.08333333333333333*weight[1]*rho[2]-0.14433756729740643*weight[0]*rho[2]+0.25*rho[1]*weight[1]-0.14433756729740643*rho[0]*weight[1]-0.14433756729740643*weight[0]*rho[1]+0.25*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[0]] = 1.5*phiBC[3]-0.8660254037844386*phiBC[2]-0.8660254037844386*phiBC[1]+0.5*phiBC[0]; #endif #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[1]],0.25*rho[3]*weight[3]+0.14433756729740643*rho[2]*weight[3]-0.14433756729740643*rho[1]*weight[3]-0.08333333333333333*rho[0]*weight[3]+0.14433756729740643*weight[2]*rho[3]-0.14433756729740643*weight[1]*rho[3]-0.08333333333333333*weight[0]*rho[3]+0.25*rho[2]*weight[2]-0.08333333333333333*rho[1]*weight[2]-0.14433756729740643*rho[0]*weight[2]-0.08333333333333333*weight[1]*rho[2]-0.14433756729740643*weight[0]*rho[2]+0.25*rho[1]*weight[1]+0.14433756729740643*rho[0]*weight[1]+0.14433756729740643*weight[0]*rho[1]+0.25*rho[0]*weight[0]); + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[1]],__double_as_longlong(-(1.5*phiBC[3])-0.8660254037844386*phiBC[2]+0.8660254037844386*phiBC[1]+0.5*phiBC[0])); #else - bsrc[nodeOff+globalIdxs[1]] += 0.25*rho[3]*weight[3]+0.14433756729740643*rho[2]*weight[3]-0.14433756729740643*rho[1]*weight[3]-0.08333333333333333*rho[0]*weight[3]+0.14433756729740643*weight[2]*rho[3]-0.14433756729740643*weight[1]*rho[3]-0.08333333333333333*weight[0]*rho[3]+0.25*rho[2]*weight[2]-0.08333333333333333*rho[1]*weight[2]-0.14433756729740643*rho[0]*weight[2]-0.08333333333333333*weight[1]*rho[2]-0.14433756729740643*weight[0]*rho[2]+0.25*rho[1]*weight[1]+0.14433756729740643*rho[0]*weight[1]+0.14433756729740643*weight[0]*rho[1]+0.25*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[1]] = -(1.5*phiBC[3])-0.8660254037844386*phiBC[2]+0.8660254037844386*phiBC[1]+0.5*phiBC[0]; #endif #ifdef __CUDA_ARCH__ atomicAdd(&bsrc[nodeOff+globalIdxs[2]],0.25*rho[3]*weight[3]-0.14433756729740643*rho[2]*weight[3]+0.14433756729740643*rho[1]*weight[3]-0.08333333333333333*rho[0]*weight[3]-0.14433756729740643*weight[2]*rho[3]+0.14433756729740643*weight[1]*rho[3]-0.08333333333333333*weight[0]*rho[3]+0.25*rho[2]*weight[2]-0.08333333333333333*rho[1]*weight[2]+0.14433756729740643*rho[0]*weight[2]-0.08333333333333333*weight[1]*rho[2]+0.14433756729740643*weight[0]*rho[2]+0.25*rho[1]*weight[1]-0.14433756729740643*rho[0]*weight[1]-0.14433756729740643*weight[0]*rho[1]+0.25*rho[0]*weight[0]); @@ -1762,29 +2706,29 @@ GKYL_CU_DH void fem_parproj_src_stencil_weighted_2x_ser_p1_iny_nondirichlety(con } -GKYL_CU_DH void fem_parproj_src_stencil_weighted_2x_ser_p2_iny_nondirichlety(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +GKYL_CU_DH void fem_parproj_src_stencil_weighted_2x_ser_p2_loy_dirichlet_skiny(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) { // rho: right side source. // weight: Weight in the projection operation. - // phiBC: Dirichlet boundary potential, given as a DG expansion in the ghost cell (volume). + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. // nodeOff: node offset (prob idx * global number of nodes). // globalIdxs: global linear index of each basis function/node in current cell. // bsrc: global right side source vector. #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[0]],0.030952380952380953*rho[7]*weight[7]+0.06666666666666667*rho[6]*weight[7]-0.07560539239387958*rho[5]*weight[7]-0.03849001794597506*rho[4]*weight[7]-0.07745966692414834*rho[3]*weight[7]+0.07453559924999299*rho[2]*weight[7]+0.07453559924999299*rho[1]*weight[7]-0.04303314829119352*rho[0]*weight[7]+0.06666666666666667*weight[6]*rho[7]-0.07560539239387958*weight[5]*rho[7]-0.03849001794597506*weight[4]*rho[7]-0.07745966692414834*weight[3]*rho[7]+0.07453559924999299*weight[2]*rho[7]+0.07453559924999299*weight[1]*rho[7]-0.04303314829119352*weight[0]*rho[7]+0.030952380952380953*rho[6]*weight[6]-0.03849001794597506*rho[5]*weight[6]-0.07560539239387958*rho[4]*weight[6]-0.07745966692414834*rho[3]*weight[6]+0.07453559924999299*rho[2]*weight[6]+0.07453559924999299*rho[1]*weight[6]-0.04303314829119352*rho[0]*weight[6]-0.03849001794597506*weight[5]*rho[6]-0.07560539239387958*weight[4]*rho[6]-0.07745966692414834*weight[3]*rho[6]+0.07453559924999299*weight[2]*rho[6]+0.07453559924999299*weight[1]*rho[6]-0.04303314829119352*weight[0]*rho[6]-0.03571428571428571*rho[5]*weight[5]+0.074535599249993*rho[3]*weight[5]-0.04303314829119353*rho[2]*weight[5]-0.04303314829119353*rho[1]*weight[5]+0.074535599249993*rho[0]*weight[5]+0.074535599249993*weight[3]*rho[5]-0.04303314829119353*weight[2]*rho[5]-0.04303314829119353*weight[1]*rho[5]+0.074535599249993*weight[0]*rho[5]-0.03571428571428571*rho[4]*weight[4]+0.074535599249993*rho[3]*weight[4]-0.04303314829119353*rho[2]*weight[4]-0.04303314829119353*rho[1]*weight[4]+0.074535599249993*rho[0]*weight[4]+0.074535599249993*weight[3]*rho[4]-0.04303314829119353*weight[2]*rho[4]-0.04303314829119353*weight[1]*rho[4]+0.074535599249993*weight[0]*rho[4]+0.05*rho[3]*weight[3]-0.08660254037844384*rho[2]*weight[3]-0.08660254037844384*rho[1]*weight[3]+0.08333333333333333*rho[0]*weight[3]-0.08660254037844384*weight[2]*rho[3]-0.08660254037844384*weight[1]*rho[3]+0.08333333333333333*weight[0]*rho[3]-0.016666666666666666*rho[2]*weight[2]+0.08333333333333333*rho[1]*weight[2]-0.04811252243246881*rho[0]*weight[2]+0.08333333333333333*weight[1]*rho[2]-0.04811252243246881*weight[0]*rho[2]-0.016666666666666666*rho[1]*weight[1]-0.04811252243246881*rho[0]*weight[1]-0.04811252243246881*weight[0]*rho[1]-0.08333333333333333*rho[0]*weight[0]); + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[0]],__double_as_longlong(-(1.9364916731037085*phiBC[7])-1.9364916731037085*phiBC[6]+1.118033988749895*phiBC[5]+1.118033988749895*phiBC[4]+1.5*phiBC[3]-0.8660254037844386*phiBC[2]-0.8660254037844386*phiBC[1]+0.5*phiBC[0])); #else - bsrc[nodeOff+globalIdxs[0]] += 0.030952380952380953*rho[7]*weight[7]+0.06666666666666667*rho[6]*weight[7]-0.07560539239387958*rho[5]*weight[7]-0.03849001794597506*rho[4]*weight[7]-0.07745966692414834*rho[3]*weight[7]+0.07453559924999299*rho[2]*weight[7]+0.07453559924999299*rho[1]*weight[7]-0.04303314829119352*rho[0]*weight[7]+0.06666666666666667*weight[6]*rho[7]-0.07560539239387958*weight[5]*rho[7]-0.03849001794597506*weight[4]*rho[7]-0.07745966692414834*weight[3]*rho[7]+0.07453559924999299*weight[2]*rho[7]+0.07453559924999299*weight[1]*rho[7]-0.04303314829119352*weight[0]*rho[7]+0.030952380952380953*rho[6]*weight[6]-0.03849001794597506*rho[5]*weight[6]-0.07560539239387958*rho[4]*weight[6]-0.07745966692414834*rho[3]*weight[6]+0.07453559924999299*rho[2]*weight[6]+0.07453559924999299*rho[1]*weight[6]-0.04303314829119352*rho[0]*weight[6]-0.03849001794597506*weight[5]*rho[6]-0.07560539239387958*weight[4]*rho[6]-0.07745966692414834*weight[3]*rho[6]+0.07453559924999299*weight[2]*rho[6]+0.07453559924999299*weight[1]*rho[6]-0.04303314829119352*weight[0]*rho[6]-0.03571428571428571*rho[5]*weight[5]+0.074535599249993*rho[3]*weight[5]-0.04303314829119353*rho[2]*weight[5]-0.04303314829119353*rho[1]*weight[5]+0.074535599249993*rho[0]*weight[5]+0.074535599249993*weight[3]*rho[5]-0.04303314829119353*weight[2]*rho[5]-0.04303314829119353*weight[1]*rho[5]+0.074535599249993*weight[0]*rho[5]-0.03571428571428571*rho[4]*weight[4]+0.074535599249993*rho[3]*weight[4]-0.04303314829119353*rho[2]*weight[4]-0.04303314829119353*rho[1]*weight[4]+0.074535599249993*rho[0]*weight[4]+0.074535599249993*weight[3]*rho[4]-0.04303314829119353*weight[2]*rho[4]-0.04303314829119353*weight[1]*rho[4]+0.074535599249993*weight[0]*rho[4]+0.05*rho[3]*weight[3]-0.08660254037844384*rho[2]*weight[3]-0.08660254037844384*rho[1]*weight[3]+0.08333333333333333*rho[0]*weight[3]-0.08660254037844384*weight[2]*rho[3]-0.08660254037844384*weight[1]*rho[3]+0.08333333333333333*weight[0]*rho[3]-0.016666666666666666*rho[2]*weight[2]+0.08333333333333333*rho[1]*weight[2]-0.04811252243246881*rho[0]*weight[2]+0.08333333333333333*weight[1]*rho[2]-0.04811252243246881*weight[0]*rho[2]-0.016666666666666666*rho[1]*weight[1]-0.04811252243246881*rho[0]*weight[1]-0.04811252243246881*weight[0]*rho[1]-0.08333333333333333*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[0]] = -(1.9364916731037085*phiBC[7])-1.9364916731037085*phiBC[6]+1.118033988749895*phiBC[5]+1.118033988749895*phiBC[4]+1.5*phiBC[3]-0.8660254037844386*phiBC[2]-0.8660254037844386*phiBC[1]+0.5*phiBC[0]; #endif #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[1]],0.2*rho[7]*weight[7]-0.10327955589886445*rho[3]*weight[7]-0.10327955589886445*weight[3]*rho[7]+0.23809523809523808*rho[6]*weight[6]+0.07698003589195011*rho[5]*weight[6]-0.1374643498070538*rho[4]*weight[6]-0.14907119849998599*rho[2]*weight[6]+0.08606629658238704*rho[0]*weight[6]+0.07698003589195011*weight[5]*rho[6]-0.1374643498070538*weight[4]*rho[6]-0.14907119849998599*weight[2]*rho[6]+0.08606629658238704*weight[0]*rho[6]+0.3333333333333333*rho[5]*weight[5]-0.1721325931647741*rho[2]*weight[5]-0.1721325931647741*weight[2]*rho[5]+0.23809523809523808*rho[4]*weight[4]+0.08606629658238706*rho[2]*weight[4]-0.149071198499986*rho[0]*weight[4]+0.08606629658238706*weight[2]*rho[4]-0.149071198499986*weight[0]*rho[4]+0.2*rho[3]*weight[3]-0.11547005383792514*rho[1]*weight[3]-0.11547005383792514*weight[1]*rho[3]+0.3333333333333333*rho[2]*weight[2]-0.19245008972987523*rho[0]*weight[2]-0.19245008972987523*weight[0]*rho[2]+0.2*rho[1]*weight[1]+0.3333333333333333*rho[0]*weight[0]); + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[1]],__double_as_longlong(0.9682458365518543*phiBC[6]+1.118033988749895*phiBC[5]-0.5590169943749475*phiBC[4]-0.8660254037844386*phiBC[2]+0.5*phiBC[0])); #else - bsrc[nodeOff+globalIdxs[1]] += 0.2*rho[7]*weight[7]-0.10327955589886445*rho[3]*weight[7]-0.10327955589886445*weight[3]*rho[7]+0.23809523809523808*rho[6]*weight[6]+0.07698003589195011*rho[5]*weight[6]-0.1374643498070538*rho[4]*weight[6]-0.14907119849998599*rho[2]*weight[6]+0.08606629658238704*rho[0]*weight[6]+0.07698003589195011*weight[5]*rho[6]-0.1374643498070538*weight[4]*rho[6]-0.14907119849998599*weight[2]*rho[6]+0.08606629658238704*weight[0]*rho[6]+0.3333333333333333*rho[5]*weight[5]-0.1721325931647741*rho[2]*weight[5]-0.1721325931647741*weight[2]*rho[5]+0.23809523809523808*rho[4]*weight[4]+0.08606629658238706*rho[2]*weight[4]-0.149071198499986*rho[0]*weight[4]+0.08606629658238706*weight[2]*rho[4]-0.149071198499986*weight[0]*rho[4]+0.2*rho[3]*weight[3]-0.11547005383792514*rho[1]*weight[3]-0.11547005383792514*weight[1]*rho[3]+0.3333333333333333*rho[2]*weight[2]-0.19245008972987523*rho[0]*weight[2]-0.19245008972987523*weight[0]*rho[2]+0.2*rho[1]*weight[1]+0.3333333333333333*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[1]] = 0.9682458365518543*phiBC[6]+1.118033988749895*phiBC[5]-0.5590169943749475*phiBC[4]-0.8660254037844386*phiBC[2]+0.5*phiBC[0]; #endif #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[2]],0.030952380952380953*rho[7]*weight[7]-0.06666666666666667*rho[6]*weight[7]+0.07560539239387958*rho[5]*weight[7]+0.03849001794597506*rho[4]*weight[7]-0.07745966692414834*rho[3]*weight[7]-0.07453559924999299*rho[2]*weight[7]+0.07453559924999299*rho[1]*weight[7]+0.04303314829119352*rho[0]*weight[7]-0.06666666666666667*weight[6]*rho[7]+0.07560539239387958*weight[5]*rho[7]+0.03849001794597506*weight[4]*rho[7]-0.07745966692414834*weight[3]*rho[7]-0.07453559924999299*weight[2]*rho[7]+0.07453559924999299*weight[1]*rho[7]+0.04303314829119352*weight[0]*rho[7]+0.030952380952380953*rho[6]*weight[6]-0.03849001794597506*rho[5]*weight[6]-0.07560539239387958*rho[4]*weight[6]+0.07745966692414834*rho[3]*weight[6]+0.07453559924999299*rho[2]*weight[6]-0.07453559924999299*rho[1]*weight[6]-0.04303314829119352*rho[0]*weight[6]-0.03849001794597506*weight[5]*rho[6]-0.07560539239387958*weight[4]*rho[6]+0.07745966692414834*weight[3]*rho[6]+0.07453559924999299*weight[2]*rho[6]-0.07453559924999299*weight[1]*rho[6]-0.04303314829119352*weight[0]*rho[6]-0.03571428571428571*rho[5]*weight[5]-0.074535599249993*rho[3]*weight[5]-0.04303314829119353*rho[2]*weight[5]+0.04303314829119353*rho[1]*weight[5]+0.074535599249993*rho[0]*weight[5]-0.074535599249993*weight[3]*rho[5]-0.04303314829119353*weight[2]*rho[5]+0.04303314829119353*weight[1]*rho[5]+0.074535599249993*weight[0]*rho[5]-0.03571428571428571*rho[4]*weight[4]-0.074535599249993*rho[3]*weight[4]-0.04303314829119353*rho[2]*weight[4]+0.04303314829119353*rho[1]*weight[4]+0.074535599249993*rho[0]*weight[4]-0.074535599249993*weight[3]*rho[4]-0.04303314829119353*weight[2]*rho[4]+0.04303314829119353*weight[1]*rho[4]+0.074535599249993*weight[0]*rho[4]+0.05*rho[3]*weight[3]+0.08660254037844384*rho[2]*weight[3]-0.08660254037844384*rho[1]*weight[3]-0.08333333333333333*rho[0]*weight[3]+0.08660254037844384*weight[2]*rho[3]-0.08660254037844384*weight[1]*rho[3]-0.08333333333333333*weight[0]*rho[3]-0.016666666666666666*rho[2]*weight[2]-0.08333333333333333*rho[1]*weight[2]-0.04811252243246881*rho[0]*weight[2]-0.08333333333333333*weight[1]*rho[2]-0.04811252243246881*weight[0]*rho[2]-0.016666666666666666*rho[1]*weight[1]+0.04811252243246881*rho[0]*weight[1]+0.04811252243246881*weight[0]*rho[1]-0.08333333333333333*rho[0]*weight[0]); + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[2]],__double_as_longlong(1.9364916731037085*phiBC[7]-1.9364916731037085*phiBC[6]+1.118033988749895*phiBC[5]+1.118033988749895*phiBC[4]-1.5*phiBC[3]-0.8660254037844386*phiBC[2]+0.8660254037844386*phiBC[1]+0.5*phiBC[0])); #else - bsrc[nodeOff+globalIdxs[2]] += 0.030952380952380953*rho[7]*weight[7]-0.06666666666666667*rho[6]*weight[7]+0.07560539239387958*rho[5]*weight[7]+0.03849001794597506*rho[4]*weight[7]-0.07745966692414834*rho[3]*weight[7]-0.07453559924999299*rho[2]*weight[7]+0.07453559924999299*rho[1]*weight[7]+0.04303314829119352*rho[0]*weight[7]-0.06666666666666667*weight[6]*rho[7]+0.07560539239387958*weight[5]*rho[7]+0.03849001794597506*weight[4]*rho[7]-0.07745966692414834*weight[3]*rho[7]-0.07453559924999299*weight[2]*rho[7]+0.07453559924999299*weight[1]*rho[7]+0.04303314829119352*weight[0]*rho[7]+0.030952380952380953*rho[6]*weight[6]-0.03849001794597506*rho[5]*weight[6]-0.07560539239387958*rho[4]*weight[6]+0.07745966692414834*rho[3]*weight[6]+0.07453559924999299*rho[2]*weight[6]-0.07453559924999299*rho[1]*weight[6]-0.04303314829119352*rho[0]*weight[6]-0.03849001794597506*weight[5]*rho[6]-0.07560539239387958*weight[4]*rho[6]+0.07745966692414834*weight[3]*rho[6]+0.07453559924999299*weight[2]*rho[6]-0.07453559924999299*weight[1]*rho[6]-0.04303314829119352*weight[0]*rho[6]-0.03571428571428571*rho[5]*weight[5]-0.074535599249993*rho[3]*weight[5]-0.04303314829119353*rho[2]*weight[5]+0.04303314829119353*rho[1]*weight[5]+0.074535599249993*rho[0]*weight[5]-0.074535599249993*weight[3]*rho[5]-0.04303314829119353*weight[2]*rho[5]+0.04303314829119353*weight[1]*rho[5]+0.074535599249993*weight[0]*rho[5]-0.03571428571428571*rho[4]*weight[4]-0.074535599249993*rho[3]*weight[4]-0.04303314829119353*rho[2]*weight[4]+0.04303314829119353*rho[1]*weight[4]+0.074535599249993*rho[0]*weight[4]-0.074535599249993*weight[3]*rho[4]-0.04303314829119353*weight[2]*rho[4]+0.04303314829119353*weight[1]*rho[4]+0.074535599249993*weight[0]*rho[4]+0.05*rho[3]*weight[3]+0.08660254037844384*rho[2]*weight[3]-0.08660254037844384*rho[1]*weight[3]-0.08333333333333333*rho[0]*weight[3]+0.08660254037844384*weight[2]*rho[3]-0.08660254037844384*weight[1]*rho[3]-0.08333333333333333*weight[0]*rho[3]-0.016666666666666666*rho[2]*weight[2]-0.08333333333333333*rho[1]*weight[2]-0.04811252243246881*rho[0]*weight[2]-0.08333333333333333*weight[1]*rho[2]-0.04811252243246881*weight[0]*rho[2]-0.016666666666666666*rho[1]*weight[1]+0.04811252243246881*rho[0]*weight[1]+0.04811252243246881*weight[0]*rho[1]-0.08333333333333333*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[2]] = 1.9364916731037085*phiBC[7]-1.9364916731037085*phiBC[6]+1.118033988749895*phiBC[5]+1.118033988749895*phiBC[4]-1.5*phiBC[3]-0.8660254037844386*phiBC[2]+0.8660254037844386*phiBC[1]+0.5*phiBC[0]; #endif #ifdef __CUDA_ARCH__ atomicAdd(&bsrc[nodeOff+globalIdxs[3]],0.23809523809523808*rho[7]*weight[7]-0.1374643498070538*rho[5]*weight[7]+0.07698003589195011*rho[4]*weight[7]-0.14907119849998599*rho[1]*weight[7]+0.08606629658238704*rho[0]*weight[7]-0.1374643498070538*weight[5]*rho[7]+0.07698003589195011*weight[4]*rho[7]-0.14907119849998599*weight[1]*rho[7]+0.08606629658238704*weight[0]*rho[7]+0.2*rho[6]*weight[6]-0.10327955589886445*rho[3]*weight[6]-0.10327955589886445*weight[3]*rho[6]+0.23809523809523808*rho[5]*weight[5]+0.08606629658238706*rho[1]*weight[5]-0.149071198499986*rho[0]*weight[5]+0.08606629658238706*weight[1]*rho[5]-0.149071198499986*weight[0]*rho[5]+0.3333333333333333*rho[4]*weight[4]-0.1721325931647741*rho[1]*weight[4]-0.1721325931647741*weight[1]*rho[4]+0.2*rho[3]*weight[3]-0.11547005383792514*rho[2]*weight[3]-0.11547005383792514*weight[2]*rho[3]+0.2*rho[2]*weight[2]+0.3333333333333333*rho[1]*weight[1]-0.19245008972987523*rho[0]*weight[1]-0.19245008972987523*weight[0]*rho[1]+0.3333333333333333*rho[0]*weight[0]); @@ -1814,11 +2758,11 @@ GKYL_CU_DH void fem_parproj_src_stencil_weighted_2x_ser_p2_iny_nondirichlety(con } -GKYL_CU_DH void fem_parproj_src_stencil_weighted_2x_ser_p1_loy_nondirichlety(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +GKYL_CU_DH void fem_parproj_src_stencil_weighted_2x_ser_p1_upy_nondirichlety(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) { // rho: right side source. // weight: Weight in the projection operation. - // phiBC: Dirichlet boundary potential, given as a DG expansion in the ghost cell (volume). + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. // nodeOff: node offset (prob idx * global number of nodes). // globalIdxs: global linear index of each basis function/node in current cell. // bsrc: global right side source vector. @@ -1846,11 +2790,11 @@ GKYL_CU_DH void fem_parproj_src_stencil_weighted_2x_ser_p1_loy_nondirichlety(con } -GKYL_CU_DH void fem_parproj_src_stencil_weighted_2x_ser_p2_loy_nondirichlety(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +GKYL_CU_DH void fem_parproj_src_stencil_weighted_2x_ser_p2_upy_nondirichlety(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) { // rho: right side source. // weight: Weight in the projection operation. - // phiBC: Dirichlet boundary potential, given as a DG expansion in the ghost cell (volume). + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. // nodeOff: node offset (prob idx * global number of nodes). // globalIdxs: global linear index of each basis function/node in current cell. // bsrc: global right side source vector. @@ -1898,61 +2842,61 @@ GKYL_CU_DH void fem_parproj_src_stencil_weighted_2x_ser_p2_loy_nondirichlety(con } -GKYL_CU_DH void fem_parproj_src_stencil_weighted_2x_ser_p1_loy_dirichlety(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +GKYL_CU_DH void fem_parproj_src_stencil_weighted_2x_ser_p1_upy_dirichlet_ghosty(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) { // rho: right side source. // weight: Weight in the projection operation. - // phiBC: Dirichlet boundary potential, given as a DG expansion in the ghost cell (volume). + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. // nodeOff: node offset (prob idx * global number of nodes). // globalIdxs: global linear index of each basis function/node in current cell. // bsrc: global right side source vector. #ifdef __CUDA_ARCH__ - atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[0]],__double_as_longlong(1.5*phiBC[3]-0.8660254037844386*phiBC[2]-0.8660254037844386*phiBC[1]+0.5*phiBC[0])); + atomicAdd(&bsrc[nodeOff+globalIdxs[0]],0.25*rho[3]*weight[3]-0.14433756729740643*rho[2]*weight[3]-0.14433756729740643*rho[1]*weight[3]+0.08333333333333333*rho[0]*weight[3]-0.14433756729740643*weight[2]*rho[3]-0.14433756729740643*weight[1]*rho[3]+0.08333333333333333*weight[0]*rho[3]+0.25*rho[2]*weight[2]+0.08333333333333333*rho[1]*weight[2]-0.14433756729740643*rho[0]*weight[2]+0.08333333333333333*weight[1]*rho[2]-0.14433756729740643*weight[0]*rho[2]+0.25*rho[1]*weight[1]-0.14433756729740643*rho[0]*weight[1]-0.14433756729740643*weight[0]*rho[1]+0.25*rho[0]*weight[0]); #else - bsrc[nodeOff+globalIdxs[0]] = 1.5*phiBC[3]-0.8660254037844386*phiBC[2]-0.8660254037844386*phiBC[1]+0.5*phiBC[0]; + bsrc[nodeOff+globalIdxs[0]] += 0.25*rho[3]*weight[3]-0.14433756729740643*rho[2]*weight[3]-0.14433756729740643*rho[1]*weight[3]+0.08333333333333333*rho[0]*weight[3]-0.14433756729740643*weight[2]*rho[3]-0.14433756729740643*weight[1]*rho[3]+0.08333333333333333*weight[0]*rho[3]+0.25*rho[2]*weight[2]+0.08333333333333333*rho[1]*weight[2]-0.14433756729740643*rho[0]*weight[2]+0.08333333333333333*weight[1]*rho[2]-0.14433756729740643*weight[0]*rho[2]+0.25*rho[1]*weight[1]-0.14433756729740643*rho[0]*weight[1]-0.14433756729740643*weight[0]*rho[1]+0.25*rho[0]*weight[0]; #endif #ifdef __CUDA_ARCH__ - atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[1]],__double_as_longlong(-(1.5*phiBC[3])-0.8660254037844386*phiBC[2]+0.8660254037844386*phiBC[1]+0.5*phiBC[0])); + atomicAdd(&bsrc[nodeOff+globalIdxs[1]],0.25*rho[3]*weight[3]+0.14433756729740643*rho[2]*weight[3]-0.14433756729740643*rho[1]*weight[3]-0.08333333333333333*rho[0]*weight[3]+0.14433756729740643*weight[2]*rho[3]-0.14433756729740643*weight[1]*rho[3]-0.08333333333333333*weight[0]*rho[3]+0.25*rho[2]*weight[2]-0.08333333333333333*rho[1]*weight[2]-0.14433756729740643*rho[0]*weight[2]-0.08333333333333333*weight[1]*rho[2]-0.14433756729740643*weight[0]*rho[2]+0.25*rho[1]*weight[1]+0.14433756729740643*rho[0]*weight[1]+0.14433756729740643*weight[0]*rho[1]+0.25*rho[0]*weight[0]); #else - bsrc[nodeOff+globalIdxs[1]] = -(1.5*phiBC[3])-0.8660254037844386*phiBC[2]+0.8660254037844386*phiBC[1]+0.5*phiBC[0]; + bsrc[nodeOff+globalIdxs[1]] += 0.25*rho[3]*weight[3]+0.14433756729740643*rho[2]*weight[3]-0.14433756729740643*rho[1]*weight[3]-0.08333333333333333*rho[0]*weight[3]+0.14433756729740643*weight[2]*rho[3]-0.14433756729740643*weight[1]*rho[3]-0.08333333333333333*weight[0]*rho[3]+0.25*rho[2]*weight[2]-0.08333333333333333*rho[1]*weight[2]-0.14433756729740643*rho[0]*weight[2]-0.08333333333333333*weight[1]*rho[2]-0.14433756729740643*weight[0]*rho[2]+0.25*rho[1]*weight[1]+0.14433756729740643*rho[0]*weight[1]+0.14433756729740643*weight[0]*rho[1]+0.25*rho[0]*weight[0]; #endif #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[2]],0.25*rho[3]*weight[3]-0.14433756729740643*rho[2]*weight[3]+0.14433756729740643*rho[1]*weight[3]-0.08333333333333333*rho[0]*weight[3]-0.14433756729740643*weight[2]*rho[3]+0.14433756729740643*weight[1]*rho[3]-0.08333333333333333*weight[0]*rho[3]+0.25*rho[2]*weight[2]-0.08333333333333333*rho[1]*weight[2]+0.14433756729740643*rho[0]*weight[2]-0.08333333333333333*weight[1]*rho[2]+0.14433756729740643*weight[0]*rho[2]+0.25*rho[1]*weight[1]-0.14433756729740643*rho[0]*weight[1]-0.14433756729740643*weight[0]*rho[1]+0.25*rho[0]*weight[0]); + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[2]],__double_as_longlong(1.5*phiBC[3]-0.8660254037844386*phiBC[2]-0.8660254037844386*phiBC[1]+0.5*phiBC[0])); #else - bsrc[nodeOff+globalIdxs[2]] += 0.25*rho[3]*weight[3]-0.14433756729740643*rho[2]*weight[3]+0.14433756729740643*rho[1]*weight[3]-0.08333333333333333*rho[0]*weight[3]-0.14433756729740643*weight[2]*rho[3]+0.14433756729740643*weight[1]*rho[3]-0.08333333333333333*weight[0]*rho[3]+0.25*rho[2]*weight[2]-0.08333333333333333*rho[1]*weight[2]+0.14433756729740643*rho[0]*weight[2]-0.08333333333333333*weight[1]*rho[2]+0.14433756729740643*weight[0]*rho[2]+0.25*rho[1]*weight[1]-0.14433756729740643*rho[0]*weight[1]-0.14433756729740643*weight[0]*rho[1]+0.25*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[2]] = 1.5*phiBC[3]-0.8660254037844386*phiBC[2]-0.8660254037844386*phiBC[1]+0.5*phiBC[0]; #endif #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[3]],0.25*rho[3]*weight[3]+0.14433756729740643*rho[2]*weight[3]+0.14433756729740643*rho[1]*weight[3]+0.08333333333333333*rho[0]*weight[3]+0.14433756729740643*weight[2]*rho[3]+0.14433756729740643*weight[1]*rho[3]+0.08333333333333333*weight[0]*rho[3]+0.25*rho[2]*weight[2]+0.08333333333333333*rho[1]*weight[2]+0.14433756729740643*rho[0]*weight[2]+0.08333333333333333*weight[1]*rho[2]+0.14433756729740643*weight[0]*rho[2]+0.25*rho[1]*weight[1]+0.14433756729740643*rho[0]*weight[1]+0.14433756729740643*weight[0]*rho[1]+0.25*rho[0]*weight[0]); + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[3]],__double_as_longlong(-(1.5*phiBC[3])-0.8660254037844386*phiBC[2]+0.8660254037844386*phiBC[1]+0.5*phiBC[0])); #else - bsrc[nodeOff+globalIdxs[3]] += 0.25*rho[3]*weight[3]+0.14433756729740643*rho[2]*weight[3]+0.14433756729740643*rho[1]*weight[3]+0.08333333333333333*rho[0]*weight[3]+0.14433756729740643*weight[2]*rho[3]+0.14433756729740643*weight[1]*rho[3]+0.08333333333333333*weight[0]*rho[3]+0.25*rho[2]*weight[2]+0.08333333333333333*rho[1]*weight[2]+0.14433756729740643*rho[0]*weight[2]+0.08333333333333333*weight[1]*rho[2]+0.14433756729740643*weight[0]*rho[2]+0.25*rho[1]*weight[1]+0.14433756729740643*rho[0]*weight[1]+0.14433756729740643*weight[0]*rho[1]+0.25*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[3]] = -(1.5*phiBC[3])-0.8660254037844386*phiBC[2]+0.8660254037844386*phiBC[1]+0.5*phiBC[0]; #endif } -GKYL_CU_DH void fem_parproj_src_stencil_weighted_2x_ser_p2_loy_dirichlety(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +GKYL_CU_DH void fem_parproj_src_stencil_weighted_2x_ser_p2_upy_dirichlet_ghosty(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) { // rho: right side source. // weight: Weight in the projection operation. - // phiBC: Dirichlet boundary potential, given as a DG expansion in the ghost cell (volume). + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. // nodeOff: node offset (prob idx * global number of nodes). // globalIdxs: global linear index of each basis function/node in current cell. // bsrc: global right side source vector. #ifdef __CUDA_ARCH__ - atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[0]],__double_as_longlong(-(1.9364916731037085*phiBC[7])-1.9364916731037085*phiBC[6]+1.118033988749895*phiBC[5]+1.118033988749895*phiBC[4]+1.5*phiBC[3]-0.8660254037844386*phiBC[2]-0.8660254037844386*phiBC[1]+0.5*phiBC[0])); + atomicAdd(&bsrc[nodeOff+globalIdxs[0]],0.030952380952380953*rho[7]*weight[7]+0.06666666666666667*rho[6]*weight[7]-0.07560539239387958*rho[5]*weight[7]-0.03849001794597506*rho[4]*weight[7]-0.07745966692414834*rho[3]*weight[7]+0.07453559924999299*rho[2]*weight[7]+0.07453559924999299*rho[1]*weight[7]-0.04303314829119352*rho[0]*weight[7]+0.06666666666666667*weight[6]*rho[7]-0.07560539239387958*weight[5]*rho[7]-0.03849001794597506*weight[4]*rho[7]-0.07745966692414834*weight[3]*rho[7]+0.07453559924999299*weight[2]*rho[7]+0.07453559924999299*weight[1]*rho[7]-0.04303314829119352*weight[0]*rho[7]+0.030952380952380953*rho[6]*weight[6]-0.03849001794597506*rho[5]*weight[6]-0.07560539239387958*rho[4]*weight[6]-0.07745966692414834*rho[3]*weight[6]+0.07453559924999299*rho[2]*weight[6]+0.07453559924999299*rho[1]*weight[6]-0.04303314829119352*rho[0]*weight[6]-0.03849001794597506*weight[5]*rho[6]-0.07560539239387958*weight[4]*rho[6]-0.07745966692414834*weight[3]*rho[6]+0.07453559924999299*weight[2]*rho[6]+0.07453559924999299*weight[1]*rho[6]-0.04303314829119352*weight[0]*rho[6]-0.03571428571428571*rho[5]*weight[5]+0.074535599249993*rho[3]*weight[5]-0.04303314829119353*rho[2]*weight[5]-0.04303314829119353*rho[1]*weight[5]+0.074535599249993*rho[0]*weight[5]+0.074535599249993*weight[3]*rho[5]-0.04303314829119353*weight[2]*rho[5]-0.04303314829119353*weight[1]*rho[5]+0.074535599249993*weight[0]*rho[5]-0.03571428571428571*rho[4]*weight[4]+0.074535599249993*rho[3]*weight[4]-0.04303314829119353*rho[2]*weight[4]-0.04303314829119353*rho[1]*weight[4]+0.074535599249993*rho[0]*weight[4]+0.074535599249993*weight[3]*rho[4]-0.04303314829119353*weight[2]*rho[4]-0.04303314829119353*weight[1]*rho[4]+0.074535599249993*weight[0]*rho[4]+0.05*rho[3]*weight[3]-0.08660254037844384*rho[2]*weight[3]-0.08660254037844384*rho[1]*weight[3]+0.08333333333333333*rho[0]*weight[3]-0.08660254037844384*weight[2]*rho[3]-0.08660254037844384*weight[1]*rho[3]+0.08333333333333333*weight[0]*rho[3]-0.016666666666666666*rho[2]*weight[2]+0.08333333333333333*rho[1]*weight[2]-0.04811252243246881*rho[0]*weight[2]+0.08333333333333333*weight[1]*rho[2]-0.04811252243246881*weight[0]*rho[2]-0.016666666666666666*rho[1]*weight[1]-0.04811252243246881*rho[0]*weight[1]-0.04811252243246881*weight[0]*rho[1]-0.08333333333333333*rho[0]*weight[0]); #else - bsrc[nodeOff+globalIdxs[0]] = -(1.9364916731037085*phiBC[7])-1.9364916731037085*phiBC[6]+1.118033988749895*phiBC[5]+1.118033988749895*phiBC[4]+1.5*phiBC[3]-0.8660254037844386*phiBC[2]-0.8660254037844386*phiBC[1]+0.5*phiBC[0]; + bsrc[nodeOff+globalIdxs[0]] += 0.030952380952380953*rho[7]*weight[7]+0.06666666666666667*rho[6]*weight[7]-0.07560539239387958*rho[5]*weight[7]-0.03849001794597506*rho[4]*weight[7]-0.07745966692414834*rho[3]*weight[7]+0.07453559924999299*rho[2]*weight[7]+0.07453559924999299*rho[1]*weight[7]-0.04303314829119352*rho[0]*weight[7]+0.06666666666666667*weight[6]*rho[7]-0.07560539239387958*weight[5]*rho[7]-0.03849001794597506*weight[4]*rho[7]-0.07745966692414834*weight[3]*rho[7]+0.07453559924999299*weight[2]*rho[7]+0.07453559924999299*weight[1]*rho[7]-0.04303314829119352*weight[0]*rho[7]+0.030952380952380953*rho[6]*weight[6]-0.03849001794597506*rho[5]*weight[6]-0.07560539239387958*rho[4]*weight[6]-0.07745966692414834*rho[3]*weight[6]+0.07453559924999299*rho[2]*weight[6]+0.07453559924999299*rho[1]*weight[6]-0.04303314829119352*rho[0]*weight[6]-0.03849001794597506*weight[5]*rho[6]-0.07560539239387958*weight[4]*rho[6]-0.07745966692414834*weight[3]*rho[6]+0.07453559924999299*weight[2]*rho[6]+0.07453559924999299*weight[1]*rho[6]-0.04303314829119352*weight[0]*rho[6]-0.03571428571428571*rho[5]*weight[5]+0.074535599249993*rho[3]*weight[5]-0.04303314829119353*rho[2]*weight[5]-0.04303314829119353*rho[1]*weight[5]+0.074535599249993*rho[0]*weight[5]+0.074535599249993*weight[3]*rho[5]-0.04303314829119353*weight[2]*rho[5]-0.04303314829119353*weight[1]*rho[5]+0.074535599249993*weight[0]*rho[5]-0.03571428571428571*rho[4]*weight[4]+0.074535599249993*rho[3]*weight[4]-0.04303314829119353*rho[2]*weight[4]-0.04303314829119353*rho[1]*weight[4]+0.074535599249993*rho[0]*weight[4]+0.074535599249993*weight[3]*rho[4]-0.04303314829119353*weight[2]*rho[4]-0.04303314829119353*weight[1]*rho[4]+0.074535599249993*weight[0]*rho[4]+0.05*rho[3]*weight[3]-0.08660254037844384*rho[2]*weight[3]-0.08660254037844384*rho[1]*weight[3]+0.08333333333333333*rho[0]*weight[3]-0.08660254037844384*weight[2]*rho[3]-0.08660254037844384*weight[1]*rho[3]+0.08333333333333333*weight[0]*rho[3]-0.016666666666666666*rho[2]*weight[2]+0.08333333333333333*rho[1]*weight[2]-0.04811252243246881*rho[0]*weight[2]+0.08333333333333333*weight[1]*rho[2]-0.04811252243246881*weight[0]*rho[2]-0.016666666666666666*rho[1]*weight[1]-0.04811252243246881*rho[0]*weight[1]-0.04811252243246881*weight[0]*rho[1]-0.08333333333333333*rho[0]*weight[0]; #endif #ifdef __CUDA_ARCH__ - atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[1]],__double_as_longlong(0.9682458365518543*phiBC[6]+1.118033988749895*phiBC[5]-0.5590169943749475*phiBC[4]-0.8660254037844386*phiBC[2]+0.5*phiBC[0])); + atomicAdd(&bsrc[nodeOff+globalIdxs[1]],0.2*rho[7]*weight[7]-0.10327955589886445*rho[3]*weight[7]-0.10327955589886445*weight[3]*rho[7]+0.23809523809523808*rho[6]*weight[6]+0.07698003589195011*rho[5]*weight[6]-0.1374643498070538*rho[4]*weight[6]-0.14907119849998599*rho[2]*weight[6]+0.08606629658238704*rho[0]*weight[6]+0.07698003589195011*weight[5]*rho[6]-0.1374643498070538*weight[4]*rho[6]-0.14907119849998599*weight[2]*rho[6]+0.08606629658238704*weight[0]*rho[6]+0.3333333333333333*rho[5]*weight[5]-0.1721325931647741*rho[2]*weight[5]-0.1721325931647741*weight[2]*rho[5]+0.23809523809523808*rho[4]*weight[4]+0.08606629658238706*rho[2]*weight[4]-0.149071198499986*rho[0]*weight[4]+0.08606629658238706*weight[2]*rho[4]-0.149071198499986*weight[0]*rho[4]+0.2*rho[3]*weight[3]-0.11547005383792514*rho[1]*weight[3]-0.11547005383792514*weight[1]*rho[3]+0.3333333333333333*rho[2]*weight[2]-0.19245008972987523*rho[0]*weight[2]-0.19245008972987523*weight[0]*rho[2]+0.2*rho[1]*weight[1]+0.3333333333333333*rho[0]*weight[0]); #else - bsrc[nodeOff+globalIdxs[1]] = 0.9682458365518543*phiBC[6]+1.118033988749895*phiBC[5]-0.5590169943749475*phiBC[4]-0.8660254037844386*phiBC[2]+0.5*phiBC[0]; + bsrc[nodeOff+globalIdxs[1]] += 0.2*rho[7]*weight[7]-0.10327955589886445*rho[3]*weight[7]-0.10327955589886445*weight[3]*rho[7]+0.23809523809523808*rho[6]*weight[6]+0.07698003589195011*rho[5]*weight[6]-0.1374643498070538*rho[4]*weight[6]-0.14907119849998599*rho[2]*weight[6]+0.08606629658238704*rho[0]*weight[6]+0.07698003589195011*weight[5]*rho[6]-0.1374643498070538*weight[4]*rho[6]-0.14907119849998599*weight[2]*rho[6]+0.08606629658238704*weight[0]*rho[6]+0.3333333333333333*rho[5]*weight[5]-0.1721325931647741*rho[2]*weight[5]-0.1721325931647741*weight[2]*rho[5]+0.23809523809523808*rho[4]*weight[4]+0.08606629658238706*rho[2]*weight[4]-0.149071198499986*rho[0]*weight[4]+0.08606629658238706*weight[2]*rho[4]-0.149071198499986*weight[0]*rho[4]+0.2*rho[3]*weight[3]-0.11547005383792514*rho[1]*weight[3]-0.11547005383792514*weight[1]*rho[3]+0.3333333333333333*rho[2]*weight[2]-0.19245008972987523*rho[0]*weight[2]-0.19245008972987523*weight[0]*rho[2]+0.2*rho[1]*weight[1]+0.3333333333333333*rho[0]*weight[0]; #endif #ifdef __CUDA_ARCH__ - atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[2]],__double_as_longlong(1.9364916731037085*phiBC[7]-1.9364916731037085*phiBC[6]+1.118033988749895*phiBC[5]+1.118033988749895*phiBC[4]-1.5*phiBC[3]-0.8660254037844386*phiBC[2]+0.8660254037844386*phiBC[1]+0.5*phiBC[0])); + atomicAdd(&bsrc[nodeOff+globalIdxs[2]],0.030952380952380953*rho[7]*weight[7]-0.06666666666666667*rho[6]*weight[7]+0.07560539239387958*rho[5]*weight[7]+0.03849001794597506*rho[4]*weight[7]-0.07745966692414834*rho[3]*weight[7]-0.07453559924999299*rho[2]*weight[7]+0.07453559924999299*rho[1]*weight[7]+0.04303314829119352*rho[0]*weight[7]-0.06666666666666667*weight[6]*rho[7]+0.07560539239387958*weight[5]*rho[7]+0.03849001794597506*weight[4]*rho[7]-0.07745966692414834*weight[3]*rho[7]-0.07453559924999299*weight[2]*rho[7]+0.07453559924999299*weight[1]*rho[7]+0.04303314829119352*weight[0]*rho[7]+0.030952380952380953*rho[6]*weight[6]-0.03849001794597506*rho[5]*weight[6]-0.07560539239387958*rho[4]*weight[6]+0.07745966692414834*rho[3]*weight[6]+0.07453559924999299*rho[2]*weight[6]-0.07453559924999299*rho[1]*weight[6]-0.04303314829119352*rho[0]*weight[6]-0.03849001794597506*weight[5]*rho[6]-0.07560539239387958*weight[4]*rho[6]+0.07745966692414834*weight[3]*rho[6]+0.07453559924999299*weight[2]*rho[6]-0.07453559924999299*weight[1]*rho[6]-0.04303314829119352*weight[0]*rho[6]-0.03571428571428571*rho[5]*weight[5]-0.074535599249993*rho[3]*weight[5]-0.04303314829119353*rho[2]*weight[5]+0.04303314829119353*rho[1]*weight[5]+0.074535599249993*rho[0]*weight[5]-0.074535599249993*weight[3]*rho[5]-0.04303314829119353*weight[2]*rho[5]+0.04303314829119353*weight[1]*rho[5]+0.074535599249993*weight[0]*rho[5]-0.03571428571428571*rho[4]*weight[4]-0.074535599249993*rho[3]*weight[4]-0.04303314829119353*rho[2]*weight[4]+0.04303314829119353*rho[1]*weight[4]+0.074535599249993*rho[0]*weight[4]-0.074535599249993*weight[3]*rho[4]-0.04303314829119353*weight[2]*rho[4]+0.04303314829119353*weight[1]*rho[4]+0.074535599249993*weight[0]*rho[4]+0.05*rho[3]*weight[3]+0.08660254037844384*rho[2]*weight[3]-0.08660254037844384*rho[1]*weight[3]-0.08333333333333333*rho[0]*weight[3]+0.08660254037844384*weight[2]*rho[3]-0.08660254037844384*weight[1]*rho[3]-0.08333333333333333*weight[0]*rho[3]-0.016666666666666666*rho[2]*weight[2]-0.08333333333333333*rho[1]*weight[2]-0.04811252243246881*rho[0]*weight[2]-0.08333333333333333*weight[1]*rho[2]-0.04811252243246881*weight[0]*rho[2]-0.016666666666666666*rho[1]*weight[1]+0.04811252243246881*rho[0]*weight[1]+0.04811252243246881*weight[0]*rho[1]-0.08333333333333333*rho[0]*weight[0]); #else - bsrc[nodeOff+globalIdxs[2]] = 1.9364916731037085*phiBC[7]-1.9364916731037085*phiBC[6]+1.118033988749895*phiBC[5]+1.118033988749895*phiBC[4]-1.5*phiBC[3]-0.8660254037844386*phiBC[2]+0.8660254037844386*phiBC[1]+0.5*phiBC[0]; + bsrc[nodeOff+globalIdxs[2]] += 0.030952380952380953*rho[7]*weight[7]-0.06666666666666667*rho[6]*weight[7]+0.07560539239387958*rho[5]*weight[7]+0.03849001794597506*rho[4]*weight[7]-0.07745966692414834*rho[3]*weight[7]-0.07453559924999299*rho[2]*weight[7]+0.07453559924999299*rho[1]*weight[7]+0.04303314829119352*rho[0]*weight[7]-0.06666666666666667*weight[6]*rho[7]+0.07560539239387958*weight[5]*rho[7]+0.03849001794597506*weight[4]*rho[7]-0.07745966692414834*weight[3]*rho[7]-0.07453559924999299*weight[2]*rho[7]+0.07453559924999299*weight[1]*rho[7]+0.04303314829119352*weight[0]*rho[7]+0.030952380952380953*rho[6]*weight[6]-0.03849001794597506*rho[5]*weight[6]-0.07560539239387958*rho[4]*weight[6]+0.07745966692414834*rho[3]*weight[6]+0.07453559924999299*rho[2]*weight[6]-0.07453559924999299*rho[1]*weight[6]-0.04303314829119352*rho[0]*weight[6]-0.03849001794597506*weight[5]*rho[6]-0.07560539239387958*weight[4]*rho[6]+0.07745966692414834*weight[3]*rho[6]+0.07453559924999299*weight[2]*rho[6]-0.07453559924999299*weight[1]*rho[6]-0.04303314829119352*weight[0]*rho[6]-0.03571428571428571*rho[5]*weight[5]-0.074535599249993*rho[3]*weight[5]-0.04303314829119353*rho[2]*weight[5]+0.04303314829119353*rho[1]*weight[5]+0.074535599249993*rho[0]*weight[5]-0.074535599249993*weight[3]*rho[5]-0.04303314829119353*weight[2]*rho[5]+0.04303314829119353*weight[1]*rho[5]+0.074535599249993*weight[0]*rho[5]-0.03571428571428571*rho[4]*weight[4]-0.074535599249993*rho[3]*weight[4]-0.04303314829119353*rho[2]*weight[4]+0.04303314829119353*rho[1]*weight[4]+0.074535599249993*rho[0]*weight[4]-0.074535599249993*weight[3]*rho[4]-0.04303314829119353*weight[2]*rho[4]+0.04303314829119353*weight[1]*rho[4]+0.074535599249993*weight[0]*rho[4]+0.05*rho[3]*weight[3]+0.08660254037844384*rho[2]*weight[3]-0.08660254037844384*rho[1]*weight[3]-0.08333333333333333*rho[0]*weight[3]+0.08660254037844384*weight[2]*rho[3]-0.08660254037844384*weight[1]*rho[3]-0.08333333333333333*weight[0]*rho[3]-0.016666666666666666*rho[2]*weight[2]-0.08333333333333333*rho[1]*weight[2]-0.04811252243246881*rho[0]*weight[2]-0.08333333333333333*weight[1]*rho[2]-0.04811252243246881*weight[0]*rho[2]-0.016666666666666666*rho[1]*weight[1]+0.04811252243246881*rho[0]*weight[1]+0.04811252243246881*weight[0]*rho[1]-0.08333333333333333*rho[0]*weight[0]; #endif #ifdef __CUDA_ARCH__ atomicAdd(&bsrc[nodeOff+globalIdxs[3]],0.23809523809523808*rho[7]*weight[7]-0.1374643498070538*rho[5]*weight[7]+0.07698003589195011*rho[4]*weight[7]-0.14907119849998599*rho[1]*weight[7]+0.08606629658238704*rho[0]*weight[7]-0.1374643498070538*weight[5]*rho[7]+0.07698003589195011*weight[4]*rho[7]-0.14907119849998599*weight[1]*rho[7]+0.08606629658238704*weight[0]*rho[7]+0.2*rho[6]*weight[6]-0.10327955589886445*rho[3]*weight[6]-0.10327955589886445*weight[3]*rho[6]+0.23809523809523808*rho[5]*weight[5]+0.08606629658238706*rho[1]*weight[5]-0.149071198499986*rho[0]*weight[5]+0.08606629658238706*weight[1]*rho[5]-0.149071198499986*weight[0]*rho[5]+0.3333333333333333*rho[4]*weight[4]-0.1721325931647741*rho[1]*weight[4]-0.1721325931647741*weight[1]*rho[4]+0.2*rho[3]*weight[3]-0.11547005383792514*rho[2]*weight[3]-0.11547005383792514*weight[2]*rho[3]+0.2*rho[2]*weight[2]+0.3333333333333333*rho[1]*weight[1]-0.19245008972987523*rho[0]*weight[1]-0.19245008972987523*weight[0]*rho[1]+0.3333333333333333*rho[0]*weight[0]); @@ -1965,28 +2909,28 @@ GKYL_CU_DH void fem_parproj_src_stencil_weighted_2x_ser_p2_loy_dirichlety(const bsrc[nodeOff+globalIdxs[4]] += 0.23809523809523808*rho[7]*weight[7]+0.1374643498070538*rho[5]*weight[7]-0.07698003589195011*rho[4]*weight[7]-0.14907119849998599*rho[1]*weight[7]-0.08606629658238704*rho[0]*weight[7]+0.1374643498070538*weight[5]*rho[7]-0.07698003589195011*weight[4]*rho[7]-0.14907119849998599*weight[1]*rho[7]-0.08606629658238704*weight[0]*rho[7]+0.2*rho[6]*weight[6]+0.10327955589886445*rho[3]*weight[6]+0.10327955589886445*weight[3]*rho[6]+0.23809523809523808*rho[5]*weight[5]-0.08606629658238706*rho[1]*weight[5]-0.149071198499986*rho[0]*weight[5]-0.08606629658238706*weight[1]*rho[5]-0.149071198499986*weight[0]*rho[5]+0.3333333333333333*rho[4]*weight[4]+0.1721325931647741*rho[1]*weight[4]+0.1721325931647741*weight[1]*rho[4]+0.2*rho[3]*weight[3]+0.11547005383792514*rho[2]*weight[3]+0.11547005383792514*weight[2]*rho[3]+0.2*rho[2]*weight[2]+0.3333333333333333*rho[1]*weight[1]+0.19245008972987523*rho[0]*weight[1]+0.19245008972987523*weight[0]*rho[1]+0.3333333333333333*rho[0]*weight[0]; #endif #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[5]],0.030952380952380953*rho[7]*weight[7]-0.06666666666666667*rho[6]*weight[7]-0.07560539239387958*rho[5]*weight[7]-0.03849001794597506*rho[4]*weight[7]+0.07745966692414834*rho[3]*weight[7]-0.07453559924999299*rho[2]*weight[7]+0.07453559924999299*rho[1]*weight[7]-0.04303314829119352*rho[0]*weight[7]-0.06666666666666667*weight[6]*rho[7]-0.07560539239387958*weight[5]*rho[7]-0.03849001794597506*weight[4]*rho[7]+0.07745966692414834*weight[3]*rho[7]-0.07453559924999299*weight[2]*rho[7]+0.07453559924999299*weight[1]*rho[7]-0.04303314829119352*weight[0]*rho[7]+0.030952380952380953*rho[6]*weight[6]+0.03849001794597506*rho[5]*weight[6]+0.07560539239387958*rho[4]*weight[6]-0.07745966692414834*rho[3]*weight[6]+0.07453559924999299*rho[2]*weight[6]-0.07453559924999299*rho[1]*weight[6]+0.04303314829119352*rho[0]*weight[6]+0.03849001794597506*weight[5]*rho[6]+0.07560539239387958*weight[4]*rho[6]-0.07745966692414834*weight[3]*rho[6]+0.07453559924999299*weight[2]*rho[6]-0.07453559924999299*weight[1]*rho[6]+0.04303314829119352*weight[0]*rho[6]-0.03571428571428571*rho[5]*weight[5]-0.074535599249993*rho[3]*weight[5]+0.04303314829119353*rho[2]*weight[5]-0.04303314829119353*rho[1]*weight[5]+0.074535599249993*rho[0]*weight[5]-0.074535599249993*weight[3]*rho[5]+0.04303314829119353*weight[2]*rho[5]-0.04303314829119353*weight[1]*rho[5]+0.074535599249993*weight[0]*rho[5]-0.03571428571428571*rho[4]*weight[4]-0.074535599249993*rho[3]*weight[4]+0.04303314829119353*rho[2]*weight[4]-0.04303314829119353*rho[1]*weight[4]+0.074535599249993*rho[0]*weight[4]-0.074535599249993*weight[3]*rho[4]+0.04303314829119353*weight[2]*rho[4]-0.04303314829119353*weight[1]*rho[4]+0.074535599249993*weight[0]*rho[4]+0.05*rho[3]*weight[3]-0.08660254037844384*rho[2]*weight[3]+0.08660254037844384*rho[1]*weight[3]-0.08333333333333333*rho[0]*weight[3]-0.08660254037844384*weight[2]*rho[3]+0.08660254037844384*weight[1]*rho[3]-0.08333333333333333*weight[0]*rho[3]-0.016666666666666666*rho[2]*weight[2]-0.08333333333333333*rho[1]*weight[2]+0.04811252243246881*rho[0]*weight[2]-0.08333333333333333*weight[1]*rho[2]+0.04811252243246881*weight[0]*rho[2]-0.016666666666666666*rho[1]*weight[1]-0.04811252243246881*rho[0]*weight[1]-0.04811252243246881*weight[0]*rho[1]-0.08333333333333333*rho[0]*weight[0]); + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[5]],__double_as_longlong(-(1.9364916731037085*phiBC[7])-1.9364916731037085*phiBC[6]+1.118033988749895*phiBC[5]+1.118033988749895*phiBC[4]+1.5*phiBC[3]-0.8660254037844386*phiBC[2]-0.8660254037844386*phiBC[1]+0.5*phiBC[0])); #else - bsrc[nodeOff+globalIdxs[5]] += 0.030952380952380953*rho[7]*weight[7]-0.06666666666666667*rho[6]*weight[7]-0.07560539239387958*rho[5]*weight[7]-0.03849001794597506*rho[4]*weight[7]+0.07745966692414834*rho[3]*weight[7]-0.07453559924999299*rho[2]*weight[7]+0.07453559924999299*rho[1]*weight[7]-0.04303314829119352*rho[0]*weight[7]-0.06666666666666667*weight[6]*rho[7]-0.07560539239387958*weight[5]*rho[7]-0.03849001794597506*weight[4]*rho[7]+0.07745966692414834*weight[3]*rho[7]-0.07453559924999299*weight[2]*rho[7]+0.07453559924999299*weight[1]*rho[7]-0.04303314829119352*weight[0]*rho[7]+0.030952380952380953*rho[6]*weight[6]+0.03849001794597506*rho[5]*weight[6]+0.07560539239387958*rho[4]*weight[6]-0.07745966692414834*rho[3]*weight[6]+0.07453559924999299*rho[2]*weight[6]-0.07453559924999299*rho[1]*weight[6]+0.04303314829119352*rho[0]*weight[6]+0.03849001794597506*weight[5]*rho[6]+0.07560539239387958*weight[4]*rho[6]-0.07745966692414834*weight[3]*rho[6]+0.07453559924999299*weight[2]*rho[6]-0.07453559924999299*weight[1]*rho[6]+0.04303314829119352*weight[0]*rho[6]-0.03571428571428571*rho[5]*weight[5]-0.074535599249993*rho[3]*weight[5]+0.04303314829119353*rho[2]*weight[5]-0.04303314829119353*rho[1]*weight[5]+0.074535599249993*rho[0]*weight[5]-0.074535599249993*weight[3]*rho[5]+0.04303314829119353*weight[2]*rho[5]-0.04303314829119353*weight[1]*rho[5]+0.074535599249993*weight[0]*rho[5]-0.03571428571428571*rho[4]*weight[4]-0.074535599249993*rho[3]*weight[4]+0.04303314829119353*rho[2]*weight[4]-0.04303314829119353*rho[1]*weight[4]+0.074535599249993*rho[0]*weight[4]-0.074535599249993*weight[3]*rho[4]+0.04303314829119353*weight[2]*rho[4]-0.04303314829119353*weight[1]*rho[4]+0.074535599249993*weight[0]*rho[4]+0.05*rho[3]*weight[3]-0.08660254037844384*rho[2]*weight[3]+0.08660254037844384*rho[1]*weight[3]-0.08333333333333333*rho[0]*weight[3]-0.08660254037844384*weight[2]*rho[3]+0.08660254037844384*weight[1]*rho[3]-0.08333333333333333*weight[0]*rho[3]-0.016666666666666666*rho[2]*weight[2]-0.08333333333333333*rho[1]*weight[2]+0.04811252243246881*rho[0]*weight[2]-0.08333333333333333*weight[1]*rho[2]+0.04811252243246881*weight[0]*rho[2]-0.016666666666666666*rho[1]*weight[1]-0.04811252243246881*rho[0]*weight[1]-0.04811252243246881*weight[0]*rho[1]-0.08333333333333333*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[5]] = -(1.9364916731037085*phiBC[7])-1.9364916731037085*phiBC[6]+1.118033988749895*phiBC[5]+1.118033988749895*phiBC[4]+1.5*phiBC[3]-0.8660254037844386*phiBC[2]-0.8660254037844386*phiBC[1]+0.5*phiBC[0]; #endif #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[6]],0.2*rho[7]*weight[7]+0.10327955589886445*rho[3]*weight[7]+0.10327955589886445*weight[3]*rho[7]+0.23809523809523808*rho[6]*weight[6]-0.07698003589195011*rho[5]*weight[6]+0.1374643498070538*rho[4]*weight[6]-0.14907119849998599*rho[2]*weight[6]-0.08606629658238704*rho[0]*weight[6]-0.07698003589195011*weight[5]*rho[6]+0.1374643498070538*weight[4]*rho[6]-0.14907119849998599*weight[2]*rho[6]-0.08606629658238704*weight[0]*rho[6]+0.3333333333333333*rho[5]*weight[5]+0.1721325931647741*rho[2]*weight[5]+0.1721325931647741*weight[2]*rho[5]+0.23809523809523808*rho[4]*weight[4]-0.08606629658238706*rho[2]*weight[4]-0.149071198499986*rho[0]*weight[4]-0.08606629658238706*weight[2]*rho[4]-0.149071198499986*weight[0]*rho[4]+0.2*rho[3]*weight[3]+0.11547005383792514*rho[1]*weight[3]+0.11547005383792514*weight[1]*rho[3]+0.3333333333333333*rho[2]*weight[2]+0.19245008972987523*rho[0]*weight[2]+0.19245008972987523*weight[0]*rho[2]+0.2*rho[1]*weight[1]+0.3333333333333333*rho[0]*weight[0]); + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[6]],__double_as_longlong(0.9682458365518543*phiBC[6]+1.118033988749895*phiBC[5]-0.5590169943749475*phiBC[4]-0.8660254037844386*phiBC[2]+0.5*phiBC[0])); #else - bsrc[nodeOff+globalIdxs[6]] += 0.2*rho[7]*weight[7]+0.10327955589886445*rho[3]*weight[7]+0.10327955589886445*weight[3]*rho[7]+0.23809523809523808*rho[6]*weight[6]-0.07698003589195011*rho[5]*weight[6]+0.1374643498070538*rho[4]*weight[6]-0.14907119849998599*rho[2]*weight[6]-0.08606629658238704*rho[0]*weight[6]-0.07698003589195011*weight[5]*rho[6]+0.1374643498070538*weight[4]*rho[6]-0.14907119849998599*weight[2]*rho[6]-0.08606629658238704*weight[0]*rho[6]+0.3333333333333333*rho[5]*weight[5]+0.1721325931647741*rho[2]*weight[5]+0.1721325931647741*weight[2]*rho[5]+0.23809523809523808*rho[4]*weight[4]-0.08606629658238706*rho[2]*weight[4]-0.149071198499986*rho[0]*weight[4]-0.08606629658238706*weight[2]*rho[4]-0.149071198499986*weight[0]*rho[4]+0.2*rho[3]*weight[3]+0.11547005383792514*rho[1]*weight[3]+0.11547005383792514*weight[1]*rho[3]+0.3333333333333333*rho[2]*weight[2]+0.19245008972987523*rho[0]*weight[2]+0.19245008972987523*weight[0]*rho[2]+0.2*rho[1]*weight[1]+0.3333333333333333*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[6]] = 0.9682458365518543*phiBC[6]+1.118033988749895*phiBC[5]-0.5590169943749475*phiBC[4]-0.8660254037844386*phiBC[2]+0.5*phiBC[0]; #endif #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[7]],0.030952380952380953*rho[7]*weight[7]+0.06666666666666667*rho[6]*weight[7]+0.07560539239387958*rho[5]*weight[7]+0.03849001794597506*rho[4]*weight[7]+0.07745966692414834*rho[3]*weight[7]+0.07453559924999299*rho[2]*weight[7]+0.07453559924999299*rho[1]*weight[7]+0.04303314829119352*rho[0]*weight[7]+0.06666666666666667*weight[6]*rho[7]+0.07560539239387958*weight[5]*rho[7]+0.03849001794597506*weight[4]*rho[7]+0.07745966692414834*weight[3]*rho[7]+0.07453559924999299*weight[2]*rho[7]+0.07453559924999299*weight[1]*rho[7]+0.04303314829119352*weight[0]*rho[7]+0.030952380952380953*rho[6]*weight[6]+0.03849001794597506*rho[5]*weight[6]+0.07560539239387958*rho[4]*weight[6]+0.07745966692414834*rho[3]*weight[6]+0.07453559924999299*rho[2]*weight[6]+0.07453559924999299*rho[1]*weight[6]+0.04303314829119352*rho[0]*weight[6]+0.03849001794597506*weight[5]*rho[6]+0.07560539239387958*weight[4]*rho[6]+0.07745966692414834*weight[3]*rho[6]+0.07453559924999299*weight[2]*rho[6]+0.07453559924999299*weight[1]*rho[6]+0.04303314829119352*weight[0]*rho[6]-0.03571428571428571*rho[5]*weight[5]+0.074535599249993*rho[3]*weight[5]+0.04303314829119353*rho[2]*weight[5]+0.04303314829119353*rho[1]*weight[5]+0.074535599249993*rho[0]*weight[5]+0.074535599249993*weight[3]*rho[5]+0.04303314829119353*weight[2]*rho[5]+0.04303314829119353*weight[1]*rho[5]+0.074535599249993*weight[0]*rho[5]-0.03571428571428571*rho[4]*weight[4]+0.074535599249993*rho[3]*weight[4]+0.04303314829119353*rho[2]*weight[4]+0.04303314829119353*rho[1]*weight[4]+0.074535599249993*rho[0]*weight[4]+0.074535599249993*weight[3]*rho[4]+0.04303314829119353*weight[2]*rho[4]+0.04303314829119353*weight[1]*rho[4]+0.074535599249993*weight[0]*rho[4]+0.05*rho[3]*weight[3]+0.08660254037844384*rho[2]*weight[3]+0.08660254037844384*rho[1]*weight[3]+0.08333333333333333*rho[0]*weight[3]+0.08660254037844384*weight[2]*rho[3]+0.08660254037844384*weight[1]*rho[3]+0.08333333333333333*weight[0]*rho[3]-0.016666666666666666*rho[2]*weight[2]+0.08333333333333333*rho[1]*weight[2]+0.04811252243246881*rho[0]*weight[2]+0.08333333333333333*weight[1]*rho[2]+0.04811252243246881*weight[0]*rho[2]-0.016666666666666666*rho[1]*weight[1]+0.04811252243246881*rho[0]*weight[1]+0.04811252243246881*weight[0]*rho[1]-0.08333333333333333*rho[0]*weight[0]); + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[7]],__double_as_longlong(1.9364916731037085*phiBC[7]-1.9364916731037085*phiBC[6]+1.118033988749895*phiBC[5]+1.118033988749895*phiBC[4]-1.5*phiBC[3]-0.8660254037844386*phiBC[2]+0.8660254037844386*phiBC[1]+0.5*phiBC[0])); #else - bsrc[nodeOff+globalIdxs[7]] += 0.030952380952380953*rho[7]*weight[7]+0.06666666666666667*rho[6]*weight[7]+0.07560539239387958*rho[5]*weight[7]+0.03849001794597506*rho[4]*weight[7]+0.07745966692414834*rho[3]*weight[7]+0.07453559924999299*rho[2]*weight[7]+0.07453559924999299*rho[1]*weight[7]+0.04303314829119352*rho[0]*weight[7]+0.06666666666666667*weight[6]*rho[7]+0.07560539239387958*weight[5]*rho[7]+0.03849001794597506*weight[4]*rho[7]+0.07745966692414834*weight[3]*rho[7]+0.07453559924999299*weight[2]*rho[7]+0.07453559924999299*weight[1]*rho[7]+0.04303314829119352*weight[0]*rho[7]+0.030952380952380953*rho[6]*weight[6]+0.03849001794597506*rho[5]*weight[6]+0.07560539239387958*rho[4]*weight[6]+0.07745966692414834*rho[3]*weight[6]+0.07453559924999299*rho[2]*weight[6]+0.07453559924999299*rho[1]*weight[6]+0.04303314829119352*rho[0]*weight[6]+0.03849001794597506*weight[5]*rho[6]+0.07560539239387958*weight[4]*rho[6]+0.07745966692414834*weight[3]*rho[6]+0.07453559924999299*weight[2]*rho[6]+0.07453559924999299*weight[1]*rho[6]+0.04303314829119352*weight[0]*rho[6]-0.03571428571428571*rho[5]*weight[5]+0.074535599249993*rho[3]*weight[5]+0.04303314829119353*rho[2]*weight[5]+0.04303314829119353*rho[1]*weight[5]+0.074535599249993*rho[0]*weight[5]+0.074535599249993*weight[3]*rho[5]+0.04303314829119353*weight[2]*rho[5]+0.04303314829119353*weight[1]*rho[5]+0.074535599249993*weight[0]*rho[5]-0.03571428571428571*rho[4]*weight[4]+0.074535599249993*rho[3]*weight[4]+0.04303314829119353*rho[2]*weight[4]+0.04303314829119353*rho[1]*weight[4]+0.074535599249993*rho[0]*weight[4]+0.074535599249993*weight[3]*rho[4]+0.04303314829119353*weight[2]*rho[4]+0.04303314829119353*weight[1]*rho[4]+0.074535599249993*weight[0]*rho[4]+0.05*rho[3]*weight[3]+0.08660254037844384*rho[2]*weight[3]+0.08660254037844384*rho[1]*weight[3]+0.08333333333333333*rho[0]*weight[3]+0.08660254037844384*weight[2]*rho[3]+0.08660254037844384*weight[1]*rho[3]+0.08333333333333333*weight[0]*rho[3]-0.016666666666666666*rho[2]*weight[2]+0.08333333333333333*rho[1]*weight[2]+0.04811252243246881*rho[0]*weight[2]+0.08333333333333333*weight[1]*rho[2]+0.04811252243246881*weight[0]*rho[2]-0.016666666666666666*rho[1]*weight[1]+0.04811252243246881*rho[0]*weight[1]+0.04811252243246881*weight[0]*rho[1]-0.08333333333333333*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[7]] = 1.9364916731037085*phiBC[7]-1.9364916731037085*phiBC[6]+1.118033988749895*phiBC[5]+1.118033988749895*phiBC[4]-1.5*phiBC[3]-0.8660254037844386*phiBC[2]+0.8660254037844386*phiBC[1]+0.5*phiBC[0]; #endif } -GKYL_CU_DH void fem_parproj_src_stencil_weighted_2x_ser_p1_upy_nondirichlety(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +GKYL_CU_DH void fem_parproj_src_stencil_weighted_2x_ser_p1_upy_dirichlet_skiny(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) { // rho: right side source. // weight: Weight in the projection operation. - // phiBC: Dirichlet boundary potential, given as a DG expansion in the ghost cell (volume). + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. // nodeOff: node offset (prob idx * global number of nodes). // globalIdxs: global linear index of each basis function/node in current cell. // bsrc: global right side source vector. @@ -2002,23 +2946,23 @@ GKYL_CU_DH void fem_parproj_src_stencil_weighted_2x_ser_p1_upy_nondirichlety(con bsrc[nodeOff+globalIdxs[1]] += 0.25*rho[3]*weight[3]+0.14433756729740643*rho[2]*weight[3]-0.14433756729740643*rho[1]*weight[3]-0.08333333333333333*rho[0]*weight[3]+0.14433756729740643*weight[2]*rho[3]-0.14433756729740643*weight[1]*rho[3]-0.08333333333333333*weight[0]*rho[3]+0.25*rho[2]*weight[2]-0.08333333333333333*rho[1]*weight[2]-0.14433756729740643*rho[0]*weight[2]-0.08333333333333333*weight[1]*rho[2]-0.14433756729740643*weight[0]*rho[2]+0.25*rho[1]*weight[1]+0.14433756729740643*rho[0]*weight[1]+0.14433756729740643*weight[0]*rho[1]+0.25*rho[0]*weight[0]; #endif #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[2]],0.25*rho[3]*weight[3]-0.14433756729740643*rho[2]*weight[3]+0.14433756729740643*rho[1]*weight[3]-0.08333333333333333*rho[0]*weight[3]-0.14433756729740643*weight[2]*rho[3]+0.14433756729740643*weight[1]*rho[3]-0.08333333333333333*weight[0]*rho[3]+0.25*rho[2]*weight[2]-0.08333333333333333*rho[1]*weight[2]+0.14433756729740643*rho[0]*weight[2]-0.08333333333333333*weight[1]*rho[2]+0.14433756729740643*weight[0]*rho[2]+0.25*rho[1]*weight[1]-0.14433756729740643*rho[0]*weight[1]-0.14433756729740643*weight[0]*rho[1]+0.25*rho[0]*weight[0]); + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[2]],__double_as_longlong(-(1.5*phiBC[3])+0.8660254037844386*phiBC[2]-0.8660254037844386*phiBC[1]+0.5*phiBC[0])); #else - bsrc[nodeOff+globalIdxs[2]] += 0.25*rho[3]*weight[3]-0.14433756729740643*rho[2]*weight[3]+0.14433756729740643*rho[1]*weight[3]-0.08333333333333333*rho[0]*weight[3]-0.14433756729740643*weight[2]*rho[3]+0.14433756729740643*weight[1]*rho[3]-0.08333333333333333*weight[0]*rho[3]+0.25*rho[2]*weight[2]-0.08333333333333333*rho[1]*weight[2]+0.14433756729740643*rho[0]*weight[2]-0.08333333333333333*weight[1]*rho[2]+0.14433756729740643*weight[0]*rho[2]+0.25*rho[1]*weight[1]-0.14433756729740643*rho[0]*weight[1]-0.14433756729740643*weight[0]*rho[1]+0.25*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[2]] = -(1.5*phiBC[3])+0.8660254037844386*phiBC[2]-0.8660254037844386*phiBC[1]+0.5*phiBC[0]; #endif #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[3]],0.25*rho[3]*weight[3]+0.14433756729740643*rho[2]*weight[3]+0.14433756729740643*rho[1]*weight[3]+0.08333333333333333*rho[0]*weight[3]+0.14433756729740643*weight[2]*rho[3]+0.14433756729740643*weight[1]*rho[3]+0.08333333333333333*weight[0]*rho[3]+0.25*rho[2]*weight[2]+0.08333333333333333*rho[1]*weight[2]+0.14433756729740643*rho[0]*weight[2]+0.08333333333333333*weight[1]*rho[2]+0.14433756729740643*weight[0]*rho[2]+0.25*rho[1]*weight[1]+0.14433756729740643*rho[0]*weight[1]+0.14433756729740643*weight[0]*rho[1]+0.25*rho[0]*weight[0]); + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[3]],__double_as_longlong(1.5*phiBC[3]+0.8660254037844386*phiBC[2]+0.8660254037844386*phiBC[1]+0.5*phiBC[0])); #else - bsrc[nodeOff+globalIdxs[3]] += 0.25*rho[3]*weight[3]+0.14433756729740643*rho[2]*weight[3]+0.14433756729740643*rho[1]*weight[3]+0.08333333333333333*rho[0]*weight[3]+0.14433756729740643*weight[2]*rho[3]+0.14433756729740643*weight[1]*rho[3]+0.08333333333333333*weight[0]*rho[3]+0.25*rho[2]*weight[2]+0.08333333333333333*rho[1]*weight[2]+0.14433756729740643*rho[0]*weight[2]+0.08333333333333333*weight[1]*rho[2]+0.14433756729740643*weight[0]*rho[2]+0.25*rho[1]*weight[1]+0.14433756729740643*rho[0]*weight[1]+0.14433756729740643*weight[0]*rho[1]+0.25*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[3]] = 1.5*phiBC[3]+0.8660254037844386*phiBC[2]+0.8660254037844386*phiBC[1]+0.5*phiBC[0]; #endif } -GKYL_CU_DH void fem_parproj_src_stencil_weighted_2x_ser_p2_upy_nondirichlety(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +GKYL_CU_DH void fem_parproj_src_stencil_weighted_2x_ser_p2_upy_dirichlet_skiny(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) { // rho: right side source. // weight: Weight in the projection operation. - // phiBC: Dirichlet boundary potential, given as a DG expansion in the ghost cell (volume). + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. // nodeOff: node offset (prob idx * global number of nodes). // globalIdxs: global linear index of each basis function/node in current cell. // bsrc: global right side source vector. @@ -2049,164 +2993,244 @@ GKYL_CU_DH void fem_parproj_src_stencil_weighted_2x_ser_p2_upy_nondirichlety(con bsrc[nodeOff+globalIdxs[4]] += 0.23809523809523808*rho[7]*weight[7]+0.1374643498070538*rho[5]*weight[7]-0.07698003589195011*rho[4]*weight[7]-0.14907119849998599*rho[1]*weight[7]-0.08606629658238704*rho[0]*weight[7]+0.1374643498070538*weight[5]*rho[7]-0.07698003589195011*weight[4]*rho[7]-0.14907119849998599*weight[1]*rho[7]-0.08606629658238704*weight[0]*rho[7]+0.2*rho[6]*weight[6]+0.10327955589886445*rho[3]*weight[6]+0.10327955589886445*weight[3]*rho[6]+0.23809523809523808*rho[5]*weight[5]-0.08606629658238706*rho[1]*weight[5]-0.149071198499986*rho[0]*weight[5]-0.08606629658238706*weight[1]*rho[5]-0.149071198499986*weight[0]*rho[5]+0.3333333333333333*rho[4]*weight[4]+0.1721325931647741*rho[1]*weight[4]+0.1721325931647741*weight[1]*rho[4]+0.2*rho[3]*weight[3]+0.11547005383792514*rho[2]*weight[3]+0.11547005383792514*weight[2]*rho[3]+0.2*rho[2]*weight[2]+0.3333333333333333*rho[1]*weight[1]+0.19245008972987523*rho[0]*weight[1]+0.19245008972987523*weight[0]*rho[1]+0.3333333333333333*rho[0]*weight[0]; #endif #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[5]],0.030952380952380953*rho[7]*weight[7]-0.06666666666666667*rho[6]*weight[7]-0.07560539239387958*rho[5]*weight[7]-0.03849001794597506*rho[4]*weight[7]+0.07745966692414834*rho[3]*weight[7]-0.07453559924999299*rho[2]*weight[7]+0.07453559924999299*rho[1]*weight[7]-0.04303314829119352*rho[0]*weight[7]-0.06666666666666667*weight[6]*rho[7]-0.07560539239387958*weight[5]*rho[7]-0.03849001794597506*weight[4]*rho[7]+0.07745966692414834*weight[3]*rho[7]-0.07453559924999299*weight[2]*rho[7]+0.07453559924999299*weight[1]*rho[7]-0.04303314829119352*weight[0]*rho[7]+0.030952380952380953*rho[6]*weight[6]+0.03849001794597506*rho[5]*weight[6]+0.07560539239387958*rho[4]*weight[6]-0.07745966692414834*rho[3]*weight[6]+0.07453559924999299*rho[2]*weight[6]-0.07453559924999299*rho[1]*weight[6]+0.04303314829119352*rho[0]*weight[6]+0.03849001794597506*weight[5]*rho[6]+0.07560539239387958*weight[4]*rho[6]-0.07745966692414834*weight[3]*rho[6]+0.07453559924999299*weight[2]*rho[6]-0.07453559924999299*weight[1]*rho[6]+0.04303314829119352*weight[0]*rho[6]-0.03571428571428571*rho[5]*weight[5]-0.074535599249993*rho[3]*weight[5]+0.04303314829119353*rho[2]*weight[5]-0.04303314829119353*rho[1]*weight[5]+0.074535599249993*rho[0]*weight[5]-0.074535599249993*weight[3]*rho[5]+0.04303314829119353*weight[2]*rho[5]-0.04303314829119353*weight[1]*rho[5]+0.074535599249993*weight[0]*rho[5]-0.03571428571428571*rho[4]*weight[4]-0.074535599249993*rho[3]*weight[4]+0.04303314829119353*rho[2]*weight[4]-0.04303314829119353*rho[1]*weight[4]+0.074535599249993*rho[0]*weight[4]-0.074535599249993*weight[3]*rho[4]+0.04303314829119353*weight[2]*rho[4]-0.04303314829119353*weight[1]*rho[4]+0.074535599249993*weight[0]*rho[4]+0.05*rho[3]*weight[3]-0.08660254037844384*rho[2]*weight[3]+0.08660254037844384*rho[1]*weight[3]-0.08333333333333333*rho[0]*weight[3]-0.08660254037844384*weight[2]*rho[3]+0.08660254037844384*weight[1]*rho[3]-0.08333333333333333*weight[0]*rho[3]-0.016666666666666666*rho[2]*weight[2]-0.08333333333333333*rho[1]*weight[2]+0.04811252243246881*rho[0]*weight[2]-0.08333333333333333*weight[1]*rho[2]+0.04811252243246881*weight[0]*rho[2]-0.016666666666666666*rho[1]*weight[1]-0.04811252243246881*rho[0]*weight[1]-0.04811252243246881*weight[0]*rho[1]-0.08333333333333333*rho[0]*weight[0]); + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[5]],__double_as_longlong(-(1.9364916731037085*phiBC[7])+1.9364916731037085*phiBC[6]+1.118033988749895*phiBC[5]+1.118033988749895*phiBC[4]-1.5*phiBC[3]+0.8660254037844386*phiBC[2]-0.8660254037844386*phiBC[1]+0.5*phiBC[0])); #else - bsrc[nodeOff+globalIdxs[5]] += 0.030952380952380953*rho[7]*weight[7]-0.06666666666666667*rho[6]*weight[7]-0.07560539239387958*rho[5]*weight[7]-0.03849001794597506*rho[4]*weight[7]+0.07745966692414834*rho[3]*weight[7]-0.07453559924999299*rho[2]*weight[7]+0.07453559924999299*rho[1]*weight[7]-0.04303314829119352*rho[0]*weight[7]-0.06666666666666667*weight[6]*rho[7]-0.07560539239387958*weight[5]*rho[7]-0.03849001794597506*weight[4]*rho[7]+0.07745966692414834*weight[3]*rho[7]-0.07453559924999299*weight[2]*rho[7]+0.07453559924999299*weight[1]*rho[7]-0.04303314829119352*weight[0]*rho[7]+0.030952380952380953*rho[6]*weight[6]+0.03849001794597506*rho[5]*weight[6]+0.07560539239387958*rho[4]*weight[6]-0.07745966692414834*rho[3]*weight[6]+0.07453559924999299*rho[2]*weight[6]-0.07453559924999299*rho[1]*weight[6]+0.04303314829119352*rho[0]*weight[6]+0.03849001794597506*weight[5]*rho[6]+0.07560539239387958*weight[4]*rho[6]-0.07745966692414834*weight[3]*rho[6]+0.07453559924999299*weight[2]*rho[6]-0.07453559924999299*weight[1]*rho[6]+0.04303314829119352*weight[0]*rho[6]-0.03571428571428571*rho[5]*weight[5]-0.074535599249993*rho[3]*weight[5]+0.04303314829119353*rho[2]*weight[5]-0.04303314829119353*rho[1]*weight[5]+0.074535599249993*rho[0]*weight[5]-0.074535599249993*weight[3]*rho[5]+0.04303314829119353*weight[2]*rho[5]-0.04303314829119353*weight[1]*rho[5]+0.074535599249993*weight[0]*rho[5]-0.03571428571428571*rho[4]*weight[4]-0.074535599249993*rho[3]*weight[4]+0.04303314829119353*rho[2]*weight[4]-0.04303314829119353*rho[1]*weight[4]+0.074535599249993*rho[0]*weight[4]-0.074535599249993*weight[3]*rho[4]+0.04303314829119353*weight[2]*rho[4]-0.04303314829119353*weight[1]*rho[4]+0.074535599249993*weight[0]*rho[4]+0.05*rho[3]*weight[3]-0.08660254037844384*rho[2]*weight[3]+0.08660254037844384*rho[1]*weight[3]-0.08333333333333333*rho[0]*weight[3]-0.08660254037844384*weight[2]*rho[3]+0.08660254037844384*weight[1]*rho[3]-0.08333333333333333*weight[0]*rho[3]-0.016666666666666666*rho[2]*weight[2]-0.08333333333333333*rho[1]*weight[2]+0.04811252243246881*rho[0]*weight[2]-0.08333333333333333*weight[1]*rho[2]+0.04811252243246881*weight[0]*rho[2]-0.016666666666666666*rho[1]*weight[1]-0.04811252243246881*rho[0]*weight[1]-0.04811252243246881*weight[0]*rho[1]-0.08333333333333333*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[5]] = -(1.9364916731037085*phiBC[7])+1.9364916731037085*phiBC[6]+1.118033988749895*phiBC[5]+1.118033988749895*phiBC[4]-1.5*phiBC[3]+0.8660254037844386*phiBC[2]-0.8660254037844386*phiBC[1]+0.5*phiBC[0]; #endif #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[6]],0.2*rho[7]*weight[7]+0.10327955589886445*rho[3]*weight[7]+0.10327955589886445*weight[3]*rho[7]+0.23809523809523808*rho[6]*weight[6]-0.07698003589195011*rho[5]*weight[6]+0.1374643498070538*rho[4]*weight[6]-0.14907119849998599*rho[2]*weight[6]-0.08606629658238704*rho[0]*weight[6]-0.07698003589195011*weight[5]*rho[6]+0.1374643498070538*weight[4]*rho[6]-0.14907119849998599*weight[2]*rho[6]-0.08606629658238704*weight[0]*rho[6]+0.3333333333333333*rho[5]*weight[5]+0.1721325931647741*rho[2]*weight[5]+0.1721325931647741*weight[2]*rho[5]+0.23809523809523808*rho[4]*weight[4]-0.08606629658238706*rho[2]*weight[4]-0.149071198499986*rho[0]*weight[4]-0.08606629658238706*weight[2]*rho[4]-0.149071198499986*weight[0]*rho[4]+0.2*rho[3]*weight[3]+0.11547005383792514*rho[1]*weight[3]+0.11547005383792514*weight[1]*rho[3]+0.3333333333333333*rho[2]*weight[2]+0.19245008972987523*rho[0]*weight[2]+0.19245008972987523*weight[0]*rho[2]+0.2*rho[1]*weight[1]+0.3333333333333333*rho[0]*weight[0]); + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[6]],__double_as_longlong(-(0.9682458365518543*phiBC[6])+1.118033988749895*phiBC[5]-0.5590169943749475*phiBC[4]+0.8660254037844386*phiBC[2]+0.5*phiBC[0])); #else - bsrc[nodeOff+globalIdxs[6]] += 0.2*rho[7]*weight[7]+0.10327955589886445*rho[3]*weight[7]+0.10327955589886445*weight[3]*rho[7]+0.23809523809523808*rho[6]*weight[6]-0.07698003589195011*rho[5]*weight[6]+0.1374643498070538*rho[4]*weight[6]-0.14907119849998599*rho[2]*weight[6]-0.08606629658238704*rho[0]*weight[6]-0.07698003589195011*weight[5]*rho[6]+0.1374643498070538*weight[4]*rho[6]-0.14907119849998599*weight[2]*rho[6]-0.08606629658238704*weight[0]*rho[6]+0.3333333333333333*rho[5]*weight[5]+0.1721325931647741*rho[2]*weight[5]+0.1721325931647741*weight[2]*rho[5]+0.23809523809523808*rho[4]*weight[4]-0.08606629658238706*rho[2]*weight[4]-0.149071198499986*rho[0]*weight[4]-0.08606629658238706*weight[2]*rho[4]-0.149071198499986*weight[0]*rho[4]+0.2*rho[3]*weight[3]+0.11547005383792514*rho[1]*weight[3]+0.11547005383792514*weight[1]*rho[3]+0.3333333333333333*rho[2]*weight[2]+0.19245008972987523*rho[0]*weight[2]+0.19245008972987523*weight[0]*rho[2]+0.2*rho[1]*weight[1]+0.3333333333333333*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[6]] = -(0.9682458365518543*phiBC[6])+1.118033988749895*phiBC[5]-0.5590169943749475*phiBC[4]+0.8660254037844386*phiBC[2]+0.5*phiBC[0]; #endif #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[7]],0.030952380952380953*rho[7]*weight[7]+0.06666666666666667*rho[6]*weight[7]+0.07560539239387958*rho[5]*weight[7]+0.03849001794597506*rho[4]*weight[7]+0.07745966692414834*rho[3]*weight[7]+0.07453559924999299*rho[2]*weight[7]+0.07453559924999299*rho[1]*weight[7]+0.04303314829119352*rho[0]*weight[7]+0.06666666666666667*weight[6]*rho[7]+0.07560539239387958*weight[5]*rho[7]+0.03849001794597506*weight[4]*rho[7]+0.07745966692414834*weight[3]*rho[7]+0.07453559924999299*weight[2]*rho[7]+0.07453559924999299*weight[1]*rho[7]+0.04303314829119352*weight[0]*rho[7]+0.030952380952380953*rho[6]*weight[6]+0.03849001794597506*rho[5]*weight[6]+0.07560539239387958*rho[4]*weight[6]+0.07745966692414834*rho[3]*weight[6]+0.07453559924999299*rho[2]*weight[6]+0.07453559924999299*rho[1]*weight[6]+0.04303314829119352*rho[0]*weight[6]+0.03849001794597506*weight[5]*rho[6]+0.07560539239387958*weight[4]*rho[6]+0.07745966692414834*weight[3]*rho[6]+0.07453559924999299*weight[2]*rho[6]+0.07453559924999299*weight[1]*rho[6]+0.04303314829119352*weight[0]*rho[6]-0.03571428571428571*rho[5]*weight[5]+0.074535599249993*rho[3]*weight[5]+0.04303314829119353*rho[2]*weight[5]+0.04303314829119353*rho[1]*weight[5]+0.074535599249993*rho[0]*weight[5]+0.074535599249993*weight[3]*rho[5]+0.04303314829119353*weight[2]*rho[5]+0.04303314829119353*weight[1]*rho[5]+0.074535599249993*weight[0]*rho[5]-0.03571428571428571*rho[4]*weight[4]+0.074535599249993*rho[3]*weight[4]+0.04303314829119353*rho[2]*weight[4]+0.04303314829119353*rho[1]*weight[4]+0.074535599249993*rho[0]*weight[4]+0.074535599249993*weight[3]*rho[4]+0.04303314829119353*weight[2]*rho[4]+0.04303314829119353*weight[1]*rho[4]+0.074535599249993*weight[0]*rho[4]+0.05*rho[3]*weight[3]+0.08660254037844384*rho[2]*weight[3]+0.08660254037844384*rho[1]*weight[3]+0.08333333333333333*rho[0]*weight[3]+0.08660254037844384*weight[2]*rho[3]+0.08660254037844384*weight[1]*rho[3]+0.08333333333333333*weight[0]*rho[3]-0.016666666666666666*rho[2]*weight[2]+0.08333333333333333*rho[1]*weight[2]+0.04811252243246881*rho[0]*weight[2]+0.08333333333333333*weight[1]*rho[2]+0.04811252243246881*weight[0]*rho[2]-0.016666666666666666*rho[1]*weight[1]+0.04811252243246881*rho[0]*weight[1]+0.04811252243246881*weight[0]*rho[1]-0.08333333333333333*rho[0]*weight[0]); + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[7]],__double_as_longlong(1.9364916731037085*phiBC[7]+1.9364916731037085*phiBC[6]+1.118033988749895*phiBC[5]+1.118033988749895*phiBC[4]+1.5*phiBC[3]+0.8660254037844386*phiBC[2]+0.8660254037844386*phiBC[1]+0.5*phiBC[0])); #else - bsrc[nodeOff+globalIdxs[7]] += 0.030952380952380953*rho[7]*weight[7]+0.06666666666666667*rho[6]*weight[7]+0.07560539239387958*rho[5]*weight[7]+0.03849001794597506*rho[4]*weight[7]+0.07745966692414834*rho[3]*weight[7]+0.07453559924999299*rho[2]*weight[7]+0.07453559924999299*rho[1]*weight[7]+0.04303314829119352*rho[0]*weight[7]+0.06666666666666667*weight[6]*rho[7]+0.07560539239387958*weight[5]*rho[7]+0.03849001794597506*weight[4]*rho[7]+0.07745966692414834*weight[3]*rho[7]+0.07453559924999299*weight[2]*rho[7]+0.07453559924999299*weight[1]*rho[7]+0.04303314829119352*weight[0]*rho[7]+0.030952380952380953*rho[6]*weight[6]+0.03849001794597506*rho[5]*weight[6]+0.07560539239387958*rho[4]*weight[6]+0.07745966692414834*rho[3]*weight[6]+0.07453559924999299*rho[2]*weight[6]+0.07453559924999299*rho[1]*weight[6]+0.04303314829119352*rho[0]*weight[6]+0.03849001794597506*weight[5]*rho[6]+0.07560539239387958*weight[4]*rho[6]+0.07745966692414834*weight[3]*rho[6]+0.07453559924999299*weight[2]*rho[6]+0.07453559924999299*weight[1]*rho[6]+0.04303314829119352*weight[0]*rho[6]-0.03571428571428571*rho[5]*weight[5]+0.074535599249993*rho[3]*weight[5]+0.04303314829119353*rho[2]*weight[5]+0.04303314829119353*rho[1]*weight[5]+0.074535599249993*rho[0]*weight[5]+0.074535599249993*weight[3]*rho[5]+0.04303314829119353*weight[2]*rho[5]+0.04303314829119353*weight[1]*rho[5]+0.074535599249993*weight[0]*rho[5]-0.03571428571428571*rho[4]*weight[4]+0.074535599249993*rho[3]*weight[4]+0.04303314829119353*rho[2]*weight[4]+0.04303314829119353*rho[1]*weight[4]+0.074535599249993*rho[0]*weight[4]+0.074535599249993*weight[3]*rho[4]+0.04303314829119353*weight[2]*rho[4]+0.04303314829119353*weight[1]*rho[4]+0.074535599249993*weight[0]*rho[4]+0.05*rho[3]*weight[3]+0.08660254037844384*rho[2]*weight[3]+0.08660254037844384*rho[1]*weight[3]+0.08333333333333333*rho[0]*weight[3]+0.08660254037844384*weight[2]*rho[3]+0.08660254037844384*weight[1]*rho[3]+0.08333333333333333*weight[0]*rho[3]-0.016666666666666666*rho[2]*weight[2]+0.08333333333333333*rho[1]*weight[2]+0.04811252243246881*rho[0]*weight[2]+0.08333333333333333*weight[1]*rho[2]+0.04811252243246881*weight[0]*rho[2]-0.016666666666666666*rho[1]*weight[1]+0.04811252243246881*rho[0]*weight[1]+0.04811252243246881*weight[0]*rho[1]-0.08333333333333333*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[7]] = 1.9364916731037085*phiBC[7]+1.9364916731037085*phiBC[6]+1.118033988749895*phiBC[5]+1.118033988749895*phiBC[4]+1.5*phiBC[3]+0.8660254037844386*phiBC[2]+0.8660254037844386*phiBC[1]+0.5*phiBC[0]; + #endif + +} + +GKYL_CU_DH void fem_parproj_src_stencil_weighted_3x_ser_p1_inz_nondirichletz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +{ + // rho: right side source. + // weight: Weight in the projection operation. + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. + // nodeOff: node offset (prob idx * global number of nodes). + // globalIdxs: global linear index of each basis function/node in current cell. + // bsrc: global right side source vector. + + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[0]],0.125*rho[7]*weight[7]-0.0721687836487032*rho[6]*weight[7]-0.0721687836487032*rho[5]*weight[7]-0.0721687836487032*rho[4]*weight[7]+0.041666666666666664*rho[3]*weight[7]+0.041666666666666664*rho[2]*weight[7]+0.041666666666666664*rho[1]*weight[7]-0.024056261216234404*rho[0]*weight[7]-0.0721687836487032*weight[6]*rho[7]-0.0721687836487032*weight[5]*rho[7]-0.0721687836487032*weight[4]*rho[7]+0.041666666666666664*weight[3]*rho[7]+0.041666666666666664*weight[2]*rho[7]+0.041666666666666664*weight[1]*rho[7]-0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]+0.041666666666666664*rho[5]*weight[6]+0.041666666666666664*rho[4]*weight[6]-0.0721687836487032*rho[3]*weight[6]-0.0721687836487032*rho[2]*weight[6]-0.024056261216234404*rho[1]*weight[6]+0.041666666666666664*rho[0]*weight[6]+0.041666666666666664*weight[5]*rho[6]+0.041666666666666664*weight[4]*rho[6]-0.0721687836487032*weight[3]*rho[6]-0.0721687836487032*weight[2]*rho[6]-0.024056261216234404*weight[1]*rho[6]+0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]+0.041666666666666664*rho[4]*weight[5]-0.0721687836487032*rho[3]*weight[5]-0.024056261216234404*rho[2]*weight[5]-0.0721687836487032*rho[1]*weight[5]+0.041666666666666664*rho[0]*weight[5]+0.041666666666666664*weight[4]*rho[5]-0.0721687836487032*weight[3]*rho[5]-0.024056261216234404*weight[2]*rho[5]-0.0721687836487032*weight[1]*rho[5]+0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]-0.024056261216234404*rho[3]*weight[4]-0.0721687836487032*rho[2]*weight[4]-0.0721687836487032*rho[1]*weight[4]+0.041666666666666664*rho[0]*weight[4]-0.024056261216234404*weight[3]*rho[4]-0.0721687836487032*weight[2]*rho[4]-0.0721687836487032*weight[1]*rho[4]+0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]+0.041666666666666664*rho[2]*weight[3]+0.041666666666666664*rho[1]*weight[3]-0.0721687836487032*rho[0]*weight[3]+0.041666666666666664*weight[2]*rho[3]+0.041666666666666664*weight[1]*rho[3]-0.0721687836487032*weight[0]*rho[3]+0.125*rho[2]*weight[2]+0.041666666666666664*rho[1]*weight[2]-0.0721687836487032*rho[0]*weight[2]+0.041666666666666664*weight[1]*rho[2]-0.0721687836487032*weight[0]*rho[2]+0.125*rho[1]*weight[1]-0.0721687836487032*rho[0]*weight[1]-0.0721687836487032*weight[0]*rho[1]+0.125*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[0]] += 0.125*rho[7]*weight[7]-0.0721687836487032*rho[6]*weight[7]-0.0721687836487032*rho[5]*weight[7]-0.0721687836487032*rho[4]*weight[7]+0.041666666666666664*rho[3]*weight[7]+0.041666666666666664*rho[2]*weight[7]+0.041666666666666664*rho[1]*weight[7]-0.024056261216234404*rho[0]*weight[7]-0.0721687836487032*weight[6]*rho[7]-0.0721687836487032*weight[5]*rho[7]-0.0721687836487032*weight[4]*rho[7]+0.041666666666666664*weight[3]*rho[7]+0.041666666666666664*weight[2]*rho[7]+0.041666666666666664*weight[1]*rho[7]-0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]+0.041666666666666664*rho[5]*weight[6]+0.041666666666666664*rho[4]*weight[6]-0.0721687836487032*rho[3]*weight[6]-0.0721687836487032*rho[2]*weight[6]-0.024056261216234404*rho[1]*weight[6]+0.041666666666666664*rho[0]*weight[6]+0.041666666666666664*weight[5]*rho[6]+0.041666666666666664*weight[4]*rho[6]-0.0721687836487032*weight[3]*rho[6]-0.0721687836487032*weight[2]*rho[6]-0.024056261216234404*weight[1]*rho[6]+0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]+0.041666666666666664*rho[4]*weight[5]-0.0721687836487032*rho[3]*weight[5]-0.024056261216234404*rho[2]*weight[5]-0.0721687836487032*rho[1]*weight[5]+0.041666666666666664*rho[0]*weight[5]+0.041666666666666664*weight[4]*rho[5]-0.0721687836487032*weight[3]*rho[5]-0.024056261216234404*weight[2]*rho[5]-0.0721687836487032*weight[1]*rho[5]+0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]-0.024056261216234404*rho[3]*weight[4]-0.0721687836487032*rho[2]*weight[4]-0.0721687836487032*rho[1]*weight[4]+0.041666666666666664*rho[0]*weight[4]-0.024056261216234404*weight[3]*rho[4]-0.0721687836487032*weight[2]*rho[4]-0.0721687836487032*weight[1]*rho[4]+0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]+0.041666666666666664*rho[2]*weight[3]+0.041666666666666664*rho[1]*weight[3]-0.0721687836487032*rho[0]*weight[3]+0.041666666666666664*weight[2]*rho[3]+0.041666666666666664*weight[1]*rho[3]-0.0721687836487032*weight[0]*rho[3]+0.125*rho[2]*weight[2]+0.041666666666666664*rho[1]*weight[2]-0.0721687836487032*rho[0]*weight[2]+0.041666666666666664*weight[1]*rho[2]-0.0721687836487032*weight[0]*rho[2]+0.125*rho[1]*weight[1]-0.0721687836487032*rho[0]*weight[1]-0.0721687836487032*weight[0]*rho[1]+0.125*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[1]],0.125*rho[7]*weight[7]+0.0721687836487032*rho[6]*weight[7]-0.0721687836487032*rho[5]*weight[7]-0.0721687836487032*rho[4]*weight[7]-0.041666666666666664*rho[3]*weight[7]-0.041666666666666664*rho[2]*weight[7]+0.041666666666666664*rho[1]*weight[7]+0.024056261216234404*rho[0]*weight[7]+0.0721687836487032*weight[6]*rho[7]-0.0721687836487032*weight[5]*rho[7]-0.0721687836487032*weight[4]*rho[7]-0.041666666666666664*weight[3]*rho[7]-0.041666666666666664*weight[2]*rho[7]+0.041666666666666664*weight[1]*rho[7]+0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]-0.041666666666666664*rho[5]*weight[6]-0.041666666666666664*rho[4]*weight[6]-0.0721687836487032*rho[3]*weight[6]-0.0721687836487032*rho[2]*weight[6]+0.024056261216234404*rho[1]*weight[6]+0.041666666666666664*rho[0]*weight[6]-0.041666666666666664*weight[5]*rho[6]-0.041666666666666664*weight[4]*rho[6]-0.0721687836487032*weight[3]*rho[6]-0.0721687836487032*weight[2]*rho[6]+0.024056261216234404*weight[1]*rho[6]+0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]+0.041666666666666664*rho[4]*weight[5]+0.0721687836487032*rho[3]*weight[5]+0.024056261216234404*rho[2]*weight[5]-0.0721687836487032*rho[1]*weight[5]-0.041666666666666664*rho[0]*weight[5]+0.041666666666666664*weight[4]*rho[5]+0.0721687836487032*weight[3]*rho[5]+0.024056261216234404*weight[2]*rho[5]-0.0721687836487032*weight[1]*rho[5]-0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]+0.024056261216234404*rho[3]*weight[4]+0.0721687836487032*rho[2]*weight[4]-0.0721687836487032*rho[1]*weight[4]-0.041666666666666664*rho[0]*weight[4]+0.024056261216234404*weight[3]*rho[4]+0.0721687836487032*weight[2]*rho[4]-0.0721687836487032*weight[1]*rho[4]-0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]+0.041666666666666664*rho[2]*weight[3]-0.041666666666666664*rho[1]*weight[3]-0.0721687836487032*rho[0]*weight[3]+0.041666666666666664*weight[2]*rho[3]-0.041666666666666664*weight[1]*rho[3]-0.0721687836487032*weight[0]*rho[3]+0.125*rho[2]*weight[2]-0.041666666666666664*rho[1]*weight[2]-0.0721687836487032*rho[0]*weight[2]-0.041666666666666664*weight[1]*rho[2]-0.0721687836487032*weight[0]*rho[2]+0.125*rho[1]*weight[1]+0.0721687836487032*rho[0]*weight[1]+0.0721687836487032*weight[0]*rho[1]+0.125*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[1]] += 0.125*rho[7]*weight[7]+0.0721687836487032*rho[6]*weight[7]-0.0721687836487032*rho[5]*weight[7]-0.0721687836487032*rho[4]*weight[7]-0.041666666666666664*rho[3]*weight[7]-0.041666666666666664*rho[2]*weight[7]+0.041666666666666664*rho[1]*weight[7]+0.024056261216234404*rho[0]*weight[7]+0.0721687836487032*weight[6]*rho[7]-0.0721687836487032*weight[5]*rho[7]-0.0721687836487032*weight[4]*rho[7]-0.041666666666666664*weight[3]*rho[7]-0.041666666666666664*weight[2]*rho[7]+0.041666666666666664*weight[1]*rho[7]+0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]-0.041666666666666664*rho[5]*weight[6]-0.041666666666666664*rho[4]*weight[6]-0.0721687836487032*rho[3]*weight[6]-0.0721687836487032*rho[2]*weight[6]+0.024056261216234404*rho[1]*weight[6]+0.041666666666666664*rho[0]*weight[6]-0.041666666666666664*weight[5]*rho[6]-0.041666666666666664*weight[4]*rho[6]-0.0721687836487032*weight[3]*rho[6]-0.0721687836487032*weight[2]*rho[6]+0.024056261216234404*weight[1]*rho[6]+0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]+0.041666666666666664*rho[4]*weight[5]+0.0721687836487032*rho[3]*weight[5]+0.024056261216234404*rho[2]*weight[5]-0.0721687836487032*rho[1]*weight[5]-0.041666666666666664*rho[0]*weight[5]+0.041666666666666664*weight[4]*rho[5]+0.0721687836487032*weight[3]*rho[5]+0.024056261216234404*weight[2]*rho[5]-0.0721687836487032*weight[1]*rho[5]-0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]+0.024056261216234404*rho[3]*weight[4]+0.0721687836487032*rho[2]*weight[4]-0.0721687836487032*rho[1]*weight[4]-0.041666666666666664*rho[0]*weight[4]+0.024056261216234404*weight[3]*rho[4]+0.0721687836487032*weight[2]*rho[4]-0.0721687836487032*weight[1]*rho[4]-0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]+0.041666666666666664*rho[2]*weight[3]-0.041666666666666664*rho[1]*weight[3]-0.0721687836487032*rho[0]*weight[3]+0.041666666666666664*weight[2]*rho[3]-0.041666666666666664*weight[1]*rho[3]-0.0721687836487032*weight[0]*rho[3]+0.125*rho[2]*weight[2]-0.041666666666666664*rho[1]*weight[2]-0.0721687836487032*rho[0]*weight[2]-0.041666666666666664*weight[1]*rho[2]-0.0721687836487032*weight[0]*rho[2]+0.125*rho[1]*weight[1]+0.0721687836487032*rho[0]*weight[1]+0.0721687836487032*weight[0]*rho[1]+0.125*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[2]],0.125*rho[7]*weight[7]-0.0721687836487032*rho[6]*weight[7]+0.0721687836487032*rho[5]*weight[7]-0.0721687836487032*rho[4]*weight[7]-0.041666666666666664*rho[3]*weight[7]+0.041666666666666664*rho[2]*weight[7]-0.041666666666666664*rho[1]*weight[7]+0.024056261216234404*rho[0]*weight[7]-0.0721687836487032*weight[6]*rho[7]+0.0721687836487032*weight[5]*rho[7]-0.0721687836487032*weight[4]*rho[7]-0.041666666666666664*weight[3]*rho[7]+0.041666666666666664*weight[2]*rho[7]-0.041666666666666664*weight[1]*rho[7]+0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]-0.041666666666666664*rho[5]*weight[6]+0.041666666666666664*rho[4]*weight[6]+0.0721687836487032*rho[3]*weight[6]-0.0721687836487032*rho[2]*weight[6]+0.024056261216234404*rho[1]*weight[6]-0.041666666666666664*rho[0]*weight[6]-0.041666666666666664*weight[5]*rho[6]+0.041666666666666664*weight[4]*rho[6]+0.0721687836487032*weight[3]*rho[6]-0.0721687836487032*weight[2]*rho[6]+0.024056261216234404*weight[1]*rho[6]-0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]-0.041666666666666664*rho[4]*weight[5]-0.0721687836487032*rho[3]*weight[5]+0.024056261216234404*rho[2]*weight[5]-0.0721687836487032*rho[1]*weight[5]+0.041666666666666664*rho[0]*weight[5]-0.041666666666666664*weight[4]*rho[5]-0.0721687836487032*weight[3]*rho[5]+0.024056261216234404*weight[2]*rho[5]-0.0721687836487032*weight[1]*rho[5]+0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]+0.024056261216234404*rho[3]*weight[4]-0.0721687836487032*rho[2]*weight[4]+0.0721687836487032*rho[1]*weight[4]-0.041666666666666664*rho[0]*weight[4]+0.024056261216234404*weight[3]*rho[4]-0.0721687836487032*weight[2]*rho[4]+0.0721687836487032*weight[1]*rho[4]-0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]-0.041666666666666664*rho[2]*weight[3]+0.041666666666666664*rho[1]*weight[3]-0.0721687836487032*rho[0]*weight[3]-0.041666666666666664*weight[2]*rho[3]+0.041666666666666664*weight[1]*rho[3]-0.0721687836487032*weight[0]*rho[3]+0.125*rho[2]*weight[2]-0.041666666666666664*rho[1]*weight[2]+0.0721687836487032*rho[0]*weight[2]-0.041666666666666664*weight[1]*rho[2]+0.0721687836487032*weight[0]*rho[2]+0.125*rho[1]*weight[1]-0.0721687836487032*rho[0]*weight[1]-0.0721687836487032*weight[0]*rho[1]+0.125*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[2]] += 0.125*rho[7]*weight[7]-0.0721687836487032*rho[6]*weight[7]+0.0721687836487032*rho[5]*weight[7]-0.0721687836487032*rho[4]*weight[7]-0.041666666666666664*rho[3]*weight[7]+0.041666666666666664*rho[2]*weight[7]-0.041666666666666664*rho[1]*weight[7]+0.024056261216234404*rho[0]*weight[7]-0.0721687836487032*weight[6]*rho[7]+0.0721687836487032*weight[5]*rho[7]-0.0721687836487032*weight[4]*rho[7]-0.041666666666666664*weight[3]*rho[7]+0.041666666666666664*weight[2]*rho[7]-0.041666666666666664*weight[1]*rho[7]+0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]-0.041666666666666664*rho[5]*weight[6]+0.041666666666666664*rho[4]*weight[6]+0.0721687836487032*rho[3]*weight[6]-0.0721687836487032*rho[2]*weight[6]+0.024056261216234404*rho[1]*weight[6]-0.041666666666666664*rho[0]*weight[6]-0.041666666666666664*weight[5]*rho[6]+0.041666666666666664*weight[4]*rho[6]+0.0721687836487032*weight[3]*rho[6]-0.0721687836487032*weight[2]*rho[6]+0.024056261216234404*weight[1]*rho[6]-0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]-0.041666666666666664*rho[4]*weight[5]-0.0721687836487032*rho[3]*weight[5]+0.024056261216234404*rho[2]*weight[5]-0.0721687836487032*rho[1]*weight[5]+0.041666666666666664*rho[0]*weight[5]-0.041666666666666664*weight[4]*rho[5]-0.0721687836487032*weight[3]*rho[5]+0.024056261216234404*weight[2]*rho[5]-0.0721687836487032*weight[1]*rho[5]+0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]+0.024056261216234404*rho[3]*weight[4]-0.0721687836487032*rho[2]*weight[4]+0.0721687836487032*rho[1]*weight[4]-0.041666666666666664*rho[0]*weight[4]+0.024056261216234404*weight[3]*rho[4]-0.0721687836487032*weight[2]*rho[4]+0.0721687836487032*weight[1]*rho[4]-0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]-0.041666666666666664*rho[2]*weight[3]+0.041666666666666664*rho[1]*weight[3]-0.0721687836487032*rho[0]*weight[3]-0.041666666666666664*weight[2]*rho[3]+0.041666666666666664*weight[1]*rho[3]-0.0721687836487032*weight[0]*rho[3]+0.125*rho[2]*weight[2]-0.041666666666666664*rho[1]*weight[2]+0.0721687836487032*rho[0]*weight[2]-0.041666666666666664*weight[1]*rho[2]+0.0721687836487032*weight[0]*rho[2]+0.125*rho[1]*weight[1]-0.0721687836487032*rho[0]*weight[1]-0.0721687836487032*weight[0]*rho[1]+0.125*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[3]],0.125*rho[7]*weight[7]+0.0721687836487032*rho[6]*weight[7]+0.0721687836487032*rho[5]*weight[7]-0.0721687836487032*rho[4]*weight[7]+0.041666666666666664*rho[3]*weight[7]-0.041666666666666664*rho[2]*weight[7]-0.041666666666666664*rho[1]*weight[7]-0.024056261216234404*rho[0]*weight[7]+0.0721687836487032*weight[6]*rho[7]+0.0721687836487032*weight[5]*rho[7]-0.0721687836487032*weight[4]*rho[7]+0.041666666666666664*weight[3]*rho[7]-0.041666666666666664*weight[2]*rho[7]-0.041666666666666664*weight[1]*rho[7]-0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]+0.041666666666666664*rho[5]*weight[6]-0.041666666666666664*rho[4]*weight[6]+0.0721687836487032*rho[3]*weight[6]-0.0721687836487032*rho[2]*weight[6]-0.024056261216234404*rho[1]*weight[6]-0.041666666666666664*rho[0]*weight[6]+0.041666666666666664*weight[5]*rho[6]-0.041666666666666664*weight[4]*rho[6]+0.0721687836487032*weight[3]*rho[6]-0.0721687836487032*weight[2]*rho[6]-0.024056261216234404*weight[1]*rho[6]-0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]-0.041666666666666664*rho[4]*weight[5]+0.0721687836487032*rho[3]*weight[5]-0.024056261216234404*rho[2]*weight[5]-0.0721687836487032*rho[1]*weight[5]-0.041666666666666664*rho[0]*weight[5]-0.041666666666666664*weight[4]*rho[5]+0.0721687836487032*weight[3]*rho[5]-0.024056261216234404*weight[2]*rho[5]-0.0721687836487032*weight[1]*rho[5]-0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]-0.024056261216234404*rho[3]*weight[4]+0.0721687836487032*rho[2]*weight[4]+0.0721687836487032*rho[1]*weight[4]+0.041666666666666664*rho[0]*weight[4]-0.024056261216234404*weight[3]*rho[4]+0.0721687836487032*weight[2]*rho[4]+0.0721687836487032*weight[1]*rho[4]+0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]-0.041666666666666664*rho[2]*weight[3]-0.041666666666666664*rho[1]*weight[3]-0.0721687836487032*rho[0]*weight[3]-0.041666666666666664*weight[2]*rho[3]-0.041666666666666664*weight[1]*rho[3]-0.0721687836487032*weight[0]*rho[3]+0.125*rho[2]*weight[2]+0.041666666666666664*rho[1]*weight[2]+0.0721687836487032*rho[0]*weight[2]+0.041666666666666664*weight[1]*rho[2]+0.0721687836487032*weight[0]*rho[2]+0.125*rho[1]*weight[1]+0.0721687836487032*rho[0]*weight[1]+0.0721687836487032*weight[0]*rho[1]+0.125*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[3]] += 0.125*rho[7]*weight[7]+0.0721687836487032*rho[6]*weight[7]+0.0721687836487032*rho[5]*weight[7]-0.0721687836487032*rho[4]*weight[7]+0.041666666666666664*rho[3]*weight[7]-0.041666666666666664*rho[2]*weight[7]-0.041666666666666664*rho[1]*weight[7]-0.024056261216234404*rho[0]*weight[7]+0.0721687836487032*weight[6]*rho[7]+0.0721687836487032*weight[5]*rho[7]-0.0721687836487032*weight[4]*rho[7]+0.041666666666666664*weight[3]*rho[7]-0.041666666666666664*weight[2]*rho[7]-0.041666666666666664*weight[1]*rho[7]-0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]+0.041666666666666664*rho[5]*weight[6]-0.041666666666666664*rho[4]*weight[6]+0.0721687836487032*rho[3]*weight[6]-0.0721687836487032*rho[2]*weight[6]-0.024056261216234404*rho[1]*weight[6]-0.041666666666666664*rho[0]*weight[6]+0.041666666666666664*weight[5]*rho[6]-0.041666666666666664*weight[4]*rho[6]+0.0721687836487032*weight[3]*rho[6]-0.0721687836487032*weight[2]*rho[6]-0.024056261216234404*weight[1]*rho[6]-0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]-0.041666666666666664*rho[4]*weight[5]+0.0721687836487032*rho[3]*weight[5]-0.024056261216234404*rho[2]*weight[5]-0.0721687836487032*rho[1]*weight[5]-0.041666666666666664*rho[0]*weight[5]-0.041666666666666664*weight[4]*rho[5]+0.0721687836487032*weight[3]*rho[5]-0.024056261216234404*weight[2]*rho[5]-0.0721687836487032*weight[1]*rho[5]-0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]-0.024056261216234404*rho[3]*weight[4]+0.0721687836487032*rho[2]*weight[4]+0.0721687836487032*rho[1]*weight[4]+0.041666666666666664*rho[0]*weight[4]-0.024056261216234404*weight[3]*rho[4]+0.0721687836487032*weight[2]*rho[4]+0.0721687836487032*weight[1]*rho[4]+0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]-0.041666666666666664*rho[2]*weight[3]-0.041666666666666664*rho[1]*weight[3]-0.0721687836487032*rho[0]*weight[3]-0.041666666666666664*weight[2]*rho[3]-0.041666666666666664*weight[1]*rho[3]-0.0721687836487032*weight[0]*rho[3]+0.125*rho[2]*weight[2]+0.041666666666666664*rho[1]*weight[2]+0.0721687836487032*rho[0]*weight[2]+0.041666666666666664*weight[1]*rho[2]+0.0721687836487032*weight[0]*rho[2]+0.125*rho[1]*weight[1]+0.0721687836487032*rho[0]*weight[1]+0.0721687836487032*weight[0]*rho[1]+0.125*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[4]],0.125*rho[7]*weight[7]-0.0721687836487032*rho[6]*weight[7]-0.0721687836487032*rho[5]*weight[7]+0.0721687836487032*rho[4]*weight[7]+0.041666666666666664*rho[3]*weight[7]-0.041666666666666664*rho[2]*weight[7]-0.041666666666666664*rho[1]*weight[7]+0.024056261216234404*rho[0]*weight[7]-0.0721687836487032*weight[6]*rho[7]-0.0721687836487032*weight[5]*rho[7]+0.0721687836487032*weight[4]*rho[7]+0.041666666666666664*weight[3]*rho[7]-0.041666666666666664*weight[2]*rho[7]-0.041666666666666664*weight[1]*rho[7]+0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]+0.041666666666666664*rho[5]*weight[6]-0.041666666666666664*rho[4]*weight[6]-0.0721687836487032*rho[3]*weight[6]+0.0721687836487032*rho[2]*weight[6]+0.024056261216234404*rho[1]*weight[6]-0.041666666666666664*rho[0]*weight[6]+0.041666666666666664*weight[5]*rho[6]-0.041666666666666664*weight[4]*rho[6]-0.0721687836487032*weight[3]*rho[6]+0.0721687836487032*weight[2]*rho[6]+0.024056261216234404*weight[1]*rho[6]-0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]-0.041666666666666664*rho[4]*weight[5]-0.0721687836487032*rho[3]*weight[5]+0.024056261216234404*rho[2]*weight[5]+0.0721687836487032*rho[1]*weight[5]-0.041666666666666664*rho[0]*weight[5]-0.041666666666666664*weight[4]*rho[5]-0.0721687836487032*weight[3]*rho[5]+0.024056261216234404*weight[2]*rho[5]+0.0721687836487032*weight[1]*rho[5]-0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]+0.024056261216234404*rho[3]*weight[4]-0.0721687836487032*rho[2]*weight[4]-0.0721687836487032*rho[1]*weight[4]+0.041666666666666664*rho[0]*weight[4]+0.024056261216234404*weight[3]*rho[4]-0.0721687836487032*weight[2]*rho[4]-0.0721687836487032*weight[1]*rho[4]+0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]-0.041666666666666664*rho[2]*weight[3]-0.041666666666666664*rho[1]*weight[3]+0.0721687836487032*rho[0]*weight[3]-0.041666666666666664*weight[2]*rho[3]-0.041666666666666664*weight[1]*rho[3]+0.0721687836487032*weight[0]*rho[3]+0.125*rho[2]*weight[2]+0.041666666666666664*rho[1]*weight[2]-0.0721687836487032*rho[0]*weight[2]+0.041666666666666664*weight[1]*rho[2]-0.0721687836487032*weight[0]*rho[2]+0.125*rho[1]*weight[1]-0.0721687836487032*rho[0]*weight[1]-0.0721687836487032*weight[0]*rho[1]+0.125*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[4]] += 0.125*rho[7]*weight[7]-0.0721687836487032*rho[6]*weight[7]-0.0721687836487032*rho[5]*weight[7]+0.0721687836487032*rho[4]*weight[7]+0.041666666666666664*rho[3]*weight[7]-0.041666666666666664*rho[2]*weight[7]-0.041666666666666664*rho[1]*weight[7]+0.024056261216234404*rho[0]*weight[7]-0.0721687836487032*weight[6]*rho[7]-0.0721687836487032*weight[5]*rho[7]+0.0721687836487032*weight[4]*rho[7]+0.041666666666666664*weight[3]*rho[7]-0.041666666666666664*weight[2]*rho[7]-0.041666666666666664*weight[1]*rho[7]+0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]+0.041666666666666664*rho[5]*weight[6]-0.041666666666666664*rho[4]*weight[6]-0.0721687836487032*rho[3]*weight[6]+0.0721687836487032*rho[2]*weight[6]+0.024056261216234404*rho[1]*weight[6]-0.041666666666666664*rho[0]*weight[6]+0.041666666666666664*weight[5]*rho[6]-0.041666666666666664*weight[4]*rho[6]-0.0721687836487032*weight[3]*rho[6]+0.0721687836487032*weight[2]*rho[6]+0.024056261216234404*weight[1]*rho[6]-0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]-0.041666666666666664*rho[4]*weight[5]-0.0721687836487032*rho[3]*weight[5]+0.024056261216234404*rho[2]*weight[5]+0.0721687836487032*rho[1]*weight[5]-0.041666666666666664*rho[0]*weight[5]-0.041666666666666664*weight[4]*rho[5]-0.0721687836487032*weight[3]*rho[5]+0.024056261216234404*weight[2]*rho[5]+0.0721687836487032*weight[1]*rho[5]-0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]+0.024056261216234404*rho[3]*weight[4]-0.0721687836487032*rho[2]*weight[4]-0.0721687836487032*rho[1]*weight[4]+0.041666666666666664*rho[0]*weight[4]+0.024056261216234404*weight[3]*rho[4]-0.0721687836487032*weight[2]*rho[4]-0.0721687836487032*weight[1]*rho[4]+0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]-0.041666666666666664*rho[2]*weight[3]-0.041666666666666664*rho[1]*weight[3]+0.0721687836487032*rho[0]*weight[3]-0.041666666666666664*weight[2]*rho[3]-0.041666666666666664*weight[1]*rho[3]+0.0721687836487032*weight[0]*rho[3]+0.125*rho[2]*weight[2]+0.041666666666666664*rho[1]*weight[2]-0.0721687836487032*rho[0]*weight[2]+0.041666666666666664*weight[1]*rho[2]-0.0721687836487032*weight[0]*rho[2]+0.125*rho[1]*weight[1]-0.0721687836487032*rho[0]*weight[1]-0.0721687836487032*weight[0]*rho[1]+0.125*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[5]],0.125*rho[7]*weight[7]+0.0721687836487032*rho[6]*weight[7]-0.0721687836487032*rho[5]*weight[7]+0.0721687836487032*rho[4]*weight[7]-0.041666666666666664*rho[3]*weight[7]+0.041666666666666664*rho[2]*weight[7]-0.041666666666666664*rho[1]*weight[7]-0.024056261216234404*rho[0]*weight[7]+0.0721687836487032*weight[6]*rho[7]-0.0721687836487032*weight[5]*rho[7]+0.0721687836487032*weight[4]*rho[7]-0.041666666666666664*weight[3]*rho[7]+0.041666666666666664*weight[2]*rho[7]-0.041666666666666664*weight[1]*rho[7]-0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]-0.041666666666666664*rho[5]*weight[6]+0.041666666666666664*rho[4]*weight[6]-0.0721687836487032*rho[3]*weight[6]+0.0721687836487032*rho[2]*weight[6]-0.024056261216234404*rho[1]*weight[6]-0.041666666666666664*rho[0]*weight[6]-0.041666666666666664*weight[5]*rho[6]+0.041666666666666664*weight[4]*rho[6]-0.0721687836487032*weight[3]*rho[6]+0.0721687836487032*weight[2]*rho[6]-0.024056261216234404*weight[1]*rho[6]-0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]-0.041666666666666664*rho[4]*weight[5]+0.0721687836487032*rho[3]*weight[5]-0.024056261216234404*rho[2]*weight[5]+0.0721687836487032*rho[1]*weight[5]+0.041666666666666664*rho[0]*weight[5]-0.041666666666666664*weight[4]*rho[5]+0.0721687836487032*weight[3]*rho[5]-0.024056261216234404*weight[2]*rho[5]+0.0721687836487032*weight[1]*rho[5]+0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]-0.024056261216234404*rho[3]*weight[4]+0.0721687836487032*rho[2]*weight[4]-0.0721687836487032*rho[1]*weight[4]-0.041666666666666664*rho[0]*weight[4]-0.024056261216234404*weight[3]*rho[4]+0.0721687836487032*weight[2]*rho[4]-0.0721687836487032*weight[1]*rho[4]-0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]-0.041666666666666664*rho[2]*weight[3]+0.041666666666666664*rho[1]*weight[3]+0.0721687836487032*rho[0]*weight[3]-0.041666666666666664*weight[2]*rho[3]+0.041666666666666664*weight[1]*rho[3]+0.0721687836487032*weight[0]*rho[3]+0.125*rho[2]*weight[2]-0.041666666666666664*rho[1]*weight[2]-0.0721687836487032*rho[0]*weight[2]-0.041666666666666664*weight[1]*rho[2]-0.0721687836487032*weight[0]*rho[2]+0.125*rho[1]*weight[1]+0.0721687836487032*rho[0]*weight[1]+0.0721687836487032*weight[0]*rho[1]+0.125*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[5]] += 0.125*rho[7]*weight[7]+0.0721687836487032*rho[6]*weight[7]-0.0721687836487032*rho[5]*weight[7]+0.0721687836487032*rho[4]*weight[7]-0.041666666666666664*rho[3]*weight[7]+0.041666666666666664*rho[2]*weight[7]-0.041666666666666664*rho[1]*weight[7]-0.024056261216234404*rho[0]*weight[7]+0.0721687836487032*weight[6]*rho[7]-0.0721687836487032*weight[5]*rho[7]+0.0721687836487032*weight[4]*rho[7]-0.041666666666666664*weight[3]*rho[7]+0.041666666666666664*weight[2]*rho[7]-0.041666666666666664*weight[1]*rho[7]-0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]-0.041666666666666664*rho[5]*weight[6]+0.041666666666666664*rho[4]*weight[6]-0.0721687836487032*rho[3]*weight[6]+0.0721687836487032*rho[2]*weight[6]-0.024056261216234404*rho[1]*weight[6]-0.041666666666666664*rho[0]*weight[6]-0.041666666666666664*weight[5]*rho[6]+0.041666666666666664*weight[4]*rho[6]-0.0721687836487032*weight[3]*rho[6]+0.0721687836487032*weight[2]*rho[6]-0.024056261216234404*weight[1]*rho[6]-0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]-0.041666666666666664*rho[4]*weight[5]+0.0721687836487032*rho[3]*weight[5]-0.024056261216234404*rho[2]*weight[5]+0.0721687836487032*rho[1]*weight[5]+0.041666666666666664*rho[0]*weight[5]-0.041666666666666664*weight[4]*rho[5]+0.0721687836487032*weight[3]*rho[5]-0.024056261216234404*weight[2]*rho[5]+0.0721687836487032*weight[1]*rho[5]+0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]-0.024056261216234404*rho[3]*weight[4]+0.0721687836487032*rho[2]*weight[4]-0.0721687836487032*rho[1]*weight[4]-0.041666666666666664*rho[0]*weight[4]-0.024056261216234404*weight[3]*rho[4]+0.0721687836487032*weight[2]*rho[4]-0.0721687836487032*weight[1]*rho[4]-0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]-0.041666666666666664*rho[2]*weight[3]+0.041666666666666664*rho[1]*weight[3]+0.0721687836487032*rho[0]*weight[3]-0.041666666666666664*weight[2]*rho[3]+0.041666666666666664*weight[1]*rho[3]+0.0721687836487032*weight[0]*rho[3]+0.125*rho[2]*weight[2]-0.041666666666666664*rho[1]*weight[2]-0.0721687836487032*rho[0]*weight[2]-0.041666666666666664*weight[1]*rho[2]-0.0721687836487032*weight[0]*rho[2]+0.125*rho[1]*weight[1]+0.0721687836487032*rho[0]*weight[1]+0.0721687836487032*weight[0]*rho[1]+0.125*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[6]],0.125*rho[7]*weight[7]-0.0721687836487032*rho[6]*weight[7]+0.0721687836487032*rho[5]*weight[7]+0.0721687836487032*rho[4]*weight[7]-0.041666666666666664*rho[3]*weight[7]-0.041666666666666664*rho[2]*weight[7]+0.041666666666666664*rho[1]*weight[7]-0.024056261216234404*rho[0]*weight[7]-0.0721687836487032*weight[6]*rho[7]+0.0721687836487032*weight[5]*rho[7]+0.0721687836487032*weight[4]*rho[7]-0.041666666666666664*weight[3]*rho[7]-0.041666666666666664*weight[2]*rho[7]+0.041666666666666664*weight[1]*rho[7]-0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]-0.041666666666666664*rho[5]*weight[6]-0.041666666666666664*rho[4]*weight[6]+0.0721687836487032*rho[3]*weight[6]+0.0721687836487032*rho[2]*weight[6]-0.024056261216234404*rho[1]*weight[6]+0.041666666666666664*rho[0]*weight[6]-0.041666666666666664*weight[5]*rho[6]-0.041666666666666664*weight[4]*rho[6]+0.0721687836487032*weight[3]*rho[6]+0.0721687836487032*weight[2]*rho[6]-0.024056261216234404*weight[1]*rho[6]+0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]+0.041666666666666664*rho[4]*weight[5]-0.0721687836487032*rho[3]*weight[5]-0.024056261216234404*rho[2]*weight[5]+0.0721687836487032*rho[1]*weight[5]-0.041666666666666664*rho[0]*weight[5]+0.041666666666666664*weight[4]*rho[5]-0.0721687836487032*weight[3]*rho[5]-0.024056261216234404*weight[2]*rho[5]+0.0721687836487032*weight[1]*rho[5]-0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]-0.024056261216234404*rho[3]*weight[4]-0.0721687836487032*rho[2]*weight[4]+0.0721687836487032*rho[1]*weight[4]-0.041666666666666664*rho[0]*weight[4]-0.024056261216234404*weight[3]*rho[4]-0.0721687836487032*weight[2]*rho[4]+0.0721687836487032*weight[1]*rho[4]-0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]+0.041666666666666664*rho[2]*weight[3]-0.041666666666666664*rho[1]*weight[3]+0.0721687836487032*rho[0]*weight[3]+0.041666666666666664*weight[2]*rho[3]-0.041666666666666664*weight[1]*rho[3]+0.0721687836487032*weight[0]*rho[3]+0.125*rho[2]*weight[2]-0.041666666666666664*rho[1]*weight[2]+0.0721687836487032*rho[0]*weight[2]-0.041666666666666664*weight[1]*rho[2]+0.0721687836487032*weight[0]*rho[2]+0.125*rho[1]*weight[1]-0.0721687836487032*rho[0]*weight[1]-0.0721687836487032*weight[0]*rho[1]+0.125*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[6]] += 0.125*rho[7]*weight[7]-0.0721687836487032*rho[6]*weight[7]+0.0721687836487032*rho[5]*weight[7]+0.0721687836487032*rho[4]*weight[7]-0.041666666666666664*rho[3]*weight[7]-0.041666666666666664*rho[2]*weight[7]+0.041666666666666664*rho[1]*weight[7]-0.024056261216234404*rho[0]*weight[7]-0.0721687836487032*weight[6]*rho[7]+0.0721687836487032*weight[5]*rho[7]+0.0721687836487032*weight[4]*rho[7]-0.041666666666666664*weight[3]*rho[7]-0.041666666666666664*weight[2]*rho[7]+0.041666666666666664*weight[1]*rho[7]-0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]-0.041666666666666664*rho[5]*weight[6]-0.041666666666666664*rho[4]*weight[6]+0.0721687836487032*rho[3]*weight[6]+0.0721687836487032*rho[2]*weight[6]-0.024056261216234404*rho[1]*weight[6]+0.041666666666666664*rho[0]*weight[6]-0.041666666666666664*weight[5]*rho[6]-0.041666666666666664*weight[4]*rho[6]+0.0721687836487032*weight[3]*rho[6]+0.0721687836487032*weight[2]*rho[6]-0.024056261216234404*weight[1]*rho[6]+0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]+0.041666666666666664*rho[4]*weight[5]-0.0721687836487032*rho[3]*weight[5]-0.024056261216234404*rho[2]*weight[5]+0.0721687836487032*rho[1]*weight[5]-0.041666666666666664*rho[0]*weight[5]+0.041666666666666664*weight[4]*rho[5]-0.0721687836487032*weight[3]*rho[5]-0.024056261216234404*weight[2]*rho[5]+0.0721687836487032*weight[1]*rho[5]-0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]-0.024056261216234404*rho[3]*weight[4]-0.0721687836487032*rho[2]*weight[4]+0.0721687836487032*rho[1]*weight[4]-0.041666666666666664*rho[0]*weight[4]-0.024056261216234404*weight[3]*rho[4]-0.0721687836487032*weight[2]*rho[4]+0.0721687836487032*weight[1]*rho[4]-0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]+0.041666666666666664*rho[2]*weight[3]-0.041666666666666664*rho[1]*weight[3]+0.0721687836487032*rho[0]*weight[3]+0.041666666666666664*weight[2]*rho[3]-0.041666666666666664*weight[1]*rho[3]+0.0721687836487032*weight[0]*rho[3]+0.125*rho[2]*weight[2]-0.041666666666666664*rho[1]*weight[2]+0.0721687836487032*rho[0]*weight[2]-0.041666666666666664*weight[1]*rho[2]+0.0721687836487032*weight[0]*rho[2]+0.125*rho[1]*weight[1]-0.0721687836487032*rho[0]*weight[1]-0.0721687836487032*weight[0]*rho[1]+0.125*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[7]],0.125*rho[7]*weight[7]+0.0721687836487032*rho[6]*weight[7]+0.0721687836487032*rho[5]*weight[7]+0.0721687836487032*rho[4]*weight[7]+0.041666666666666664*rho[3]*weight[7]+0.041666666666666664*rho[2]*weight[7]+0.041666666666666664*rho[1]*weight[7]+0.024056261216234404*rho[0]*weight[7]+0.0721687836487032*weight[6]*rho[7]+0.0721687836487032*weight[5]*rho[7]+0.0721687836487032*weight[4]*rho[7]+0.041666666666666664*weight[3]*rho[7]+0.041666666666666664*weight[2]*rho[7]+0.041666666666666664*weight[1]*rho[7]+0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]+0.041666666666666664*rho[5]*weight[6]+0.041666666666666664*rho[4]*weight[6]+0.0721687836487032*rho[3]*weight[6]+0.0721687836487032*rho[2]*weight[6]+0.024056261216234404*rho[1]*weight[6]+0.041666666666666664*rho[0]*weight[6]+0.041666666666666664*weight[5]*rho[6]+0.041666666666666664*weight[4]*rho[6]+0.0721687836487032*weight[3]*rho[6]+0.0721687836487032*weight[2]*rho[6]+0.024056261216234404*weight[1]*rho[6]+0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]+0.041666666666666664*rho[4]*weight[5]+0.0721687836487032*rho[3]*weight[5]+0.024056261216234404*rho[2]*weight[5]+0.0721687836487032*rho[1]*weight[5]+0.041666666666666664*rho[0]*weight[5]+0.041666666666666664*weight[4]*rho[5]+0.0721687836487032*weight[3]*rho[5]+0.024056261216234404*weight[2]*rho[5]+0.0721687836487032*weight[1]*rho[5]+0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]+0.024056261216234404*rho[3]*weight[4]+0.0721687836487032*rho[2]*weight[4]+0.0721687836487032*rho[1]*weight[4]+0.041666666666666664*rho[0]*weight[4]+0.024056261216234404*weight[3]*rho[4]+0.0721687836487032*weight[2]*rho[4]+0.0721687836487032*weight[1]*rho[4]+0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]+0.041666666666666664*rho[2]*weight[3]+0.041666666666666664*rho[1]*weight[3]+0.0721687836487032*rho[0]*weight[3]+0.041666666666666664*weight[2]*rho[3]+0.041666666666666664*weight[1]*rho[3]+0.0721687836487032*weight[0]*rho[3]+0.125*rho[2]*weight[2]+0.041666666666666664*rho[1]*weight[2]+0.0721687836487032*rho[0]*weight[2]+0.041666666666666664*weight[1]*rho[2]+0.0721687836487032*weight[0]*rho[2]+0.125*rho[1]*weight[1]+0.0721687836487032*rho[0]*weight[1]+0.0721687836487032*weight[0]*rho[1]+0.125*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[7]] += 0.125*rho[7]*weight[7]+0.0721687836487032*rho[6]*weight[7]+0.0721687836487032*rho[5]*weight[7]+0.0721687836487032*rho[4]*weight[7]+0.041666666666666664*rho[3]*weight[7]+0.041666666666666664*rho[2]*weight[7]+0.041666666666666664*rho[1]*weight[7]+0.024056261216234404*rho[0]*weight[7]+0.0721687836487032*weight[6]*rho[7]+0.0721687836487032*weight[5]*rho[7]+0.0721687836487032*weight[4]*rho[7]+0.041666666666666664*weight[3]*rho[7]+0.041666666666666664*weight[2]*rho[7]+0.041666666666666664*weight[1]*rho[7]+0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]+0.041666666666666664*rho[5]*weight[6]+0.041666666666666664*rho[4]*weight[6]+0.0721687836487032*rho[3]*weight[6]+0.0721687836487032*rho[2]*weight[6]+0.024056261216234404*rho[1]*weight[6]+0.041666666666666664*rho[0]*weight[6]+0.041666666666666664*weight[5]*rho[6]+0.041666666666666664*weight[4]*rho[6]+0.0721687836487032*weight[3]*rho[6]+0.0721687836487032*weight[2]*rho[6]+0.024056261216234404*weight[1]*rho[6]+0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]+0.041666666666666664*rho[4]*weight[5]+0.0721687836487032*rho[3]*weight[5]+0.024056261216234404*rho[2]*weight[5]+0.0721687836487032*rho[1]*weight[5]+0.041666666666666664*rho[0]*weight[5]+0.041666666666666664*weight[4]*rho[5]+0.0721687836487032*weight[3]*rho[5]+0.024056261216234404*weight[2]*rho[5]+0.0721687836487032*weight[1]*rho[5]+0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]+0.024056261216234404*rho[3]*weight[4]+0.0721687836487032*rho[2]*weight[4]+0.0721687836487032*rho[1]*weight[4]+0.041666666666666664*rho[0]*weight[4]+0.024056261216234404*weight[3]*rho[4]+0.0721687836487032*weight[2]*rho[4]+0.0721687836487032*weight[1]*rho[4]+0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]+0.041666666666666664*rho[2]*weight[3]+0.041666666666666664*rho[1]*weight[3]+0.0721687836487032*rho[0]*weight[3]+0.041666666666666664*weight[2]*rho[3]+0.041666666666666664*weight[1]*rho[3]+0.0721687836487032*weight[0]*rho[3]+0.125*rho[2]*weight[2]+0.041666666666666664*rho[1]*weight[2]+0.0721687836487032*rho[0]*weight[2]+0.041666666666666664*weight[1]*rho[2]+0.0721687836487032*weight[0]*rho[2]+0.125*rho[1]*weight[1]+0.0721687836487032*rho[0]*weight[1]+0.0721687836487032*weight[0]*rho[1]+0.125*rho[0]*weight[0]; #endif } -GKYL_CU_DH void fem_parproj_src_stencil_weighted_2x_ser_p1_upy_dirichlety(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +GKYL_CU_DH void fem_parproj_src_stencil_weighted_3x_ser_p2_inz_nondirichletz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) { // rho: right side source. // weight: Weight in the projection operation. - // phiBC: Dirichlet boundary potential, given as a DG expansion in the ghost cell (volume). + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. // nodeOff: node offset (prob idx * global number of nodes). // globalIdxs: global linear index of each basis function/node in current cell. // bsrc: global right side source vector. #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[0]],0.25*rho[3]*weight[3]-0.14433756729740643*rho[2]*weight[3]-0.14433756729740643*rho[1]*weight[3]+0.08333333333333333*rho[0]*weight[3]-0.14433756729740643*weight[2]*rho[3]-0.14433756729740643*weight[1]*rho[3]+0.08333333333333333*weight[0]*rho[3]+0.25*rho[2]*weight[2]+0.08333333333333333*rho[1]*weight[2]-0.14433756729740643*rho[0]*weight[2]+0.08333333333333333*weight[1]*rho[2]-0.14433756729740643*weight[0]*rho[2]+0.25*rho[1]*weight[1]-0.14433756729740643*rho[0]*weight[1]-0.14433756729740643*weight[0]*rho[1]+0.25*rho[0]*weight[0]); + atomicAdd(&bsrc[nodeOff+globalIdxs[0]],-(0.034523809523809526*rho[19]*weight[19])+0.02*rho[18]*weight[19]+0.02*rho[17]*weight[19]-0.008935182737458497*rho[16]*weight[19]-0.008935182737458497*rho[15]*weight[19]-0.01924500897298753*rho[14]*weight[19]-0.01924500897298753*rho[13]*weight[19]-0.01924500897298753*rho[12]*weight[19]-0.01924500897298753*rho[11]*weight[19]-0.012909944487358056*rho[10]*weight[19]+0.021825396825396828*rho[9]*weight[19]+0.011111111111111112*rho[8]*weight[19]+0.011111111111111112*rho[7]*weight[19]+0.022360679774997897*rho[6]*weight[19]+0.022360679774997897*rho[5]*weight[19]+0.0372677996249965*rho[4]*weight[19]-0.02151657414559676*rho[3]*weight[19]-0.02151657414559676*rho[2]*weight[19]-0.02151657414559676*rho[1]*weight[19]+0.012422599874998833*rho[0]*weight[19]+0.02*weight[18]*rho[19]+0.02*weight[17]*rho[19]-0.008935182737458497*weight[16]*rho[19]-0.008935182737458497*weight[15]*rho[19]-0.01924500897298753*weight[14]*rho[19]-0.01924500897298753*weight[13]*rho[19]-0.01924500897298753*weight[12]*rho[19]-0.01924500897298753*weight[11]*rho[19]-0.012909944487358056*weight[10]*rho[19]+0.021825396825396828*weight[9]*rho[19]+0.011111111111111112*weight[8]*rho[19]+0.011111111111111112*weight[7]*rho[19]+0.022360679774997897*weight[6]*rho[19]+0.022360679774997897*weight[5]*rho[19]+0.0372677996249965*weight[4]*rho[19]-0.02151657414559676*weight[3]*rho[19]-0.02151657414559676*weight[2]*rho[19]-0.02151657414559676*weight[1]*rho[19]+0.012422599874998833*weight[0]*rho[19]-0.034523809523809526*rho[18]*weight[18]+0.02*rho[17]*weight[18]-0.01924500897298753*rho[16]*weight[18]-0.01924500897298753*rho[15]*weight[18]-0.008935182737458497*rho[14]*weight[18]-0.01924500897298753*rho[13]*weight[18]-0.008935182737458497*rho[12]*weight[18]-0.01924500897298753*rho[11]*weight[18]-0.012909944487358056*rho[10]*weight[18]+0.011111111111111112*rho[9]*weight[18]+0.021825396825396828*rho[8]*weight[18]+0.011111111111111112*rho[7]*weight[18]+0.022360679774997897*rho[6]*weight[18]+0.0372677996249965*rho[5]*weight[18]+0.022360679774997897*rho[4]*weight[18]-0.02151657414559676*rho[3]*weight[18]-0.02151657414559676*rho[2]*weight[18]-0.02151657414559676*rho[1]*weight[18]+0.012422599874998833*rho[0]*weight[18]+0.02*weight[17]*rho[18]-0.01924500897298753*weight[16]*rho[18]-0.01924500897298753*weight[15]*rho[18]-0.008935182737458497*weight[14]*rho[18]-0.01924500897298753*weight[13]*rho[18]-0.008935182737458497*weight[12]*rho[18]-0.01924500897298753*weight[11]*rho[18]-0.012909944487358056*weight[10]*rho[18]+0.011111111111111112*weight[9]*rho[18]+0.021825396825396828*weight[8]*rho[18]+0.011111111111111112*weight[7]*rho[18]+0.022360679774997897*weight[6]*rho[18]+0.0372677996249965*weight[5]*rho[18]+0.022360679774997897*weight[4]*rho[18]-0.02151657414559676*weight[3]*rho[18]-0.02151657414559676*weight[2]*rho[18]-0.02151657414559676*weight[1]*rho[18]+0.012422599874998833*weight[0]*rho[18]-0.034523809523809526*rho[17]*weight[17]-0.01924500897298753*rho[16]*weight[17]-0.01924500897298753*rho[15]*weight[17]-0.01924500897298753*rho[14]*weight[17]-0.008935182737458497*rho[13]*weight[17]-0.01924500897298753*rho[12]*weight[17]-0.008935182737458497*rho[11]*weight[17]-0.012909944487358056*rho[10]*weight[17]+0.011111111111111112*rho[9]*weight[17]+0.011111111111111112*rho[8]*weight[17]+0.021825396825396828*rho[7]*weight[17]+0.0372677996249965*rho[6]*weight[17]+0.022360679774997897*rho[5]*weight[17]+0.022360679774997897*rho[4]*weight[17]-0.02151657414559676*rho[3]*weight[17]-0.02151657414559676*rho[2]*weight[17]-0.02151657414559676*rho[1]*weight[17]+0.012422599874998833*rho[0]*weight[17]-0.01924500897298753*weight[16]*rho[17]-0.01924500897298753*weight[15]*rho[17]-0.01924500897298753*weight[14]*rho[17]-0.008935182737458497*weight[13]*rho[17]-0.01924500897298753*weight[12]*rho[17]-0.008935182737458497*weight[11]*rho[17]-0.012909944487358056*weight[10]*rho[17]+0.011111111111111112*weight[9]*rho[17]+0.011111111111111112*weight[8]*rho[17]+0.021825396825396828*weight[7]*rho[17]+0.0372677996249965*weight[6]*rho[17]+0.022360679774997897*weight[5]*rho[17]+0.022360679774997897*weight[4]*rho[17]-0.02151657414559676*weight[3]*rho[17]-0.02151657414559676*weight[2]*rho[17]-0.02151657414559676*weight[1]*rho[17]+0.012422599874998833*weight[0]*rho[17]-0.06785714285714287*rho[16]*weight[16]+0.021825396825396828*rho[15]*weight[16]+0.011111111111111112*rho[14]*weight[16]+0.011111111111111112*rho[13]*weight[16]+0.011111111111111112*rho[12]*weight[16]+0.022360679774997897*rho[10]*weight[16]+0.010309826235529031*rho[9]*weight[16]-0.01924500897298753*rho[8]*weight[16]+0.004303314829119352*rho[6]*weight[16]-0.021516574145596764*rho[5]*weight[16]-0.021516574145596764*rho[4]*weight[16]+0.012422599874998832*rho[3]*weight[16]+0.037267799624996496*rho[2]*weight[16]+0.012422599874998832*rho[1]*weight[16]-0.021516574145596764*rho[0]*weight[16]+0.021825396825396828*weight[15]*rho[16]+0.011111111111111112*weight[14]*rho[16]+0.011111111111111112*weight[13]*rho[16]+0.011111111111111112*weight[12]*rho[16]+0.022360679774997897*weight[10]*rho[16]+0.010309826235529031*weight[9]*rho[16]-0.01924500897298753*weight[8]*rho[16]+0.004303314829119352*weight[6]*rho[16]-0.021516574145596764*weight[5]*rho[16]-0.021516574145596764*weight[4]*rho[16]+0.012422599874998832*weight[3]*rho[16]+0.037267799624996496*weight[2]*rho[16]+0.012422599874998832*weight[1]*rho[16]-0.021516574145596764*weight[0]*rho[16]-0.06785714285714287*rho[15]*weight[15]+0.011111111111111112*rho[14]*weight[15]+0.011111111111111112*rho[13]*weight[15]+0.011111111111111112*rho[11]*weight[15]+0.022360679774997897*rho[10]*weight[15]+0.010309826235529031*rho[9]*weight[15]-0.01924500897298753*rho[7]*weight[15]-0.021516574145596764*rho[6]*weight[15]+0.004303314829119352*rho[5]*weight[15]-0.021516574145596764*rho[4]*weight[15]+0.012422599874998832*rho[3]*weight[15]+0.012422599874998832*rho[2]*weight[15]+0.037267799624996496*rho[1]*weight[15]-0.021516574145596764*rho[0]*weight[15]+0.011111111111111112*weight[14]*rho[15]+0.011111111111111112*weight[13]*rho[15]+0.011111111111111112*weight[11]*rho[15]+0.022360679774997897*weight[10]*rho[15]+0.010309826235529031*weight[9]*rho[15]-0.01924500897298753*weight[7]*rho[15]-0.021516574145596764*weight[6]*rho[15]+0.004303314829119352*weight[5]*rho[15]-0.021516574145596764*weight[4]*rho[15]+0.012422599874998832*weight[3]*rho[15]+0.012422599874998832*weight[2]*rho[15]+0.037267799624996496*weight[1]*rho[15]-0.021516574145596764*weight[0]*rho[15]-0.06785714285714287*rho[14]*weight[14]+0.021825396825396828*rho[12]*weight[14]+0.011111111111111112*rho[11]*weight[14]+0.022360679774997897*rho[10]*weight[14]-0.01924500897298753*rho[9]*weight[14]+0.010309826235529031*rho[8]*weight[14]+0.004303314829119352*rho[6]*weight[14]-0.021516574145596764*rho[5]*weight[14]-0.021516574145596764*rho[4]*weight[14]+0.037267799624996496*rho[3]*weight[14]+0.012422599874998832*rho[2]*weight[14]+0.012422599874998832*rho[1]*weight[14]-0.021516574145596764*rho[0]*weight[14]+0.021825396825396828*weight[12]*rho[14]+0.011111111111111112*weight[11]*rho[14]+0.022360679774997897*weight[10]*rho[14]-0.01924500897298753*weight[9]*rho[14]+0.010309826235529031*weight[8]*rho[14]+0.004303314829119352*weight[6]*rho[14]-0.021516574145596764*weight[5]*rho[14]-0.021516574145596764*weight[4]*rho[14]+0.037267799624996496*weight[3]*rho[14]+0.012422599874998832*weight[2]*rho[14]+0.012422599874998832*weight[1]*rho[14]-0.021516574145596764*weight[0]*rho[14]-0.06785714285714287*rho[13]*weight[13]+0.011111111111111112*rho[12]*weight[13]+0.021825396825396828*rho[11]*weight[13]+0.022360679774997897*rho[10]*weight[13]-0.01924500897298753*rho[9]*weight[13]+0.010309826235529031*rho[7]*weight[13]-0.021516574145596764*rho[6]*weight[13]+0.004303314829119352*rho[5]*weight[13]-0.021516574145596764*rho[4]*weight[13]+0.037267799624996496*rho[3]*weight[13]+0.012422599874998832*rho[2]*weight[13]+0.012422599874998832*rho[1]*weight[13]-0.021516574145596764*rho[0]*weight[13]+0.011111111111111112*weight[12]*rho[13]+0.021825396825396828*weight[11]*rho[13]+0.022360679774997897*weight[10]*rho[13]-0.01924500897298753*weight[9]*rho[13]+0.010309826235529031*weight[7]*rho[13]-0.021516574145596764*weight[6]*rho[13]+0.004303314829119352*weight[5]*rho[13]-0.021516574145596764*weight[4]*rho[13]+0.037267799624996496*weight[3]*rho[13]+0.012422599874998832*weight[2]*rho[13]+0.012422599874998832*weight[1]*rho[13]-0.021516574145596764*weight[0]*rho[13]-0.06785714285714287*rho[12]*weight[12]+0.011111111111111112*rho[11]*weight[12]+0.022360679774997897*rho[10]*weight[12]+0.010309826235529031*rho[8]*weight[12]-0.01924500897298753*rho[7]*weight[12]-0.021516574145596764*rho[6]*weight[12]-0.021516574145596764*rho[5]*weight[12]+0.004303314829119352*rho[4]*weight[12]+0.012422599874998832*rho[3]*weight[12]+0.012422599874998832*rho[2]*weight[12]+0.037267799624996496*rho[1]*weight[12]-0.021516574145596764*rho[0]*weight[12]+0.011111111111111112*weight[11]*rho[12]+0.022360679774997897*weight[10]*rho[12]+0.010309826235529031*weight[8]*rho[12]-0.01924500897298753*weight[7]*rho[12]-0.021516574145596764*weight[6]*rho[12]-0.021516574145596764*weight[5]*rho[12]+0.004303314829119352*weight[4]*rho[12]+0.012422599874998832*weight[3]*rho[12]+0.012422599874998832*weight[2]*rho[12]+0.037267799624996496*weight[1]*rho[12]-0.021516574145596764*weight[0]*rho[12]-0.06785714285714287*rho[11]*weight[11]+0.022360679774997897*rho[10]*weight[11]-0.01924500897298753*rho[8]*weight[11]+0.010309826235529031*rho[7]*weight[11]-0.021516574145596764*rho[6]*weight[11]-0.021516574145596764*rho[5]*weight[11]+0.004303314829119352*rho[4]*weight[11]+0.012422599874998832*rho[3]*weight[11]+0.037267799624996496*rho[2]*weight[11]+0.012422599874998832*rho[1]*weight[11]-0.021516574145596764*rho[0]*weight[11]+0.022360679774997897*weight[10]*rho[11]-0.01924500897298753*weight[8]*rho[11]+0.010309826235529031*weight[7]*rho[11]-0.021516574145596764*weight[6]*rho[11]-0.021516574145596764*weight[5]*rho[11]+0.004303314829119352*weight[4]*rho[11]+0.012422599874998832*weight[3]*rho[11]+0.037267799624996496*weight[2]*rho[11]+0.012422599874998832*weight[1]*rho[11]-0.021516574145596764*weight[0]*rho[11]-0.025*rho[10]*weight[10]-0.02151657414559676*rho[9]*weight[10]-0.02151657414559676*rho[8]*weight[10]-0.02151657414559676*rho[7]*weight[10]-0.014433756729740645*rho[6]*weight[10]-0.014433756729740645*rho[5]*weight[10]-0.014433756729740645*rho[4]*weight[10]+0.025*rho[3]*weight[10]+0.025*rho[2]*weight[10]+0.025*rho[1]*weight[10]-0.024056261216234404*rho[0]*weight[10]-0.02151657414559676*weight[9]*rho[10]-0.02151657414559676*weight[8]*rho[10]-0.02151657414559676*weight[7]*rho[10]-0.014433756729740645*weight[6]*rho[10]-0.014433756729740645*weight[5]*rho[10]-0.014433756729740645*weight[4]*rho[10]+0.025*weight[3]*rho[10]+0.025*weight[2]*rho[10]+0.025*weight[1]*rho[10]-0.024056261216234404*weight[0]*rho[10]-0.10119047619047619*rho[9]*weight[9]+0.012422599874998833*rho[6]*weight[9]+0.012422599874998833*rho[5]*weight[9]+0.012422599874998833*rho[4]*weight[9]+0.02151657414559676*rho[3]*weight[9]-0.02151657414559676*rho[2]*weight[9]-0.02151657414559676*rho[1]*weight[9]+0.0372677996249965*rho[0]*weight[9]+0.012422599874998833*weight[6]*rho[9]+0.012422599874998833*weight[5]*rho[9]+0.012422599874998833*weight[4]*rho[9]+0.02151657414559676*weight[3]*rho[9]-0.02151657414559676*weight[2]*rho[9]-0.02151657414559676*weight[1]*rho[9]+0.0372677996249965*weight[0]*rho[9]-0.10119047619047619*rho[8]*weight[8]+0.012422599874998833*rho[6]*weight[8]+0.012422599874998833*rho[5]*weight[8]+0.012422599874998833*rho[4]*weight[8]-0.02151657414559676*rho[3]*weight[8]+0.02151657414559676*rho[2]*weight[8]-0.02151657414559676*rho[1]*weight[8]+0.0372677996249965*rho[0]*weight[8]+0.012422599874998833*weight[6]*rho[8]+0.012422599874998833*weight[5]*rho[8]+0.012422599874998833*weight[4]*rho[8]-0.02151657414559676*weight[3]*rho[8]+0.02151657414559676*weight[2]*rho[8]-0.02151657414559676*weight[1]*rho[8]+0.0372677996249965*weight[0]*rho[8]-0.10119047619047619*rho[7]*weight[7]+0.012422599874998833*rho[6]*weight[7]+0.012422599874998833*rho[5]*weight[7]+0.012422599874998833*rho[4]*weight[7]-0.02151657414559676*rho[3]*weight[7]-0.02151657414559676*rho[2]*weight[7]+0.02151657414559676*rho[1]*weight[7]+0.0372677996249965*rho[0]*weight[7]+0.012422599874998833*weight[6]*rho[7]+0.012422599874998833*weight[5]*rho[7]+0.012422599874998833*weight[4]*rho[7]-0.02151657414559676*weight[3]*rho[7]-0.02151657414559676*weight[2]*rho[7]+0.02151657414559676*weight[1]*rho[7]+0.0372677996249965*weight[0]*rho[7]-0.058333333333333334*rho[6]*weight[6]+0.025*rho[5]*weight[6]+0.025*rho[4]*weight[6]+0.004811252243246881*rho[3]*weight[6]+0.004811252243246881*rho[2]*weight[6]-0.024056261216234404*rho[1]*weight[6]+0.01388888888888889*rho[0]*weight[6]+0.025*weight[5]*rho[6]+0.025*weight[4]*rho[6]+0.004811252243246881*weight[3]*rho[6]+0.004811252243246881*weight[2]*rho[6]-0.024056261216234404*weight[1]*rho[6]+0.01388888888888889*weight[0]*rho[6]-0.058333333333333334*rho[5]*weight[5]+0.025*rho[4]*weight[5]+0.004811252243246881*rho[3]*weight[5]-0.024056261216234404*rho[2]*weight[5]+0.004811252243246881*rho[1]*weight[5]+0.01388888888888889*rho[0]*weight[5]+0.025*weight[4]*rho[5]+0.004811252243246881*weight[3]*rho[5]-0.024056261216234404*weight[2]*rho[5]+0.004811252243246881*weight[1]*rho[5]+0.01388888888888889*weight[0]*rho[5]-0.058333333333333334*rho[4]*weight[4]-0.024056261216234404*rho[3]*weight[4]+0.004811252243246881*rho[2]*weight[4]+0.004811252243246881*rho[1]*weight[4]+0.01388888888888889*rho[0]*weight[4]-0.024056261216234404*weight[3]*rho[4]+0.004811252243246881*weight[2]*rho[4]+0.004811252243246881*weight[1]*rho[4]+0.01388888888888889*weight[0]*rho[4]-0.09166666666666667*rho[3]*weight[3]+0.01388888888888889*rho[2]*weight[3]+0.01388888888888889*rho[1]*weight[3]+0.024056261216234404*rho[0]*weight[3]+0.01388888888888889*weight[2]*rho[3]+0.01388888888888889*weight[1]*rho[3]+0.024056261216234404*weight[0]*rho[3]-0.09166666666666667*rho[2]*weight[2]+0.01388888888888889*rho[1]*weight[2]+0.024056261216234404*rho[0]*weight[2]+0.01388888888888889*weight[1]*rho[2]+0.024056261216234404*weight[0]*rho[2]-0.09166666666666667*rho[1]*weight[1]+0.024056261216234404*rho[0]*weight[1]+0.024056261216234404*weight[0]*rho[1]-0.125*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[0]] += -(0.034523809523809526*rho[19]*weight[19])+0.02*rho[18]*weight[19]+0.02*rho[17]*weight[19]-0.008935182737458497*rho[16]*weight[19]-0.008935182737458497*rho[15]*weight[19]-0.01924500897298753*rho[14]*weight[19]-0.01924500897298753*rho[13]*weight[19]-0.01924500897298753*rho[12]*weight[19]-0.01924500897298753*rho[11]*weight[19]-0.012909944487358056*rho[10]*weight[19]+0.021825396825396828*rho[9]*weight[19]+0.011111111111111112*rho[8]*weight[19]+0.011111111111111112*rho[7]*weight[19]+0.022360679774997897*rho[6]*weight[19]+0.022360679774997897*rho[5]*weight[19]+0.0372677996249965*rho[4]*weight[19]-0.02151657414559676*rho[3]*weight[19]-0.02151657414559676*rho[2]*weight[19]-0.02151657414559676*rho[1]*weight[19]+0.012422599874998833*rho[0]*weight[19]+0.02*weight[18]*rho[19]+0.02*weight[17]*rho[19]-0.008935182737458497*weight[16]*rho[19]-0.008935182737458497*weight[15]*rho[19]-0.01924500897298753*weight[14]*rho[19]-0.01924500897298753*weight[13]*rho[19]-0.01924500897298753*weight[12]*rho[19]-0.01924500897298753*weight[11]*rho[19]-0.012909944487358056*weight[10]*rho[19]+0.021825396825396828*weight[9]*rho[19]+0.011111111111111112*weight[8]*rho[19]+0.011111111111111112*weight[7]*rho[19]+0.022360679774997897*weight[6]*rho[19]+0.022360679774997897*weight[5]*rho[19]+0.0372677996249965*weight[4]*rho[19]-0.02151657414559676*weight[3]*rho[19]-0.02151657414559676*weight[2]*rho[19]-0.02151657414559676*weight[1]*rho[19]+0.012422599874998833*weight[0]*rho[19]-0.034523809523809526*rho[18]*weight[18]+0.02*rho[17]*weight[18]-0.01924500897298753*rho[16]*weight[18]-0.01924500897298753*rho[15]*weight[18]-0.008935182737458497*rho[14]*weight[18]-0.01924500897298753*rho[13]*weight[18]-0.008935182737458497*rho[12]*weight[18]-0.01924500897298753*rho[11]*weight[18]-0.012909944487358056*rho[10]*weight[18]+0.011111111111111112*rho[9]*weight[18]+0.021825396825396828*rho[8]*weight[18]+0.011111111111111112*rho[7]*weight[18]+0.022360679774997897*rho[6]*weight[18]+0.0372677996249965*rho[5]*weight[18]+0.022360679774997897*rho[4]*weight[18]-0.02151657414559676*rho[3]*weight[18]-0.02151657414559676*rho[2]*weight[18]-0.02151657414559676*rho[1]*weight[18]+0.012422599874998833*rho[0]*weight[18]+0.02*weight[17]*rho[18]-0.01924500897298753*weight[16]*rho[18]-0.01924500897298753*weight[15]*rho[18]-0.008935182737458497*weight[14]*rho[18]-0.01924500897298753*weight[13]*rho[18]-0.008935182737458497*weight[12]*rho[18]-0.01924500897298753*weight[11]*rho[18]-0.012909944487358056*weight[10]*rho[18]+0.011111111111111112*weight[9]*rho[18]+0.021825396825396828*weight[8]*rho[18]+0.011111111111111112*weight[7]*rho[18]+0.022360679774997897*weight[6]*rho[18]+0.0372677996249965*weight[5]*rho[18]+0.022360679774997897*weight[4]*rho[18]-0.02151657414559676*weight[3]*rho[18]-0.02151657414559676*weight[2]*rho[18]-0.02151657414559676*weight[1]*rho[18]+0.012422599874998833*weight[0]*rho[18]-0.034523809523809526*rho[17]*weight[17]-0.01924500897298753*rho[16]*weight[17]-0.01924500897298753*rho[15]*weight[17]-0.01924500897298753*rho[14]*weight[17]-0.008935182737458497*rho[13]*weight[17]-0.01924500897298753*rho[12]*weight[17]-0.008935182737458497*rho[11]*weight[17]-0.012909944487358056*rho[10]*weight[17]+0.011111111111111112*rho[9]*weight[17]+0.011111111111111112*rho[8]*weight[17]+0.021825396825396828*rho[7]*weight[17]+0.0372677996249965*rho[6]*weight[17]+0.022360679774997897*rho[5]*weight[17]+0.022360679774997897*rho[4]*weight[17]-0.02151657414559676*rho[3]*weight[17]-0.02151657414559676*rho[2]*weight[17]-0.02151657414559676*rho[1]*weight[17]+0.012422599874998833*rho[0]*weight[17]-0.01924500897298753*weight[16]*rho[17]-0.01924500897298753*weight[15]*rho[17]-0.01924500897298753*weight[14]*rho[17]-0.008935182737458497*weight[13]*rho[17]-0.01924500897298753*weight[12]*rho[17]-0.008935182737458497*weight[11]*rho[17]-0.012909944487358056*weight[10]*rho[17]+0.011111111111111112*weight[9]*rho[17]+0.011111111111111112*weight[8]*rho[17]+0.021825396825396828*weight[7]*rho[17]+0.0372677996249965*weight[6]*rho[17]+0.022360679774997897*weight[5]*rho[17]+0.022360679774997897*weight[4]*rho[17]-0.02151657414559676*weight[3]*rho[17]-0.02151657414559676*weight[2]*rho[17]-0.02151657414559676*weight[1]*rho[17]+0.012422599874998833*weight[0]*rho[17]-0.06785714285714287*rho[16]*weight[16]+0.021825396825396828*rho[15]*weight[16]+0.011111111111111112*rho[14]*weight[16]+0.011111111111111112*rho[13]*weight[16]+0.011111111111111112*rho[12]*weight[16]+0.022360679774997897*rho[10]*weight[16]+0.010309826235529031*rho[9]*weight[16]-0.01924500897298753*rho[8]*weight[16]+0.004303314829119352*rho[6]*weight[16]-0.021516574145596764*rho[5]*weight[16]-0.021516574145596764*rho[4]*weight[16]+0.012422599874998832*rho[3]*weight[16]+0.037267799624996496*rho[2]*weight[16]+0.012422599874998832*rho[1]*weight[16]-0.021516574145596764*rho[0]*weight[16]+0.021825396825396828*weight[15]*rho[16]+0.011111111111111112*weight[14]*rho[16]+0.011111111111111112*weight[13]*rho[16]+0.011111111111111112*weight[12]*rho[16]+0.022360679774997897*weight[10]*rho[16]+0.010309826235529031*weight[9]*rho[16]-0.01924500897298753*weight[8]*rho[16]+0.004303314829119352*weight[6]*rho[16]-0.021516574145596764*weight[5]*rho[16]-0.021516574145596764*weight[4]*rho[16]+0.012422599874998832*weight[3]*rho[16]+0.037267799624996496*weight[2]*rho[16]+0.012422599874998832*weight[1]*rho[16]-0.021516574145596764*weight[0]*rho[16]-0.06785714285714287*rho[15]*weight[15]+0.011111111111111112*rho[14]*weight[15]+0.011111111111111112*rho[13]*weight[15]+0.011111111111111112*rho[11]*weight[15]+0.022360679774997897*rho[10]*weight[15]+0.010309826235529031*rho[9]*weight[15]-0.01924500897298753*rho[7]*weight[15]-0.021516574145596764*rho[6]*weight[15]+0.004303314829119352*rho[5]*weight[15]-0.021516574145596764*rho[4]*weight[15]+0.012422599874998832*rho[3]*weight[15]+0.012422599874998832*rho[2]*weight[15]+0.037267799624996496*rho[1]*weight[15]-0.021516574145596764*rho[0]*weight[15]+0.011111111111111112*weight[14]*rho[15]+0.011111111111111112*weight[13]*rho[15]+0.011111111111111112*weight[11]*rho[15]+0.022360679774997897*weight[10]*rho[15]+0.010309826235529031*weight[9]*rho[15]-0.01924500897298753*weight[7]*rho[15]-0.021516574145596764*weight[6]*rho[15]+0.004303314829119352*weight[5]*rho[15]-0.021516574145596764*weight[4]*rho[15]+0.012422599874998832*weight[3]*rho[15]+0.012422599874998832*weight[2]*rho[15]+0.037267799624996496*weight[1]*rho[15]-0.021516574145596764*weight[0]*rho[15]-0.06785714285714287*rho[14]*weight[14]+0.021825396825396828*rho[12]*weight[14]+0.011111111111111112*rho[11]*weight[14]+0.022360679774997897*rho[10]*weight[14]-0.01924500897298753*rho[9]*weight[14]+0.010309826235529031*rho[8]*weight[14]+0.004303314829119352*rho[6]*weight[14]-0.021516574145596764*rho[5]*weight[14]-0.021516574145596764*rho[4]*weight[14]+0.037267799624996496*rho[3]*weight[14]+0.012422599874998832*rho[2]*weight[14]+0.012422599874998832*rho[1]*weight[14]-0.021516574145596764*rho[0]*weight[14]+0.021825396825396828*weight[12]*rho[14]+0.011111111111111112*weight[11]*rho[14]+0.022360679774997897*weight[10]*rho[14]-0.01924500897298753*weight[9]*rho[14]+0.010309826235529031*weight[8]*rho[14]+0.004303314829119352*weight[6]*rho[14]-0.021516574145596764*weight[5]*rho[14]-0.021516574145596764*weight[4]*rho[14]+0.037267799624996496*weight[3]*rho[14]+0.012422599874998832*weight[2]*rho[14]+0.012422599874998832*weight[1]*rho[14]-0.021516574145596764*weight[0]*rho[14]-0.06785714285714287*rho[13]*weight[13]+0.011111111111111112*rho[12]*weight[13]+0.021825396825396828*rho[11]*weight[13]+0.022360679774997897*rho[10]*weight[13]-0.01924500897298753*rho[9]*weight[13]+0.010309826235529031*rho[7]*weight[13]-0.021516574145596764*rho[6]*weight[13]+0.004303314829119352*rho[5]*weight[13]-0.021516574145596764*rho[4]*weight[13]+0.037267799624996496*rho[3]*weight[13]+0.012422599874998832*rho[2]*weight[13]+0.012422599874998832*rho[1]*weight[13]-0.021516574145596764*rho[0]*weight[13]+0.011111111111111112*weight[12]*rho[13]+0.021825396825396828*weight[11]*rho[13]+0.022360679774997897*weight[10]*rho[13]-0.01924500897298753*weight[9]*rho[13]+0.010309826235529031*weight[7]*rho[13]-0.021516574145596764*weight[6]*rho[13]+0.004303314829119352*weight[5]*rho[13]-0.021516574145596764*weight[4]*rho[13]+0.037267799624996496*weight[3]*rho[13]+0.012422599874998832*weight[2]*rho[13]+0.012422599874998832*weight[1]*rho[13]-0.021516574145596764*weight[0]*rho[13]-0.06785714285714287*rho[12]*weight[12]+0.011111111111111112*rho[11]*weight[12]+0.022360679774997897*rho[10]*weight[12]+0.010309826235529031*rho[8]*weight[12]-0.01924500897298753*rho[7]*weight[12]-0.021516574145596764*rho[6]*weight[12]-0.021516574145596764*rho[5]*weight[12]+0.004303314829119352*rho[4]*weight[12]+0.012422599874998832*rho[3]*weight[12]+0.012422599874998832*rho[2]*weight[12]+0.037267799624996496*rho[1]*weight[12]-0.021516574145596764*rho[0]*weight[12]+0.011111111111111112*weight[11]*rho[12]+0.022360679774997897*weight[10]*rho[12]+0.010309826235529031*weight[8]*rho[12]-0.01924500897298753*weight[7]*rho[12]-0.021516574145596764*weight[6]*rho[12]-0.021516574145596764*weight[5]*rho[12]+0.004303314829119352*weight[4]*rho[12]+0.012422599874998832*weight[3]*rho[12]+0.012422599874998832*weight[2]*rho[12]+0.037267799624996496*weight[1]*rho[12]-0.021516574145596764*weight[0]*rho[12]-0.06785714285714287*rho[11]*weight[11]+0.022360679774997897*rho[10]*weight[11]-0.01924500897298753*rho[8]*weight[11]+0.010309826235529031*rho[7]*weight[11]-0.021516574145596764*rho[6]*weight[11]-0.021516574145596764*rho[5]*weight[11]+0.004303314829119352*rho[4]*weight[11]+0.012422599874998832*rho[3]*weight[11]+0.037267799624996496*rho[2]*weight[11]+0.012422599874998832*rho[1]*weight[11]-0.021516574145596764*rho[0]*weight[11]+0.022360679774997897*weight[10]*rho[11]-0.01924500897298753*weight[8]*rho[11]+0.010309826235529031*weight[7]*rho[11]-0.021516574145596764*weight[6]*rho[11]-0.021516574145596764*weight[5]*rho[11]+0.004303314829119352*weight[4]*rho[11]+0.012422599874998832*weight[3]*rho[11]+0.037267799624996496*weight[2]*rho[11]+0.012422599874998832*weight[1]*rho[11]-0.021516574145596764*weight[0]*rho[11]-0.025*rho[10]*weight[10]-0.02151657414559676*rho[9]*weight[10]-0.02151657414559676*rho[8]*weight[10]-0.02151657414559676*rho[7]*weight[10]-0.014433756729740645*rho[6]*weight[10]-0.014433756729740645*rho[5]*weight[10]-0.014433756729740645*rho[4]*weight[10]+0.025*rho[3]*weight[10]+0.025*rho[2]*weight[10]+0.025*rho[1]*weight[10]-0.024056261216234404*rho[0]*weight[10]-0.02151657414559676*weight[9]*rho[10]-0.02151657414559676*weight[8]*rho[10]-0.02151657414559676*weight[7]*rho[10]-0.014433756729740645*weight[6]*rho[10]-0.014433756729740645*weight[5]*rho[10]-0.014433756729740645*weight[4]*rho[10]+0.025*weight[3]*rho[10]+0.025*weight[2]*rho[10]+0.025*weight[1]*rho[10]-0.024056261216234404*weight[0]*rho[10]-0.10119047619047619*rho[9]*weight[9]+0.012422599874998833*rho[6]*weight[9]+0.012422599874998833*rho[5]*weight[9]+0.012422599874998833*rho[4]*weight[9]+0.02151657414559676*rho[3]*weight[9]-0.02151657414559676*rho[2]*weight[9]-0.02151657414559676*rho[1]*weight[9]+0.0372677996249965*rho[0]*weight[9]+0.012422599874998833*weight[6]*rho[9]+0.012422599874998833*weight[5]*rho[9]+0.012422599874998833*weight[4]*rho[9]+0.02151657414559676*weight[3]*rho[9]-0.02151657414559676*weight[2]*rho[9]-0.02151657414559676*weight[1]*rho[9]+0.0372677996249965*weight[0]*rho[9]-0.10119047619047619*rho[8]*weight[8]+0.012422599874998833*rho[6]*weight[8]+0.012422599874998833*rho[5]*weight[8]+0.012422599874998833*rho[4]*weight[8]-0.02151657414559676*rho[3]*weight[8]+0.02151657414559676*rho[2]*weight[8]-0.02151657414559676*rho[1]*weight[8]+0.0372677996249965*rho[0]*weight[8]+0.012422599874998833*weight[6]*rho[8]+0.012422599874998833*weight[5]*rho[8]+0.012422599874998833*weight[4]*rho[8]-0.02151657414559676*weight[3]*rho[8]+0.02151657414559676*weight[2]*rho[8]-0.02151657414559676*weight[1]*rho[8]+0.0372677996249965*weight[0]*rho[8]-0.10119047619047619*rho[7]*weight[7]+0.012422599874998833*rho[6]*weight[7]+0.012422599874998833*rho[5]*weight[7]+0.012422599874998833*rho[4]*weight[7]-0.02151657414559676*rho[3]*weight[7]-0.02151657414559676*rho[2]*weight[7]+0.02151657414559676*rho[1]*weight[7]+0.0372677996249965*rho[0]*weight[7]+0.012422599874998833*weight[6]*rho[7]+0.012422599874998833*weight[5]*rho[7]+0.012422599874998833*weight[4]*rho[7]-0.02151657414559676*weight[3]*rho[7]-0.02151657414559676*weight[2]*rho[7]+0.02151657414559676*weight[1]*rho[7]+0.0372677996249965*weight[0]*rho[7]-0.058333333333333334*rho[6]*weight[6]+0.025*rho[5]*weight[6]+0.025*rho[4]*weight[6]+0.004811252243246881*rho[3]*weight[6]+0.004811252243246881*rho[2]*weight[6]-0.024056261216234404*rho[1]*weight[6]+0.01388888888888889*rho[0]*weight[6]+0.025*weight[5]*rho[6]+0.025*weight[4]*rho[6]+0.004811252243246881*weight[3]*rho[6]+0.004811252243246881*weight[2]*rho[6]-0.024056261216234404*weight[1]*rho[6]+0.01388888888888889*weight[0]*rho[6]-0.058333333333333334*rho[5]*weight[5]+0.025*rho[4]*weight[5]+0.004811252243246881*rho[3]*weight[5]-0.024056261216234404*rho[2]*weight[5]+0.004811252243246881*rho[1]*weight[5]+0.01388888888888889*rho[0]*weight[5]+0.025*weight[4]*rho[5]+0.004811252243246881*weight[3]*rho[5]-0.024056261216234404*weight[2]*rho[5]+0.004811252243246881*weight[1]*rho[5]+0.01388888888888889*weight[0]*rho[5]-0.058333333333333334*rho[4]*weight[4]-0.024056261216234404*rho[3]*weight[4]+0.004811252243246881*rho[2]*weight[4]+0.004811252243246881*rho[1]*weight[4]+0.01388888888888889*rho[0]*weight[4]-0.024056261216234404*weight[3]*rho[4]+0.004811252243246881*weight[2]*rho[4]+0.004811252243246881*weight[1]*rho[4]+0.01388888888888889*weight[0]*rho[4]-0.09166666666666667*rho[3]*weight[3]+0.01388888888888889*rho[2]*weight[3]+0.01388888888888889*rho[1]*weight[3]+0.024056261216234404*rho[0]*weight[3]+0.01388888888888889*weight[2]*rho[3]+0.01388888888888889*weight[1]*rho[3]+0.024056261216234404*weight[0]*rho[3]-0.09166666666666667*rho[2]*weight[2]+0.01388888888888889*rho[1]*weight[2]+0.024056261216234404*rho[0]*weight[2]+0.01388888888888889*weight[1]*rho[2]+0.024056261216234404*weight[0]*rho[2]-0.09166666666666667*rho[1]*weight[1]+0.024056261216234404*rho[0]*weight[1]+0.024056261216234404*weight[0]*rho[1]-0.125*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[1]],0.1*rho[19]*weight[19]+0.02666666666666667*rho[18]*weight[19]-0.05773502691896258*rho[15]*weight[19]-0.051639777949432225*rho[10]*weight[19]+0.029814239699997195*rho[5]*weight[19]+0.02666666666666667*weight[18]*rho[19]-0.05773502691896258*weight[15]*rho[19]-0.051639777949432225*weight[10]*rho[19]+0.029814239699997195*weight[5]*rho[19]+0.1*rho[18]*weight[18]-0.05773502691896258*rho[12]*weight[18]-0.051639777949432225*rho[10]*weight[18]+0.029814239699997195*rho[4]*weight[18]-0.05773502691896258*weight[12]*rho[18]-0.051639777949432225*weight[10]*rho[18]+0.029814239699997195*weight[4]*rho[18]+0.11904761904761905*rho[17]*weight[17]+0.03849001794597506*rho[16]*weight[17]+0.03849001794597506*rho[14]*weight[17]-0.06873217490352689*rho[13]*weight[17]-0.06873217490352689*rho[11]*weight[17]-0.022222222222222223*rho[9]*weight[17]-0.022222222222222223*rho[8]*weight[17]+0.03968253968253969*rho[7]*weight[17]-0.074535599249993*rho[6]*weight[17]+0.04303314829119352*rho[3]*weight[17]+0.04303314829119352*rho[2]*weight[17]-0.024845199749997667*rho[0]*weight[17]+0.03849001794597506*weight[16]*rho[17]+0.03849001794597506*weight[14]*rho[17]-0.06873217490352689*weight[13]*rho[17]-0.06873217490352689*weight[11]*rho[17]-0.022222222222222223*weight[9]*rho[17]-0.022222222222222223*weight[8]*rho[17]+0.03968253968253969*weight[7]*rho[17]-0.074535599249993*weight[6]*rho[17]+0.04303314829119352*weight[3]*rho[17]+0.04303314829119352*weight[2]*rho[17]-0.024845199749997667*weight[0]*rho[17]+0.16666666666666669*rho[16]*weight[16]+0.044444444444444446*rho[14]*weight[16]-0.022222222222222223*rho[13]*weight[16]-0.09622504486493764*rho[9]*weight[16]-0.08606629658238706*rho[6]*weight[16]+0.049690399499995326*rho[3]*weight[16]+0.044444444444444446*weight[14]*rho[16]-0.022222222222222223*weight[13]*rho[16]-0.09622504486493764*weight[9]*rho[16]-0.08606629658238706*weight[6]*rho[16]+0.049690399499995326*weight[3]*rho[16]+0.1*rho[15]*weight[15]+0.029814239699997195*rho[10]*weight[15]-0.05163977794943223*rho[5]*weight[15]+0.029814239699997195*weight[10]*rho[15]-0.05163977794943223*weight[5]*rho[15]+0.16666666666666669*rho[14]*weight[14]-0.022222222222222223*rho[11]*weight[14]-0.09622504486493764*rho[8]*weight[14]-0.08606629658238706*rho[6]*weight[14]+0.049690399499995326*rho[2]*weight[14]-0.022222222222222223*weight[11]*rho[14]-0.09622504486493764*weight[8]*rho[14]-0.08606629658238706*weight[6]*rho[14]+0.049690399499995326*weight[2]*rho[14]+0.11904761904761905*rho[13]*weight[13]+0.03968253968253969*rho[11]*weight[13]+0.03849001794597506*rho[9]*weight[13]-0.06873217490352689*rho[7]*weight[13]+0.04303314829119353*rho[6]*weight[13]-0.07453559924999299*rho[3]*weight[13]-0.024845199749997663*rho[2]*weight[13]+0.04303314829119353*rho[0]*weight[13]+0.03968253968253969*weight[11]*rho[13]+0.03849001794597506*weight[9]*rho[13]-0.06873217490352689*weight[7]*rho[13]+0.04303314829119353*weight[6]*rho[13]-0.07453559924999299*weight[3]*rho[13]-0.024845199749997663*weight[2]*rho[13]+0.04303314829119353*weight[0]*rho[13]+0.1*rho[12]*weight[12]+0.029814239699997195*rho[10]*weight[12]-0.05163977794943223*rho[4]*weight[12]+0.029814239699997195*weight[10]*rho[12]-0.05163977794943223*weight[4]*rho[12]+0.11904761904761905*rho[11]*weight[11]+0.03849001794597506*rho[8]*weight[11]-0.06873217490352689*rho[7]*weight[11]+0.04303314829119353*rho[6]*weight[11]-0.024845199749997663*rho[3]*weight[11]-0.07453559924999299*rho[2]*weight[11]+0.04303314829119353*rho[0]*weight[11]+0.03849001794597506*weight[8]*rho[11]-0.06873217490352689*weight[7]*rho[11]+0.04303314829119353*weight[6]*rho[11]-0.024845199749997663*weight[3]*rho[11]-0.07453559924999299*weight[2]*rho[11]+0.04303314829119353*weight[0]*rho[11]+0.1*rho[10]*weight[10]-0.05773502691896258*rho[5]*weight[10]-0.05773502691896258*rho[4]*weight[10]+0.03333333333333333*rho[1]*weight[10]-0.05773502691896258*weight[5]*rho[10]-0.05773502691896258*weight[4]*rho[10]+0.03333333333333333*weight[1]*rho[10]+0.16666666666666669*rho[9]*weight[9]+0.04969039949999533*rho[6]*weight[9]-0.08606629658238704*rho[3]*weight[9]+0.04969039949999533*weight[6]*rho[9]-0.08606629658238704*weight[3]*rho[9]+0.16666666666666669*rho[8]*weight[8]+0.04969039949999533*rho[6]*weight[8]-0.08606629658238704*rho[2]*weight[8]+0.04969039949999533*weight[6]*rho[8]-0.08606629658238704*weight[2]*rho[8]+0.11904761904761905*rho[7]*weight[7]-0.024845199749997667*rho[6]*weight[7]+0.04303314829119352*rho[3]*weight[7]+0.04303314829119352*rho[2]*weight[7]-0.074535599249993*rho[0]*weight[7]-0.024845199749997667*weight[6]*rho[7]+0.04303314829119352*weight[3]*rho[7]+0.04303314829119352*weight[2]*rho[7]-0.074535599249993*weight[0]*rho[7]+0.16666666666666669*rho[6]*weight[6]-0.09622504486493762*rho[3]*weight[6]-0.09622504486493762*rho[2]*weight[6]+0.05555555555555556*rho[0]*weight[6]-0.09622504486493762*weight[3]*rho[6]-0.09622504486493762*weight[2]*rho[6]+0.05555555555555556*weight[0]*rho[6]+0.1*rho[5]*weight[5]+0.03333333333333333*rho[4]*weight[5]-0.05773502691896258*rho[1]*weight[5]+0.03333333333333333*weight[4]*rho[5]-0.05773502691896258*weight[1]*rho[5]+0.1*rho[4]*weight[4]-0.05773502691896258*rho[1]*weight[4]-0.05773502691896258*weight[1]*rho[4]+0.16666666666666669*rho[3]*weight[3]+0.05555555555555556*rho[2]*weight[3]-0.09622504486493762*rho[0]*weight[3]+0.05555555555555556*weight[2]*rho[3]-0.09622504486493762*weight[0]*rho[3]+0.16666666666666669*rho[2]*weight[2]-0.09622504486493762*rho[0]*weight[2]-0.09622504486493762*weight[0]*rho[2]+0.1*rho[1]*weight[1]+0.16666666666666669*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[1]] += 0.1*rho[19]*weight[19]+0.02666666666666667*rho[18]*weight[19]-0.05773502691896258*rho[15]*weight[19]-0.051639777949432225*rho[10]*weight[19]+0.029814239699997195*rho[5]*weight[19]+0.02666666666666667*weight[18]*rho[19]-0.05773502691896258*weight[15]*rho[19]-0.051639777949432225*weight[10]*rho[19]+0.029814239699997195*weight[5]*rho[19]+0.1*rho[18]*weight[18]-0.05773502691896258*rho[12]*weight[18]-0.051639777949432225*rho[10]*weight[18]+0.029814239699997195*rho[4]*weight[18]-0.05773502691896258*weight[12]*rho[18]-0.051639777949432225*weight[10]*rho[18]+0.029814239699997195*weight[4]*rho[18]+0.11904761904761905*rho[17]*weight[17]+0.03849001794597506*rho[16]*weight[17]+0.03849001794597506*rho[14]*weight[17]-0.06873217490352689*rho[13]*weight[17]-0.06873217490352689*rho[11]*weight[17]-0.022222222222222223*rho[9]*weight[17]-0.022222222222222223*rho[8]*weight[17]+0.03968253968253969*rho[7]*weight[17]-0.074535599249993*rho[6]*weight[17]+0.04303314829119352*rho[3]*weight[17]+0.04303314829119352*rho[2]*weight[17]-0.024845199749997667*rho[0]*weight[17]+0.03849001794597506*weight[16]*rho[17]+0.03849001794597506*weight[14]*rho[17]-0.06873217490352689*weight[13]*rho[17]-0.06873217490352689*weight[11]*rho[17]-0.022222222222222223*weight[9]*rho[17]-0.022222222222222223*weight[8]*rho[17]+0.03968253968253969*weight[7]*rho[17]-0.074535599249993*weight[6]*rho[17]+0.04303314829119352*weight[3]*rho[17]+0.04303314829119352*weight[2]*rho[17]-0.024845199749997667*weight[0]*rho[17]+0.16666666666666669*rho[16]*weight[16]+0.044444444444444446*rho[14]*weight[16]-0.022222222222222223*rho[13]*weight[16]-0.09622504486493764*rho[9]*weight[16]-0.08606629658238706*rho[6]*weight[16]+0.049690399499995326*rho[3]*weight[16]+0.044444444444444446*weight[14]*rho[16]-0.022222222222222223*weight[13]*rho[16]-0.09622504486493764*weight[9]*rho[16]-0.08606629658238706*weight[6]*rho[16]+0.049690399499995326*weight[3]*rho[16]+0.1*rho[15]*weight[15]+0.029814239699997195*rho[10]*weight[15]-0.05163977794943223*rho[5]*weight[15]+0.029814239699997195*weight[10]*rho[15]-0.05163977794943223*weight[5]*rho[15]+0.16666666666666669*rho[14]*weight[14]-0.022222222222222223*rho[11]*weight[14]-0.09622504486493764*rho[8]*weight[14]-0.08606629658238706*rho[6]*weight[14]+0.049690399499995326*rho[2]*weight[14]-0.022222222222222223*weight[11]*rho[14]-0.09622504486493764*weight[8]*rho[14]-0.08606629658238706*weight[6]*rho[14]+0.049690399499995326*weight[2]*rho[14]+0.11904761904761905*rho[13]*weight[13]+0.03968253968253969*rho[11]*weight[13]+0.03849001794597506*rho[9]*weight[13]-0.06873217490352689*rho[7]*weight[13]+0.04303314829119353*rho[6]*weight[13]-0.07453559924999299*rho[3]*weight[13]-0.024845199749997663*rho[2]*weight[13]+0.04303314829119353*rho[0]*weight[13]+0.03968253968253969*weight[11]*rho[13]+0.03849001794597506*weight[9]*rho[13]-0.06873217490352689*weight[7]*rho[13]+0.04303314829119353*weight[6]*rho[13]-0.07453559924999299*weight[3]*rho[13]-0.024845199749997663*weight[2]*rho[13]+0.04303314829119353*weight[0]*rho[13]+0.1*rho[12]*weight[12]+0.029814239699997195*rho[10]*weight[12]-0.05163977794943223*rho[4]*weight[12]+0.029814239699997195*weight[10]*rho[12]-0.05163977794943223*weight[4]*rho[12]+0.11904761904761905*rho[11]*weight[11]+0.03849001794597506*rho[8]*weight[11]-0.06873217490352689*rho[7]*weight[11]+0.04303314829119353*rho[6]*weight[11]-0.024845199749997663*rho[3]*weight[11]-0.07453559924999299*rho[2]*weight[11]+0.04303314829119353*rho[0]*weight[11]+0.03849001794597506*weight[8]*rho[11]-0.06873217490352689*weight[7]*rho[11]+0.04303314829119353*weight[6]*rho[11]-0.024845199749997663*weight[3]*rho[11]-0.07453559924999299*weight[2]*rho[11]+0.04303314829119353*weight[0]*rho[11]+0.1*rho[10]*weight[10]-0.05773502691896258*rho[5]*weight[10]-0.05773502691896258*rho[4]*weight[10]+0.03333333333333333*rho[1]*weight[10]-0.05773502691896258*weight[5]*rho[10]-0.05773502691896258*weight[4]*rho[10]+0.03333333333333333*weight[1]*rho[10]+0.16666666666666669*rho[9]*weight[9]+0.04969039949999533*rho[6]*weight[9]-0.08606629658238704*rho[3]*weight[9]+0.04969039949999533*weight[6]*rho[9]-0.08606629658238704*weight[3]*rho[9]+0.16666666666666669*rho[8]*weight[8]+0.04969039949999533*rho[6]*weight[8]-0.08606629658238704*rho[2]*weight[8]+0.04969039949999533*weight[6]*rho[8]-0.08606629658238704*weight[2]*rho[8]+0.11904761904761905*rho[7]*weight[7]-0.024845199749997667*rho[6]*weight[7]+0.04303314829119352*rho[3]*weight[7]+0.04303314829119352*rho[2]*weight[7]-0.074535599249993*rho[0]*weight[7]-0.024845199749997667*weight[6]*rho[7]+0.04303314829119352*weight[3]*rho[7]+0.04303314829119352*weight[2]*rho[7]-0.074535599249993*weight[0]*rho[7]+0.16666666666666669*rho[6]*weight[6]-0.09622504486493762*rho[3]*weight[6]-0.09622504486493762*rho[2]*weight[6]+0.05555555555555556*rho[0]*weight[6]-0.09622504486493762*weight[3]*rho[6]-0.09622504486493762*weight[2]*rho[6]+0.05555555555555556*weight[0]*rho[6]+0.1*rho[5]*weight[5]+0.03333333333333333*rho[4]*weight[5]-0.05773502691896258*rho[1]*weight[5]+0.03333333333333333*weight[4]*rho[5]-0.05773502691896258*weight[1]*rho[5]+0.1*rho[4]*weight[4]-0.05773502691896258*rho[1]*weight[4]-0.05773502691896258*weight[1]*rho[4]+0.16666666666666669*rho[3]*weight[3]+0.05555555555555556*rho[2]*weight[3]-0.09622504486493762*rho[0]*weight[3]+0.05555555555555556*weight[2]*rho[3]-0.09622504486493762*weight[0]*rho[3]+0.16666666666666669*rho[2]*weight[2]-0.09622504486493762*rho[0]*weight[2]-0.09622504486493762*weight[0]*rho[2]+0.1*rho[1]*weight[1]+0.16666666666666669*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[2]],-(0.034523809523809526*rho[19]*weight[19])+0.02*rho[18]*weight[19]-0.02*rho[17]*weight[19]+0.008935182737458497*rho[16]*weight[19]-0.008935182737458497*rho[15]*weight[19]+0.01924500897298753*rho[14]*weight[19]+0.01924500897298753*rho[13]*weight[19]-0.01924500897298753*rho[12]*weight[19]+0.01924500897298753*rho[11]*weight[19]-0.012909944487358056*rho[10]*weight[19]-0.021825396825396828*rho[9]*weight[19]-0.011111111111111112*rho[8]*weight[19]-0.011111111111111112*rho[7]*weight[19]-0.022360679774997897*rho[6]*weight[19]+0.022360679774997897*rho[5]*weight[19]+0.0372677996249965*rho[4]*weight[19]+0.02151657414559676*rho[3]*weight[19]+0.02151657414559676*rho[2]*weight[19]-0.02151657414559676*rho[1]*weight[19]-0.012422599874998833*rho[0]*weight[19]+0.02*weight[18]*rho[19]-0.02*weight[17]*rho[19]+0.008935182737458497*weight[16]*rho[19]-0.008935182737458497*weight[15]*rho[19]+0.01924500897298753*weight[14]*rho[19]+0.01924500897298753*weight[13]*rho[19]-0.01924500897298753*weight[12]*rho[19]+0.01924500897298753*weight[11]*rho[19]-0.012909944487358056*weight[10]*rho[19]-0.021825396825396828*weight[9]*rho[19]-0.011111111111111112*weight[8]*rho[19]-0.011111111111111112*weight[7]*rho[19]-0.022360679774997897*weight[6]*rho[19]+0.022360679774997897*weight[5]*rho[19]+0.0372677996249965*weight[4]*rho[19]+0.02151657414559676*weight[3]*rho[19]+0.02151657414559676*weight[2]*rho[19]-0.02151657414559676*weight[1]*rho[19]-0.012422599874998833*weight[0]*rho[19]-0.034523809523809526*rho[18]*weight[18]-0.02*rho[17]*weight[18]+0.01924500897298753*rho[16]*weight[18]-0.01924500897298753*rho[15]*weight[18]+0.008935182737458497*rho[14]*weight[18]+0.01924500897298753*rho[13]*weight[18]-0.008935182737458497*rho[12]*weight[18]+0.01924500897298753*rho[11]*weight[18]-0.012909944487358056*rho[10]*weight[18]-0.011111111111111112*rho[9]*weight[18]-0.021825396825396828*rho[8]*weight[18]-0.011111111111111112*rho[7]*weight[18]-0.022360679774997897*rho[6]*weight[18]+0.0372677996249965*rho[5]*weight[18]+0.022360679774997897*rho[4]*weight[18]+0.02151657414559676*rho[3]*weight[18]+0.02151657414559676*rho[2]*weight[18]-0.02151657414559676*rho[1]*weight[18]-0.012422599874998833*rho[0]*weight[18]-0.02*weight[17]*rho[18]+0.01924500897298753*weight[16]*rho[18]-0.01924500897298753*weight[15]*rho[18]+0.008935182737458497*weight[14]*rho[18]+0.01924500897298753*weight[13]*rho[18]-0.008935182737458497*weight[12]*rho[18]+0.01924500897298753*weight[11]*rho[18]-0.012909944487358056*weight[10]*rho[18]-0.011111111111111112*weight[9]*rho[18]-0.021825396825396828*weight[8]*rho[18]-0.011111111111111112*weight[7]*rho[18]-0.022360679774997897*weight[6]*rho[18]+0.0372677996249965*weight[5]*rho[18]+0.022360679774997897*weight[4]*rho[18]+0.02151657414559676*weight[3]*rho[18]+0.02151657414559676*weight[2]*rho[18]-0.02151657414559676*weight[1]*rho[18]-0.012422599874998833*weight[0]*rho[18]-0.034523809523809526*rho[17]*weight[17]-0.01924500897298753*rho[16]*weight[17]+0.01924500897298753*rho[15]*weight[17]-0.01924500897298753*rho[14]*weight[17]-0.008935182737458497*rho[13]*weight[17]+0.01924500897298753*rho[12]*weight[17]-0.008935182737458497*rho[11]*weight[17]+0.012909944487358056*rho[10]*weight[17]+0.011111111111111112*rho[9]*weight[17]+0.011111111111111112*rho[8]*weight[17]+0.021825396825396828*rho[7]*weight[17]+0.0372677996249965*rho[6]*weight[17]-0.022360679774997897*rho[5]*weight[17]-0.022360679774997897*rho[4]*weight[17]-0.02151657414559676*rho[3]*weight[17]-0.02151657414559676*rho[2]*weight[17]+0.02151657414559676*rho[1]*weight[17]+0.012422599874998833*rho[0]*weight[17]-0.01924500897298753*weight[16]*rho[17]+0.01924500897298753*weight[15]*rho[17]-0.01924500897298753*weight[14]*rho[17]-0.008935182737458497*weight[13]*rho[17]+0.01924500897298753*weight[12]*rho[17]-0.008935182737458497*weight[11]*rho[17]+0.012909944487358056*weight[10]*rho[17]+0.011111111111111112*weight[9]*rho[17]+0.011111111111111112*weight[8]*rho[17]+0.021825396825396828*weight[7]*rho[17]+0.0372677996249965*weight[6]*rho[17]-0.022360679774997897*weight[5]*rho[17]-0.022360679774997897*weight[4]*rho[17]-0.02151657414559676*weight[3]*rho[17]-0.02151657414559676*weight[2]*rho[17]+0.02151657414559676*weight[1]*rho[17]+0.012422599874998833*weight[0]*rho[17]-0.06785714285714287*rho[16]*weight[16]-0.021825396825396828*rho[15]*weight[16]+0.011111111111111112*rho[14]*weight[16]+0.011111111111111112*rho[13]*weight[16]-0.011111111111111112*rho[12]*weight[16]-0.022360679774997897*rho[10]*weight[16]+0.010309826235529031*rho[9]*weight[16]-0.01924500897298753*rho[8]*weight[16]+0.004303314829119352*rho[6]*weight[16]+0.021516574145596764*rho[5]*weight[16]+0.021516574145596764*rho[4]*weight[16]+0.012422599874998832*rho[3]*weight[16]+0.037267799624996496*rho[2]*weight[16]-0.012422599874998832*rho[1]*weight[16]-0.021516574145596764*rho[0]*weight[16]-0.021825396825396828*weight[15]*rho[16]+0.011111111111111112*weight[14]*rho[16]+0.011111111111111112*weight[13]*rho[16]-0.011111111111111112*weight[12]*rho[16]-0.022360679774997897*weight[10]*rho[16]+0.010309826235529031*weight[9]*rho[16]-0.01924500897298753*weight[8]*rho[16]+0.004303314829119352*weight[6]*rho[16]+0.021516574145596764*weight[5]*rho[16]+0.021516574145596764*weight[4]*rho[16]+0.012422599874998832*weight[3]*rho[16]+0.037267799624996496*weight[2]*rho[16]-0.012422599874998832*weight[1]*rho[16]-0.021516574145596764*weight[0]*rho[16]-0.06785714285714287*rho[15]*weight[15]-0.011111111111111112*rho[14]*weight[15]-0.011111111111111112*rho[13]*weight[15]-0.011111111111111112*rho[11]*weight[15]+0.022360679774997897*rho[10]*weight[15]-0.010309826235529031*rho[9]*weight[15]+0.01924500897298753*rho[7]*weight[15]+0.021516574145596764*rho[6]*weight[15]+0.004303314829119352*rho[5]*weight[15]-0.021516574145596764*rho[4]*weight[15]-0.012422599874998832*rho[3]*weight[15]-0.012422599874998832*rho[2]*weight[15]+0.037267799624996496*rho[1]*weight[15]+0.021516574145596764*rho[0]*weight[15]-0.011111111111111112*weight[14]*rho[15]-0.011111111111111112*weight[13]*rho[15]-0.011111111111111112*weight[11]*rho[15]+0.022360679774997897*weight[10]*rho[15]-0.010309826235529031*weight[9]*rho[15]+0.01924500897298753*weight[7]*rho[15]+0.021516574145596764*weight[6]*rho[15]+0.004303314829119352*weight[5]*rho[15]-0.021516574145596764*weight[4]*rho[15]-0.012422599874998832*weight[3]*rho[15]-0.012422599874998832*weight[2]*rho[15]+0.037267799624996496*weight[1]*rho[15]+0.021516574145596764*weight[0]*rho[15]-0.06785714285714287*rho[14]*weight[14]-0.021825396825396828*rho[12]*weight[14]+0.011111111111111112*rho[11]*weight[14]-0.022360679774997897*rho[10]*weight[14]-0.01924500897298753*rho[9]*weight[14]+0.010309826235529031*rho[8]*weight[14]+0.004303314829119352*rho[6]*weight[14]+0.021516574145596764*rho[5]*weight[14]+0.021516574145596764*rho[4]*weight[14]+0.037267799624996496*rho[3]*weight[14]+0.012422599874998832*rho[2]*weight[14]-0.012422599874998832*rho[1]*weight[14]-0.021516574145596764*rho[0]*weight[14]-0.021825396825396828*weight[12]*rho[14]+0.011111111111111112*weight[11]*rho[14]-0.022360679774997897*weight[10]*rho[14]-0.01924500897298753*weight[9]*rho[14]+0.010309826235529031*weight[8]*rho[14]+0.004303314829119352*weight[6]*rho[14]+0.021516574145596764*weight[5]*rho[14]+0.021516574145596764*weight[4]*rho[14]+0.037267799624996496*weight[3]*rho[14]+0.012422599874998832*weight[2]*rho[14]-0.012422599874998832*weight[1]*rho[14]-0.021516574145596764*weight[0]*rho[14]-0.06785714285714287*rho[13]*weight[13]-0.011111111111111112*rho[12]*weight[13]+0.021825396825396828*rho[11]*weight[13]-0.022360679774997897*rho[10]*weight[13]-0.01924500897298753*rho[9]*weight[13]+0.010309826235529031*rho[7]*weight[13]-0.021516574145596764*rho[6]*weight[13]-0.004303314829119352*rho[5]*weight[13]+0.021516574145596764*rho[4]*weight[13]+0.037267799624996496*rho[3]*weight[13]+0.012422599874998832*rho[2]*weight[13]-0.012422599874998832*rho[1]*weight[13]-0.021516574145596764*rho[0]*weight[13]-0.011111111111111112*weight[12]*rho[13]+0.021825396825396828*weight[11]*rho[13]-0.022360679774997897*weight[10]*rho[13]-0.01924500897298753*weight[9]*rho[13]+0.010309826235529031*weight[7]*rho[13]-0.021516574145596764*weight[6]*rho[13]-0.004303314829119352*weight[5]*rho[13]+0.021516574145596764*weight[4]*rho[13]+0.037267799624996496*weight[3]*rho[13]+0.012422599874998832*weight[2]*rho[13]-0.012422599874998832*weight[1]*rho[13]-0.021516574145596764*weight[0]*rho[13]-0.06785714285714287*rho[12]*weight[12]-0.011111111111111112*rho[11]*weight[12]+0.022360679774997897*rho[10]*weight[12]-0.010309826235529031*rho[8]*weight[12]+0.01924500897298753*rho[7]*weight[12]+0.021516574145596764*rho[6]*weight[12]-0.021516574145596764*rho[5]*weight[12]+0.004303314829119352*rho[4]*weight[12]-0.012422599874998832*rho[3]*weight[12]-0.012422599874998832*rho[2]*weight[12]+0.037267799624996496*rho[1]*weight[12]+0.021516574145596764*rho[0]*weight[12]-0.011111111111111112*weight[11]*rho[12]+0.022360679774997897*weight[10]*rho[12]-0.010309826235529031*weight[8]*rho[12]+0.01924500897298753*weight[7]*rho[12]+0.021516574145596764*weight[6]*rho[12]-0.021516574145596764*weight[5]*rho[12]+0.004303314829119352*weight[4]*rho[12]-0.012422599874998832*weight[3]*rho[12]-0.012422599874998832*weight[2]*rho[12]+0.037267799624996496*weight[1]*rho[12]+0.021516574145596764*weight[0]*rho[12]-0.06785714285714287*rho[11]*weight[11]-0.022360679774997897*rho[10]*weight[11]-0.01924500897298753*rho[8]*weight[11]+0.010309826235529031*rho[7]*weight[11]-0.021516574145596764*rho[6]*weight[11]+0.021516574145596764*rho[5]*weight[11]-0.004303314829119352*rho[4]*weight[11]+0.012422599874998832*rho[3]*weight[11]+0.037267799624996496*rho[2]*weight[11]-0.012422599874998832*rho[1]*weight[11]-0.021516574145596764*rho[0]*weight[11]-0.022360679774997897*weight[10]*rho[11]-0.01924500897298753*weight[8]*rho[11]+0.010309826235529031*weight[7]*rho[11]-0.021516574145596764*weight[6]*rho[11]+0.021516574145596764*weight[5]*rho[11]-0.004303314829119352*weight[4]*rho[11]+0.012422599874998832*weight[3]*rho[11]+0.037267799624996496*weight[2]*rho[11]-0.012422599874998832*weight[1]*rho[11]-0.021516574145596764*weight[0]*rho[11]-0.025*rho[10]*weight[10]+0.02151657414559676*rho[9]*weight[10]+0.02151657414559676*rho[8]*weight[10]+0.02151657414559676*rho[7]*weight[10]+0.014433756729740645*rho[6]*weight[10]-0.014433756729740645*rho[5]*weight[10]-0.014433756729740645*rho[4]*weight[10]-0.025*rho[3]*weight[10]-0.025*rho[2]*weight[10]+0.025*rho[1]*weight[10]+0.024056261216234404*rho[0]*weight[10]+0.02151657414559676*weight[9]*rho[10]+0.02151657414559676*weight[8]*rho[10]+0.02151657414559676*weight[7]*rho[10]+0.014433756729740645*weight[6]*rho[10]-0.014433756729740645*weight[5]*rho[10]-0.014433756729740645*weight[4]*rho[10]-0.025*weight[3]*rho[10]-0.025*weight[2]*rho[10]+0.025*weight[1]*rho[10]+0.024056261216234404*weight[0]*rho[10]-0.10119047619047619*rho[9]*weight[9]+0.012422599874998833*rho[6]*weight[9]-0.012422599874998833*rho[5]*weight[9]-0.012422599874998833*rho[4]*weight[9]+0.02151657414559676*rho[3]*weight[9]-0.02151657414559676*rho[2]*weight[9]+0.02151657414559676*rho[1]*weight[9]+0.0372677996249965*rho[0]*weight[9]+0.012422599874998833*weight[6]*rho[9]-0.012422599874998833*weight[5]*rho[9]-0.012422599874998833*weight[4]*rho[9]+0.02151657414559676*weight[3]*rho[9]-0.02151657414559676*weight[2]*rho[9]+0.02151657414559676*weight[1]*rho[9]+0.0372677996249965*weight[0]*rho[9]-0.10119047619047619*rho[8]*weight[8]+0.012422599874998833*rho[6]*weight[8]-0.012422599874998833*rho[5]*weight[8]-0.012422599874998833*rho[4]*weight[8]-0.02151657414559676*rho[3]*weight[8]+0.02151657414559676*rho[2]*weight[8]+0.02151657414559676*rho[1]*weight[8]+0.0372677996249965*rho[0]*weight[8]+0.012422599874998833*weight[6]*rho[8]-0.012422599874998833*weight[5]*rho[8]-0.012422599874998833*weight[4]*rho[8]-0.02151657414559676*weight[3]*rho[8]+0.02151657414559676*weight[2]*rho[8]+0.02151657414559676*weight[1]*rho[8]+0.0372677996249965*weight[0]*rho[8]-0.10119047619047619*rho[7]*weight[7]+0.012422599874998833*rho[6]*weight[7]-0.012422599874998833*rho[5]*weight[7]-0.012422599874998833*rho[4]*weight[7]-0.02151657414559676*rho[3]*weight[7]-0.02151657414559676*rho[2]*weight[7]-0.02151657414559676*rho[1]*weight[7]+0.0372677996249965*rho[0]*weight[7]+0.012422599874998833*weight[6]*rho[7]-0.012422599874998833*weight[5]*rho[7]-0.012422599874998833*weight[4]*rho[7]-0.02151657414559676*weight[3]*rho[7]-0.02151657414559676*weight[2]*rho[7]-0.02151657414559676*weight[1]*rho[7]+0.0372677996249965*weight[0]*rho[7]-0.058333333333333334*rho[6]*weight[6]-0.025*rho[5]*weight[6]-0.025*rho[4]*weight[6]+0.004811252243246881*rho[3]*weight[6]+0.004811252243246881*rho[2]*weight[6]+0.024056261216234404*rho[1]*weight[6]+0.01388888888888889*rho[0]*weight[6]-0.025*weight[5]*rho[6]-0.025*weight[4]*rho[6]+0.004811252243246881*weight[3]*rho[6]+0.004811252243246881*weight[2]*rho[6]+0.024056261216234404*weight[1]*rho[6]+0.01388888888888889*weight[0]*rho[6]-0.058333333333333334*rho[5]*weight[5]+0.025*rho[4]*weight[5]-0.004811252243246881*rho[3]*weight[5]+0.024056261216234404*rho[2]*weight[5]+0.004811252243246881*rho[1]*weight[5]-0.01388888888888889*rho[0]*weight[5]+0.025*weight[4]*rho[5]-0.004811252243246881*weight[3]*rho[5]+0.024056261216234404*weight[2]*rho[5]+0.004811252243246881*weight[1]*rho[5]-0.01388888888888889*weight[0]*rho[5]-0.058333333333333334*rho[4]*weight[4]+0.024056261216234404*rho[3]*weight[4]-0.004811252243246881*rho[2]*weight[4]+0.004811252243246881*rho[1]*weight[4]-0.01388888888888889*rho[0]*weight[4]+0.024056261216234404*weight[3]*rho[4]-0.004811252243246881*weight[2]*rho[4]+0.004811252243246881*weight[1]*rho[4]-0.01388888888888889*weight[0]*rho[4]-0.09166666666666667*rho[3]*weight[3]+0.01388888888888889*rho[2]*weight[3]-0.01388888888888889*rho[1]*weight[3]+0.024056261216234404*rho[0]*weight[3]+0.01388888888888889*weight[2]*rho[3]-0.01388888888888889*weight[1]*rho[3]+0.024056261216234404*weight[0]*rho[3]-0.09166666666666667*rho[2]*weight[2]-0.01388888888888889*rho[1]*weight[2]+0.024056261216234404*rho[0]*weight[2]-0.01388888888888889*weight[1]*rho[2]+0.024056261216234404*weight[0]*rho[2]-0.09166666666666667*rho[1]*weight[1]-0.024056261216234404*rho[0]*weight[1]-0.024056261216234404*weight[0]*rho[1]-0.125*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[2]] += -(0.034523809523809526*rho[19]*weight[19])+0.02*rho[18]*weight[19]-0.02*rho[17]*weight[19]+0.008935182737458497*rho[16]*weight[19]-0.008935182737458497*rho[15]*weight[19]+0.01924500897298753*rho[14]*weight[19]+0.01924500897298753*rho[13]*weight[19]-0.01924500897298753*rho[12]*weight[19]+0.01924500897298753*rho[11]*weight[19]-0.012909944487358056*rho[10]*weight[19]-0.021825396825396828*rho[9]*weight[19]-0.011111111111111112*rho[8]*weight[19]-0.011111111111111112*rho[7]*weight[19]-0.022360679774997897*rho[6]*weight[19]+0.022360679774997897*rho[5]*weight[19]+0.0372677996249965*rho[4]*weight[19]+0.02151657414559676*rho[3]*weight[19]+0.02151657414559676*rho[2]*weight[19]-0.02151657414559676*rho[1]*weight[19]-0.012422599874998833*rho[0]*weight[19]+0.02*weight[18]*rho[19]-0.02*weight[17]*rho[19]+0.008935182737458497*weight[16]*rho[19]-0.008935182737458497*weight[15]*rho[19]+0.01924500897298753*weight[14]*rho[19]+0.01924500897298753*weight[13]*rho[19]-0.01924500897298753*weight[12]*rho[19]+0.01924500897298753*weight[11]*rho[19]-0.012909944487358056*weight[10]*rho[19]-0.021825396825396828*weight[9]*rho[19]-0.011111111111111112*weight[8]*rho[19]-0.011111111111111112*weight[7]*rho[19]-0.022360679774997897*weight[6]*rho[19]+0.022360679774997897*weight[5]*rho[19]+0.0372677996249965*weight[4]*rho[19]+0.02151657414559676*weight[3]*rho[19]+0.02151657414559676*weight[2]*rho[19]-0.02151657414559676*weight[1]*rho[19]-0.012422599874998833*weight[0]*rho[19]-0.034523809523809526*rho[18]*weight[18]-0.02*rho[17]*weight[18]+0.01924500897298753*rho[16]*weight[18]-0.01924500897298753*rho[15]*weight[18]+0.008935182737458497*rho[14]*weight[18]+0.01924500897298753*rho[13]*weight[18]-0.008935182737458497*rho[12]*weight[18]+0.01924500897298753*rho[11]*weight[18]-0.012909944487358056*rho[10]*weight[18]-0.011111111111111112*rho[9]*weight[18]-0.021825396825396828*rho[8]*weight[18]-0.011111111111111112*rho[7]*weight[18]-0.022360679774997897*rho[6]*weight[18]+0.0372677996249965*rho[5]*weight[18]+0.022360679774997897*rho[4]*weight[18]+0.02151657414559676*rho[3]*weight[18]+0.02151657414559676*rho[2]*weight[18]-0.02151657414559676*rho[1]*weight[18]-0.012422599874998833*rho[0]*weight[18]-0.02*weight[17]*rho[18]+0.01924500897298753*weight[16]*rho[18]-0.01924500897298753*weight[15]*rho[18]+0.008935182737458497*weight[14]*rho[18]+0.01924500897298753*weight[13]*rho[18]-0.008935182737458497*weight[12]*rho[18]+0.01924500897298753*weight[11]*rho[18]-0.012909944487358056*weight[10]*rho[18]-0.011111111111111112*weight[9]*rho[18]-0.021825396825396828*weight[8]*rho[18]-0.011111111111111112*weight[7]*rho[18]-0.022360679774997897*weight[6]*rho[18]+0.0372677996249965*weight[5]*rho[18]+0.022360679774997897*weight[4]*rho[18]+0.02151657414559676*weight[3]*rho[18]+0.02151657414559676*weight[2]*rho[18]-0.02151657414559676*weight[1]*rho[18]-0.012422599874998833*weight[0]*rho[18]-0.034523809523809526*rho[17]*weight[17]-0.01924500897298753*rho[16]*weight[17]+0.01924500897298753*rho[15]*weight[17]-0.01924500897298753*rho[14]*weight[17]-0.008935182737458497*rho[13]*weight[17]+0.01924500897298753*rho[12]*weight[17]-0.008935182737458497*rho[11]*weight[17]+0.012909944487358056*rho[10]*weight[17]+0.011111111111111112*rho[9]*weight[17]+0.011111111111111112*rho[8]*weight[17]+0.021825396825396828*rho[7]*weight[17]+0.0372677996249965*rho[6]*weight[17]-0.022360679774997897*rho[5]*weight[17]-0.022360679774997897*rho[4]*weight[17]-0.02151657414559676*rho[3]*weight[17]-0.02151657414559676*rho[2]*weight[17]+0.02151657414559676*rho[1]*weight[17]+0.012422599874998833*rho[0]*weight[17]-0.01924500897298753*weight[16]*rho[17]+0.01924500897298753*weight[15]*rho[17]-0.01924500897298753*weight[14]*rho[17]-0.008935182737458497*weight[13]*rho[17]+0.01924500897298753*weight[12]*rho[17]-0.008935182737458497*weight[11]*rho[17]+0.012909944487358056*weight[10]*rho[17]+0.011111111111111112*weight[9]*rho[17]+0.011111111111111112*weight[8]*rho[17]+0.021825396825396828*weight[7]*rho[17]+0.0372677996249965*weight[6]*rho[17]-0.022360679774997897*weight[5]*rho[17]-0.022360679774997897*weight[4]*rho[17]-0.02151657414559676*weight[3]*rho[17]-0.02151657414559676*weight[2]*rho[17]+0.02151657414559676*weight[1]*rho[17]+0.012422599874998833*weight[0]*rho[17]-0.06785714285714287*rho[16]*weight[16]-0.021825396825396828*rho[15]*weight[16]+0.011111111111111112*rho[14]*weight[16]+0.011111111111111112*rho[13]*weight[16]-0.011111111111111112*rho[12]*weight[16]-0.022360679774997897*rho[10]*weight[16]+0.010309826235529031*rho[9]*weight[16]-0.01924500897298753*rho[8]*weight[16]+0.004303314829119352*rho[6]*weight[16]+0.021516574145596764*rho[5]*weight[16]+0.021516574145596764*rho[4]*weight[16]+0.012422599874998832*rho[3]*weight[16]+0.037267799624996496*rho[2]*weight[16]-0.012422599874998832*rho[1]*weight[16]-0.021516574145596764*rho[0]*weight[16]-0.021825396825396828*weight[15]*rho[16]+0.011111111111111112*weight[14]*rho[16]+0.011111111111111112*weight[13]*rho[16]-0.011111111111111112*weight[12]*rho[16]-0.022360679774997897*weight[10]*rho[16]+0.010309826235529031*weight[9]*rho[16]-0.01924500897298753*weight[8]*rho[16]+0.004303314829119352*weight[6]*rho[16]+0.021516574145596764*weight[5]*rho[16]+0.021516574145596764*weight[4]*rho[16]+0.012422599874998832*weight[3]*rho[16]+0.037267799624996496*weight[2]*rho[16]-0.012422599874998832*weight[1]*rho[16]-0.021516574145596764*weight[0]*rho[16]-0.06785714285714287*rho[15]*weight[15]-0.011111111111111112*rho[14]*weight[15]-0.011111111111111112*rho[13]*weight[15]-0.011111111111111112*rho[11]*weight[15]+0.022360679774997897*rho[10]*weight[15]-0.010309826235529031*rho[9]*weight[15]+0.01924500897298753*rho[7]*weight[15]+0.021516574145596764*rho[6]*weight[15]+0.004303314829119352*rho[5]*weight[15]-0.021516574145596764*rho[4]*weight[15]-0.012422599874998832*rho[3]*weight[15]-0.012422599874998832*rho[2]*weight[15]+0.037267799624996496*rho[1]*weight[15]+0.021516574145596764*rho[0]*weight[15]-0.011111111111111112*weight[14]*rho[15]-0.011111111111111112*weight[13]*rho[15]-0.011111111111111112*weight[11]*rho[15]+0.022360679774997897*weight[10]*rho[15]-0.010309826235529031*weight[9]*rho[15]+0.01924500897298753*weight[7]*rho[15]+0.021516574145596764*weight[6]*rho[15]+0.004303314829119352*weight[5]*rho[15]-0.021516574145596764*weight[4]*rho[15]-0.012422599874998832*weight[3]*rho[15]-0.012422599874998832*weight[2]*rho[15]+0.037267799624996496*weight[1]*rho[15]+0.021516574145596764*weight[0]*rho[15]-0.06785714285714287*rho[14]*weight[14]-0.021825396825396828*rho[12]*weight[14]+0.011111111111111112*rho[11]*weight[14]-0.022360679774997897*rho[10]*weight[14]-0.01924500897298753*rho[9]*weight[14]+0.010309826235529031*rho[8]*weight[14]+0.004303314829119352*rho[6]*weight[14]+0.021516574145596764*rho[5]*weight[14]+0.021516574145596764*rho[4]*weight[14]+0.037267799624996496*rho[3]*weight[14]+0.012422599874998832*rho[2]*weight[14]-0.012422599874998832*rho[1]*weight[14]-0.021516574145596764*rho[0]*weight[14]-0.021825396825396828*weight[12]*rho[14]+0.011111111111111112*weight[11]*rho[14]-0.022360679774997897*weight[10]*rho[14]-0.01924500897298753*weight[9]*rho[14]+0.010309826235529031*weight[8]*rho[14]+0.004303314829119352*weight[6]*rho[14]+0.021516574145596764*weight[5]*rho[14]+0.021516574145596764*weight[4]*rho[14]+0.037267799624996496*weight[3]*rho[14]+0.012422599874998832*weight[2]*rho[14]-0.012422599874998832*weight[1]*rho[14]-0.021516574145596764*weight[0]*rho[14]-0.06785714285714287*rho[13]*weight[13]-0.011111111111111112*rho[12]*weight[13]+0.021825396825396828*rho[11]*weight[13]-0.022360679774997897*rho[10]*weight[13]-0.01924500897298753*rho[9]*weight[13]+0.010309826235529031*rho[7]*weight[13]-0.021516574145596764*rho[6]*weight[13]-0.004303314829119352*rho[5]*weight[13]+0.021516574145596764*rho[4]*weight[13]+0.037267799624996496*rho[3]*weight[13]+0.012422599874998832*rho[2]*weight[13]-0.012422599874998832*rho[1]*weight[13]-0.021516574145596764*rho[0]*weight[13]-0.011111111111111112*weight[12]*rho[13]+0.021825396825396828*weight[11]*rho[13]-0.022360679774997897*weight[10]*rho[13]-0.01924500897298753*weight[9]*rho[13]+0.010309826235529031*weight[7]*rho[13]-0.021516574145596764*weight[6]*rho[13]-0.004303314829119352*weight[5]*rho[13]+0.021516574145596764*weight[4]*rho[13]+0.037267799624996496*weight[3]*rho[13]+0.012422599874998832*weight[2]*rho[13]-0.012422599874998832*weight[1]*rho[13]-0.021516574145596764*weight[0]*rho[13]-0.06785714285714287*rho[12]*weight[12]-0.011111111111111112*rho[11]*weight[12]+0.022360679774997897*rho[10]*weight[12]-0.010309826235529031*rho[8]*weight[12]+0.01924500897298753*rho[7]*weight[12]+0.021516574145596764*rho[6]*weight[12]-0.021516574145596764*rho[5]*weight[12]+0.004303314829119352*rho[4]*weight[12]-0.012422599874998832*rho[3]*weight[12]-0.012422599874998832*rho[2]*weight[12]+0.037267799624996496*rho[1]*weight[12]+0.021516574145596764*rho[0]*weight[12]-0.011111111111111112*weight[11]*rho[12]+0.022360679774997897*weight[10]*rho[12]-0.010309826235529031*weight[8]*rho[12]+0.01924500897298753*weight[7]*rho[12]+0.021516574145596764*weight[6]*rho[12]-0.021516574145596764*weight[5]*rho[12]+0.004303314829119352*weight[4]*rho[12]-0.012422599874998832*weight[3]*rho[12]-0.012422599874998832*weight[2]*rho[12]+0.037267799624996496*weight[1]*rho[12]+0.021516574145596764*weight[0]*rho[12]-0.06785714285714287*rho[11]*weight[11]-0.022360679774997897*rho[10]*weight[11]-0.01924500897298753*rho[8]*weight[11]+0.010309826235529031*rho[7]*weight[11]-0.021516574145596764*rho[6]*weight[11]+0.021516574145596764*rho[5]*weight[11]-0.004303314829119352*rho[4]*weight[11]+0.012422599874998832*rho[3]*weight[11]+0.037267799624996496*rho[2]*weight[11]-0.012422599874998832*rho[1]*weight[11]-0.021516574145596764*rho[0]*weight[11]-0.022360679774997897*weight[10]*rho[11]-0.01924500897298753*weight[8]*rho[11]+0.010309826235529031*weight[7]*rho[11]-0.021516574145596764*weight[6]*rho[11]+0.021516574145596764*weight[5]*rho[11]-0.004303314829119352*weight[4]*rho[11]+0.012422599874998832*weight[3]*rho[11]+0.037267799624996496*weight[2]*rho[11]-0.012422599874998832*weight[1]*rho[11]-0.021516574145596764*weight[0]*rho[11]-0.025*rho[10]*weight[10]+0.02151657414559676*rho[9]*weight[10]+0.02151657414559676*rho[8]*weight[10]+0.02151657414559676*rho[7]*weight[10]+0.014433756729740645*rho[6]*weight[10]-0.014433756729740645*rho[5]*weight[10]-0.014433756729740645*rho[4]*weight[10]-0.025*rho[3]*weight[10]-0.025*rho[2]*weight[10]+0.025*rho[1]*weight[10]+0.024056261216234404*rho[0]*weight[10]+0.02151657414559676*weight[9]*rho[10]+0.02151657414559676*weight[8]*rho[10]+0.02151657414559676*weight[7]*rho[10]+0.014433756729740645*weight[6]*rho[10]-0.014433756729740645*weight[5]*rho[10]-0.014433756729740645*weight[4]*rho[10]-0.025*weight[3]*rho[10]-0.025*weight[2]*rho[10]+0.025*weight[1]*rho[10]+0.024056261216234404*weight[0]*rho[10]-0.10119047619047619*rho[9]*weight[9]+0.012422599874998833*rho[6]*weight[9]-0.012422599874998833*rho[5]*weight[9]-0.012422599874998833*rho[4]*weight[9]+0.02151657414559676*rho[3]*weight[9]-0.02151657414559676*rho[2]*weight[9]+0.02151657414559676*rho[1]*weight[9]+0.0372677996249965*rho[0]*weight[9]+0.012422599874998833*weight[6]*rho[9]-0.012422599874998833*weight[5]*rho[9]-0.012422599874998833*weight[4]*rho[9]+0.02151657414559676*weight[3]*rho[9]-0.02151657414559676*weight[2]*rho[9]+0.02151657414559676*weight[1]*rho[9]+0.0372677996249965*weight[0]*rho[9]-0.10119047619047619*rho[8]*weight[8]+0.012422599874998833*rho[6]*weight[8]-0.012422599874998833*rho[5]*weight[8]-0.012422599874998833*rho[4]*weight[8]-0.02151657414559676*rho[3]*weight[8]+0.02151657414559676*rho[2]*weight[8]+0.02151657414559676*rho[1]*weight[8]+0.0372677996249965*rho[0]*weight[8]+0.012422599874998833*weight[6]*rho[8]-0.012422599874998833*weight[5]*rho[8]-0.012422599874998833*weight[4]*rho[8]-0.02151657414559676*weight[3]*rho[8]+0.02151657414559676*weight[2]*rho[8]+0.02151657414559676*weight[1]*rho[8]+0.0372677996249965*weight[0]*rho[8]-0.10119047619047619*rho[7]*weight[7]+0.012422599874998833*rho[6]*weight[7]-0.012422599874998833*rho[5]*weight[7]-0.012422599874998833*rho[4]*weight[7]-0.02151657414559676*rho[3]*weight[7]-0.02151657414559676*rho[2]*weight[7]-0.02151657414559676*rho[1]*weight[7]+0.0372677996249965*rho[0]*weight[7]+0.012422599874998833*weight[6]*rho[7]-0.012422599874998833*weight[5]*rho[7]-0.012422599874998833*weight[4]*rho[7]-0.02151657414559676*weight[3]*rho[7]-0.02151657414559676*weight[2]*rho[7]-0.02151657414559676*weight[1]*rho[7]+0.0372677996249965*weight[0]*rho[7]-0.058333333333333334*rho[6]*weight[6]-0.025*rho[5]*weight[6]-0.025*rho[4]*weight[6]+0.004811252243246881*rho[3]*weight[6]+0.004811252243246881*rho[2]*weight[6]+0.024056261216234404*rho[1]*weight[6]+0.01388888888888889*rho[0]*weight[6]-0.025*weight[5]*rho[6]-0.025*weight[4]*rho[6]+0.004811252243246881*weight[3]*rho[6]+0.004811252243246881*weight[2]*rho[6]+0.024056261216234404*weight[1]*rho[6]+0.01388888888888889*weight[0]*rho[6]-0.058333333333333334*rho[5]*weight[5]+0.025*rho[4]*weight[5]-0.004811252243246881*rho[3]*weight[5]+0.024056261216234404*rho[2]*weight[5]+0.004811252243246881*rho[1]*weight[5]-0.01388888888888889*rho[0]*weight[5]+0.025*weight[4]*rho[5]-0.004811252243246881*weight[3]*rho[5]+0.024056261216234404*weight[2]*rho[5]+0.004811252243246881*weight[1]*rho[5]-0.01388888888888889*weight[0]*rho[5]-0.058333333333333334*rho[4]*weight[4]+0.024056261216234404*rho[3]*weight[4]-0.004811252243246881*rho[2]*weight[4]+0.004811252243246881*rho[1]*weight[4]-0.01388888888888889*rho[0]*weight[4]+0.024056261216234404*weight[3]*rho[4]-0.004811252243246881*weight[2]*rho[4]+0.004811252243246881*weight[1]*rho[4]-0.01388888888888889*weight[0]*rho[4]-0.09166666666666667*rho[3]*weight[3]+0.01388888888888889*rho[2]*weight[3]-0.01388888888888889*rho[1]*weight[3]+0.024056261216234404*rho[0]*weight[3]+0.01388888888888889*weight[2]*rho[3]-0.01388888888888889*weight[1]*rho[3]+0.024056261216234404*weight[0]*rho[3]-0.09166666666666667*rho[2]*weight[2]-0.01388888888888889*rho[1]*weight[2]+0.024056261216234404*rho[0]*weight[2]-0.01388888888888889*weight[1]*rho[2]+0.024056261216234404*weight[0]*rho[2]-0.09166666666666667*rho[1]*weight[1]-0.024056261216234404*rho[0]*weight[1]-0.024056261216234404*weight[0]*rho[1]-0.125*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[3]],0.1*rho[19]*weight[19]+0.02666666666666667*rho[17]*weight[19]-0.05773502691896258*rho[16]*weight[19]-0.051639777949432225*rho[10]*weight[19]+0.029814239699997195*rho[6]*weight[19]+0.02666666666666667*weight[17]*rho[19]-0.05773502691896258*weight[16]*rho[19]-0.051639777949432225*weight[10]*rho[19]+0.029814239699997195*weight[6]*rho[19]+0.11904761904761905*rho[18]*weight[18]+0.03849001794597506*rho[15]*weight[18]-0.06873217490352689*rho[14]*weight[18]+0.03849001794597506*rho[13]*weight[18]-0.06873217490352689*rho[12]*weight[18]-0.022222222222222223*rho[9]*weight[18]+0.03968253968253969*rho[8]*weight[18]-0.022222222222222223*rho[7]*weight[18]-0.074535599249993*rho[5]*weight[18]+0.04303314829119352*rho[3]*weight[18]+0.04303314829119352*rho[1]*weight[18]-0.024845199749997667*rho[0]*weight[18]+0.03849001794597506*weight[15]*rho[18]-0.06873217490352689*weight[14]*rho[18]+0.03849001794597506*weight[13]*rho[18]-0.06873217490352689*weight[12]*rho[18]-0.022222222222222223*weight[9]*rho[18]+0.03968253968253969*weight[8]*rho[18]-0.022222222222222223*weight[7]*rho[18]-0.074535599249993*weight[5]*rho[18]+0.04303314829119352*weight[3]*rho[18]+0.04303314829119352*weight[1]*rho[18]-0.024845199749997667*weight[0]*rho[18]+0.1*rho[17]*weight[17]-0.05773502691896258*rho[11]*weight[17]-0.051639777949432225*rho[10]*weight[17]+0.029814239699997195*rho[4]*weight[17]-0.05773502691896258*weight[11]*rho[17]-0.051639777949432225*weight[10]*rho[17]+0.029814239699997195*weight[4]*rho[17]+0.1*rho[16]*weight[16]+0.029814239699997195*rho[10]*weight[16]-0.05163977794943223*rho[6]*weight[16]+0.029814239699997195*weight[10]*rho[16]-0.05163977794943223*weight[6]*rho[16]+0.16666666666666669*rho[15]*weight[15]-0.022222222222222223*rho[14]*weight[15]+0.044444444444444446*rho[13]*weight[15]-0.09622504486493764*rho[9]*weight[15]-0.08606629658238706*rho[5]*weight[15]+0.049690399499995326*rho[3]*weight[15]-0.022222222222222223*weight[14]*rho[15]+0.044444444444444446*weight[13]*rho[15]-0.09622504486493764*weight[9]*rho[15]-0.08606629658238706*weight[5]*rho[15]+0.049690399499995326*weight[3]*rho[15]+0.11904761904761905*rho[14]*weight[14]+0.03968253968253969*rho[12]*weight[14]+0.03849001794597506*rho[9]*weight[14]-0.06873217490352689*rho[8]*weight[14]+0.04303314829119353*rho[5]*weight[14]-0.07453559924999299*rho[3]*weight[14]-0.024845199749997663*rho[1]*weight[14]+0.04303314829119353*rho[0]*weight[14]+0.03968253968253969*weight[12]*rho[14]+0.03849001794597506*weight[9]*rho[14]-0.06873217490352689*weight[8]*rho[14]+0.04303314829119353*weight[5]*rho[14]-0.07453559924999299*weight[3]*rho[14]-0.024845199749997663*weight[1]*rho[14]+0.04303314829119353*weight[0]*rho[14]+0.16666666666666669*rho[13]*weight[13]-0.022222222222222223*rho[12]*weight[13]-0.09622504486493764*rho[7]*weight[13]-0.08606629658238706*rho[5]*weight[13]+0.049690399499995326*rho[1]*weight[13]-0.022222222222222223*weight[12]*rho[13]-0.09622504486493764*weight[7]*rho[13]-0.08606629658238706*weight[5]*rho[13]+0.049690399499995326*weight[1]*rho[13]+0.11904761904761905*rho[12]*weight[12]-0.06873217490352689*rho[8]*weight[12]+0.03849001794597506*rho[7]*weight[12]+0.04303314829119353*rho[5]*weight[12]-0.024845199749997663*rho[3]*weight[12]-0.07453559924999299*rho[1]*weight[12]+0.04303314829119353*rho[0]*weight[12]-0.06873217490352689*weight[8]*rho[12]+0.03849001794597506*weight[7]*rho[12]+0.04303314829119353*weight[5]*rho[12]-0.024845199749997663*weight[3]*rho[12]-0.07453559924999299*weight[1]*rho[12]+0.04303314829119353*weight[0]*rho[12]+0.1*rho[11]*weight[11]+0.029814239699997195*rho[10]*weight[11]-0.05163977794943223*rho[4]*weight[11]+0.029814239699997195*weight[10]*rho[11]-0.05163977794943223*weight[4]*rho[11]+0.1*rho[10]*weight[10]-0.05773502691896258*rho[6]*weight[10]-0.05773502691896258*rho[4]*weight[10]+0.03333333333333333*rho[2]*weight[10]-0.05773502691896258*weight[6]*rho[10]-0.05773502691896258*weight[4]*rho[10]+0.03333333333333333*weight[2]*rho[10]+0.16666666666666669*rho[9]*weight[9]+0.04969039949999533*rho[5]*weight[9]-0.08606629658238704*rho[3]*weight[9]+0.04969039949999533*weight[5]*rho[9]-0.08606629658238704*weight[3]*rho[9]+0.11904761904761905*rho[8]*weight[8]-0.024845199749997667*rho[5]*weight[8]+0.04303314829119352*rho[3]*weight[8]+0.04303314829119352*rho[1]*weight[8]-0.074535599249993*rho[0]*weight[8]-0.024845199749997667*weight[5]*rho[8]+0.04303314829119352*weight[3]*rho[8]+0.04303314829119352*weight[1]*rho[8]-0.074535599249993*weight[0]*rho[8]+0.16666666666666669*rho[7]*weight[7]+0.04969039949999533*rho[5]*weight[7]-0.08606629658238704*rho[1]*weight[7]+0.04969039949999533*weight[5]*rho[7]-0.08606629658238704*weight[1]*rho[7]+0.1*rho[6]*weight[6]+0.03333333333333333*rho[4]*weight[6]-0.05773502691896258*rho[2]*weight[6]+0.03333333333333333*weight[4]*rho[6]-0.05773502691896258*weight[2]*rho[6]+0.16666666666666669*rho[5]*weight[5]-0.09622504486493762*rho[3]*weight[5]-0.09622504486493762*rho[1]*weight[5]+0.05555555555555556*rho[0]*weight[5]-0.09622504486493762*weight[3]*rho[5]-0.09622504486493762*weight[1]*rho[5]+0.05555555555555556*weight[0]*rho[5]+0.1*rho[4]*weight[4]-0.05773502691896258*rho[2]*weight[4]-0.05773502691896258*weight[2]*rho[4]+0.16666666666666669*rho[3]*weight[3]+0.05555555555555556*rho[1]*weight[3]-0.09622504486493762*rho[0]*weight[3]+0.05555555555555556*weight[1]*rho[3]-0.09622504486493762*weight[0]*rho[3]+0.1*rho[2]*weight[2]+0.16666666666666669*rho[1]*weight[1]-0.09622504486493762*rho[0]*weight[1]-0.09622504486493762*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[3]] += 0.1*rho[19]*weight[19]+0.02666666666666667*rho[17]*weight[19]-0.05773502691896258*rho[16]*weight[19]-0.051639777949432225*rho[10]*weight[19]+0.029814239699997195*rho[6]*weight[19]+0.02666666666666667*weight[17]*rho[19]-0.05773502691896258*weight[16]*rho[19]-0.051639777949432225*weight[10]*rho[19]+0.029814239699997195*weight[6]*rho[19]+0.11904761904761905*rho[18]*weight[18]+0.03849001794597506*rho[15]*weight[18]-0.06873217490352689*rho[14]*weight[18]+0.03849001794597506*rho[13]*weight[18]-0.06873217490352689*rho[12]*weight[18]-0.022222222222222223*rho[9]*weight[18]+0.03968253968253969*rho[8]*weight[18]-0.022222222222222223*rho[7]*weight[18]-0.074535599249993*rho[5]*weight[18]+0.04303314829119352*rho[3]*weight[18]+0.04303314829119352*rho[1]*weight[18]-0.024845199749997667*rho[0]*weight[18]+0.03849001794597506*weight[15]*rho[18]-0.06873217490352689*weight[14]*rho[18]+0.03849001794597506*weight[13]*rho[18]-0.06873217490352689*weight[12]*rho[18]-0.022222222222222223*weight[9]*rho[18]+0.03968253968253969*weight[8]*rho[18]-0.022222222222222223*weight[7]*rho[18]-0.074535599249993*weight[5]*rho[18]+0.04303314829119352*weight[3]*rho[18]+0.04303314829119352*weight[1]*rho[18]-0.024845199749997667*weight[0]*rho[18]+0.1*rho[17]*weight[17]-0.05773502691896258*rho[11]*weight[17]-0.051639777949432225*rho[10]*weight[17]+0.029814239699997195*rho[4]*weight[17]-0.05773502691896258*weight[11]*rho[17]-0.051639777949432225*weight[10]*rho[17]+0.029814239699997195*weight[4]*rho[17]+0.1*rho[16]*weight[16]+0.029814239699997195*rho[10]*weight[16]-0.05163977794943223*rho[6]*weight[16]+0.029814239699997195*weight[10]*rho[16]-0.05163977794943223*weight[6]*rho[16]+0.16666666666666669*rho[15]*weight[15]-0.022222222222222223*rho[14]*weight[15]+0.044444444444444446*rho[13]*weight[15]-0.09622504486493764*rho[9]*weight[15]-0.08606629658238706*rho[5]*weight[15]+0.049690399499995326*rho[3]*weight[15]-0.022222222222222223*weight[14]*rho[15]+0.044444444444444446*weight[13]*rho[15]-0.09622504486493764*weight[9]*rho[15]-0.08606629658238706*weight[5]*rho[15]+0.049690399499995326*weight[3]*rho[15]+0.11904761904761905*rho[14]*weight[14]+0.03968253968253969*rho[12]*weight[14]+0.03849001794597506*rho[9]*weight[14]-0.06873217490352689*rho[8]*weight[14]+0.04303314829119353*rho[5]*weight[14]-0.07453559924999299*rho[3]*weight[14]-0.024845199749997663*rho[1]*weight[14]+0.04303314829119353*rho[0]*weight[14]+0.03968253968253969*weight[12]*rho[14]+0.03849001794597506*weight[9]*rho[14]-0.06873217490352689*weight[8]*rho[14]+0.04303314829119353*weight[5]*rho[14]-0.07453559924999299*weight[3]*rho[14]-0.024845199749997663*weight[1]*rho[14]+0.04303314829119353*weight[0]*rho[14]+0.16666666666666669*rho[13]*weight[13]-0.022222222222222223*rho[12]*weight[13]-0.09622504486493764*rho[7]*weight[13]-0.08606629658238706*rho[5]*weight[13]+0.049690399499995326*rho[1]*weight[13]-0.022222222222222223*weight[12]*rho[13]-0.09622504486493764*weight[7]*rho[13]-0.08606629658238706*weight[5]*rho[13]+0.049690399499995326*weight[1]*rho[13]+0.11904761904761905*rho[12]*weight[12]-0.06873217490352689*rho[8]*weight[12]+0.03849001794597506*rho[7]*weight[12]+0.04303314829119353*rho[5]*weight[12]-0.024845199749997663*rho[3]*weight[12]-0.07453559924999299*rho[1]*weight[12]+0.04303314829119353*rho[0]*weight[12]-0.06873217490352689*weight[8]*rho[12]+0.03849001794597506*weight[7]*rho[12]+0.04303314829119353*weight[5]*rho[12]-0.024845199749997663*weight[3]*rho[12]-0.07453559924999299*weight[1]*rho[12]+0.04303314829119353*weight[0]*rho[12]+0.1*rho[11]*weight[11]+0.029814239699997195*rho[10]*weight[11]-0.05163977794943223*rho[4]*weight[11]+0.029814239699997195*weight[10]*rho[11]-0.05163977794943223*weight[4]*rho[11]+0.1*rho[10]*weight[10]-0.05773502691896258*rho[6]*weight[10]-0.05773502691896258*rho[4]*weight[10]+0.03333333333333333*rho[2]*weight[10]-0.05773502691896258*weight[6]*rho[10]-0.05773502691896258*weight[4]*rho[10]+0.03333333333333333*weight[2]*rho[10]+0.16666666666666669*rho[9]*weight[9]+0.04969039949999533*rho[5]*weight[9]-0.08606629658238704*rho[3]*weight[9]+0.04969039949999533*weight[5]*rho[9]-0.08606629658238704*weight[3]*rho[9]+0.11904761904761905*rho[8]*weight[8]-0.024845199749997667*rho[5]*weight[8]+0.04303314829119352*rho[3]*weight[8]+0.04303314829119352*rho[1]*weight[8]-0.074535599249993*rho[0]*weight[8]-0.024845199749997667*weight[5]*rho[8]+0.04303314829119352*weight[3]*rho[8]+0.04303314829119352*weight[1]*rho[8]-0.074535599249993*weight[0]*rho[8]+0.16666666666666669*rho[7]*weight[7]+0.04969039949999533*rho[5]*weight[7]-0.08606629658238704*rho[1]*weight[7]+0.04969039949999533*weight[5]*rho[7]-0.08606629658238704*weight[1]*rho[7]+0.1*rho[6]*weight[6]+0.03333333333333333*rho[4]*weight[6]-0.05773502691896258*rho[2]*weight[6]+0.03333333333333333*weight[4]*rho[6]-0.05773502691896258*weight[2]*rho[6]+0.16666666666666669*rho[5]*weight[5]-0.09622504486493762*rho[3]*weight[5]-0.09622504486493762*rho[1]*weight[5]+0.05555555555555556*rho[0]*weight[5]-0.09622504486493762*weight[3]*rho[5]-0.09622504486493762*weight[1]*rho[5]+0.05555555555555556*weight[0]*rho[5]+0.1*rho[4]*weight[4]-0.05773502691896258*rho[2]*weight[4]-0.05773502691896258*weight[2]*rho[4]+0.16666666666666669*rho[3]*weight[3]+0.05555555555555556*rho[1]*weight[3]-0.09622504486493762*rho[0]*weight[3]+0.05555555555555556*weight[1]*rho[3]-0.09622504486493762*weight[0]*rho[3]+0.1*rho[2]*weight[2]+0.16666666666666669*rho[1]*weight[1]-0.09622504486493762*rho[0]*weight[1]-0.09622504486493762*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[4]],0.1*rho[19]*weight[19]-0.02666666666666667*rho[17]*weight[19]+0.05773502691896258*rho[16]*weight[19]-0.051639777949432225*rho[10]*weight[19]-0.029814239699997195*rho[6]*weight[19]-0.02666666666666667*weight[17]*rho[19]+0.05773502691896258*weight[16]*rho[19]-0.051639777949432225*weight[10]*rho[19]-0.029814239699997195*weight[6]*rho[19]+0.11904761904761905*rho[18]*weight[18]+0.03849001794597506*rho[15]*weight[18]+0.06873217490352689*rho[14]*weight[18]-0.03849001794597506*rho[13]*weight[18]-0.06873217490352689*rho[12]*weight[18]+0.022222222222222223*rho[9]*weight[18]-0.03968253968253969*rho[8]*weight[18]+0.022222222222222223*rho[7]*weight[18]-0.074535599249993*rho[5]*weight[18]-0.04303314829119352*rho[3]*weight[18]+0.04303314829119352*rho[1]*weight[18]+0.024845199749997667*rho[0]*weight[18]+0.03849001794597506*weight[15]*rho[18]+0.06873217490352689*weight[14]*rho[18]-0.03849001794597506*weight[13]*rho[18]-0.06873217490352689*weight[12]*rho[18]+0.022222222222222223*weight[9]*rho[18]-0.03968253968253969*weight[8]*rho[18]+0.022222222222222223*weight[7]*rho[18]-0.074535599249993*weight[5]*rho[18]-0.04303314829119352*weight[3]*rho[18]+0.04303314829119352*weight[1]*rho[18]+0.024845199749997667*weight[0]*rho[18]+0.1*rho[17]*weight[17]-0.05773502691896258*rho[11]*weight[17]+0.051639777949432225*rho[10]*weight[17]-0.029814239699997195*rho[4]*weight[17]-0.05773502691896258*weight[11]*rho[17]+0.051639777949432225*weight[10]*rho[17]-0.029814239699997195*weight[4]*rho[17]+0.1*rho[16]*weight[16]-0.029814239699997195*rho[10]*weight[16]-0.05163977794943223*rho[6]*weight[16]-0.029814239699997195*weight[10]*rho[16]-0.05163977794943223*weight[6]*rho[16]+0.16666666666666669*rho[15]*weight[15]+0.022222222222222223*rho[14]*weight[15]-0.044444444444444446*rho[13]*weight[15]+0.09622504486493764*rho[9]*weight[15]-0.08606629658238706*rho[5]*weight[15]-0.049690399499995326*rho[3]*weight[15]+0.022222222222222223*weight[14]*rho[15]-0.044444444444444446*weight[13]*rho[15]+0.09622504486493764*weight[9]*rho[15]-0.08606629658238706*weight[5]*rho[15]-0.049690399499995326*weight[3]*rho[15]+0.11904761904761905*rho[14]*weight[14]-0.03968253968253969*rho[12]*weight[14]+0.03849001794597506*rho[9]*weight[14]-0.06873217490352689*rho[8]*weight[14]-0.04303314829119353*rho[5]*weight[14]-0.07453559924999299*rho[3]*weight[14]+0.024845199749997663*rho[1]*weight[14]+0.04303314829119353*rho[0]*weight[14]-0.03968253968253969*weight[12]*rho[14]+0.03849001794597506*weight[9]*rho[14]-0.06873217490352689*weight[8]*rho[14]-0.04303314829119353*weight[5]*rho[14]-0.07453559924999299*weight[3]*rho[14]+0.024845199749997663*weight[1]*rho[14]+0.04303314829119353*weight[0]*rho[14]+0.16666666666666669*rho[13]*weight[13]+0.022222222222222223*rho[12]*weight[13]-0.09622504486493764*rho[7]*weight[13]+0.08606629658238706*rho[5]*weight[13]-0.049690399499995326*rho[1]*weight[13]+0.022222222222222223*weight[12]*rho[13]-0.09622504486493764*weight[7]*rho[13]+0.08606629658238706*weight[5]*rho[13]-0.049690399499995326*weight[1]*rho[13]+0.11904761904761905*rho[12]*weight[12]+0.06873217490352689*rho[8]*weight[12]-0.03849001794597506*rho[7]*weight[12]+0.04303314829119353*rho[5]*weight[12]+0.024845199749997663*rho[3]*weight[12]-0.07453559924999299*rho[1]*weight[12]-0.04303314829119353*rho[0]*weight[12]+0.06873217490352689*weight[8]*rho[12]-0.03849001794597506*weight[7]*rho[12]+0.04303314829119353*weight[5]*rho[12]+0.024845199749997663*weight[3]*rho[12]-0.07453559924999299*weight[1]*rho[12]-0.04303314829119353*weight[0]*rho[12]+0.1*rho[11]*weight[11]-0.029814239699997195*rho[10]*weight[11]+0.05163977794943223*rho[4]*weight[11]-0.029814239699997195*weight[10]*rho[11]+0.05163977794943223*weight[4]*rho[11]+0.1*rho[10]*weight[10]+0.05773502691896258*rho[6]*weight[10]-0.05773502691896258*rho[4]*weight[10]-0.03333333333333333*rho[2]*weight[10]+0.05773502691896258*weight[6]*rho[10]-0.05773502691896258*weight[4]*rho[10]-0.03333333333333333*weight[2]*rho[10]+0.16666666666666669*rho[9]*weight[9]-0.04969039949999533*rho[5]*weight[9]-0.08606629658238704*rho[3]*weight[9]-0.04969039949999533*weight[5]*rho[9]-0.08606629658238704*weight[3]*rho[9]+0.11904761904761905*rho[8]*weight[8]+0.024845199749997667*rho[5]*weight[8]+0.04303314829119352*rho[3]*weight[8]-0.04303314829119352*rho[1]*weight[8]-0.074535599249993*rho[0]*weight[8]+0.024845199749997667*weight[5]*rho[8]+0.04303314829119352*weight[3]*rho[8]-0.04303314829119352*weight[1]*rho[8]-0.074535599249993*weight[0]*rho[8]+0.16666666666666669*rho[7]*weight[7]-0.04969039949999533*rho[5]*weight[7]+0.08606629658238704*rho[1]*weight[7]-0.04969039949999533*weight[5]*rho[7]+0.08606629658238704*weight[1]*rho[7]+0.1*rho[6]*weight[6]-0.03333333333333333*rho[4]*weight[6]-0.05773502691896258*rho[2]*weight[6]-0.03333333333333333*weight[4]*rho[6]-0.05773502691896258*weight[2]*rho[6]+0.16666666666666669*rho[5]*weight[5]+0.09622504486493762*rho[3]*weight[5]-0.09622504486493762*rho[1]*weight[5]-0.05555555555555556*rho[0]*weight[5]+0.09622504486493762*weight[3]*rho[5]-0.09622504486493762*weight[1]*rho[5]-0.05555555555555556*weight[0]*rho[5]+0.1*rho[4]*weight[4]+0.05773502691896258*rho[2]*weight[4]+0.05773502691896258*weight[2]*rho[4]+0.16666666666666669*rho[3]*weight[3]-0.05555555555555556*rho[1]*weight[3]-0.09622504486493762*rho[0]*weight[3]-0.05555555555555556*weight[1]*rho[3]-0.09622504486493762*weight[0]*rho[3]+0.1*rho[2]*weight[2]+0.16666666666666669*rho[1]*weight[1]+0.09622504486493762*rho[0]*weight[1]+0.09622504486493762*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[4]] += 0.1*rho[19]*weight[19]-0.02666666666666667*rho[17]*weight[19]+0.05773502691896258*rho[16]*weight[19]-0.051639777949432225*rho[10]*weight[19]-0.029814239699997195*rho[6]*weight[19]-0.02666666666666667*weight[17]*rho[19]+0.05773502691896258*weight[16]*rho[19]-0.051639777949432225*weight[10]*rho[19]-0.029814239699997195*weight[6]*rho[19]+0.11904761904761905*rho[18]*weight[18]+0.03849001794597506*rho[15]*weight[18]+0.06873217490352689*rho[14]*weight[18]-0.03849001794597506*rho[13]*weight[18]-0.06873217490352689*rho[12]*weight[18]+0.022222222222222223*rho[9]*weight[18]-0.03968253968253969*rho[8]*weight[18]+0.022222222222222223*rho[7]*weight[18]-0.074535599249993*rho[5]*weight[18]-0.04303314829119352*rho[3]*weight[18]+0.04303314829119352*rho[1]*weight[18]+0.024845199749997667*rho[0]*weight[18]+0.03849001794597506*weight[15]*rho[18]+0.06873217490352689*weight[14]*rho[18]-0.03849001794597506*weight[13]*rho[18]-0.06873217490352689*weight[12]*rho[18]+0.022222222222222223*weight[9]*rho[18]-0.03968253968253969*weight[8]*rho[18]+0.022222222222222223*weight[7]*rho[18]-0.074535599249993*weight[5]*rho[18]-0.04303314829119352*weight[3]*rho[18]+0.04303314829119352*weight[1]*rho[18]+0.024845199749997667*weight[0]*rho[18]+0.1*rho[17]*weight[17]-0.05773502691896258*rho[11]*weight[17]+0.051639777949432225*rho[10]*weight[17]-0.029814239699997195*rho[4]*weight[17]-0.05773502691896258*weight[11]*rho[17]+0.051639777949432225*weight[10]*rho[17]-0.029814239699997195*weight[4]*rho[17]+0.1*rho[16]*weight[16]-0.029814239699997195*rho[10]*weight[16]-0.05163977794943223*rho[6]*weight[16]-0.029814239699997195*weight[10]*rho[16]-0.05163977794943223*weight[6]*rho[16]+0.16666666666666669*rho[15]*weight[15]+0.022222222222222223*rho[14]*weight[15]-0.044444444444444446*rho[13]*weight[15]+0.09622504486493764*rho[9]*weight[15]-0.08606629658238706*rho[5]*weight[15]-0.049690399499995326*rho[3]*weight[15]+0.022222222222222223*weight[14]*rho[15]-0.044444444444444446*weight[13]*rho[15]+0.09622504486493764*weight[9]*rho[15]-0.08606629658238706*weight[5]*rho[15]-0.049690399499995326*weight[3]*rho[15]+0.11904761904761905*rho[14]*weight[14]-0.03968253968253969*rho[12]*weight[14]+0.03849001794597506*rho[9]*weight[14]-0.06873217490352689*rho[8]*weight[14]-0.04303314829119353*rho[5]*weight[14]-0.07453559924999299*rho[3]*weight[14]+0.024845199749997663*rho[1]*weight[14]+0.04303314829119353*rho[0]*weight[14]-0.03968253968253969*weight[12]*rho[14]+0.03849001794597506*weight[9]*rho[14]-0.06873217490352689*weight[8]*rho[14]-0.04303314829119353*weight[5]*rho[14]-0.07453559924999299*weight[3]*rho[14]+0.024845199749997663*weight[1]*rho[14]+0.04303314829119353*weight[0]*rho[14]+0.16666666666666669*rho[13]*weight[13]+0.022222222222222223*rho[12]*weight[13]-0.09622504486493764*rho[7]*weight[13]+0.08606629658238706*rho[5]*weight[13]-0.049690399499995326*rho[1]*weight[13]+0.022222222222222223*weight[12]*rho[13]-0.09622504486493764*weight[7]*rho[13]+0.08606629658238706*weight[5]*rho[13]-0.049690399499995326*weight[1]*rho[13]+0.11904761904761905*rho[12]*weight[12]+0.06873217490352689*rho[8]*weight[12]-0.03849001794597506*rho[7]*weight[12]+0.04303314829119353*rho[5]*weight[12]+0.024845199749997663*rho[3]*weight[12]-0.07453559924999299*rho[1]*weight[12]-0.04303314829119353*rho[0]*weight[12]+0.06873217490352689*weight[8]*rho[12]-0.03849001794597506*weight[7]*rho[12]+0.04303314829119353*weight[5]*rho[12]+0.024845199749997663*weight[3]*rho[12]-0.07453559924999299*weight[1]*rho[12]-0.04303314829119353*weight[0]*rho[12]+0.1*rho[11]*weight[11]-0.029814239699997195*rho[10]*weight[11]+0.05163977794943223*rho[4]*weight[11]-0.029814239699997195*weight[10]*rho[11]+0.05163977794943223*weight[4]*rho[11]+0.1*rho[10]*weight[10]+0.05773502691896258*rho[6]*weight[10]-0.05773502691896258*rho[4]*weight[10]-0.03333333333333333*rho[2]*weight[10]+0.05773502691896258*weight[6]*rho[10]-0.05773502691896258*weight[4]*rho[10]-0.03333333333333333*weight[2]*rho[10]+0.16666666666666669*rho[9]*weight[9]-0.04969039949999533*rho[5]*weight[9]-0.08606629658238704*rho[3]*weight[9]-0.04969039949999533*weight[5]*rho[9]-0.08606629658238704*weight[3]*rho[9]+0.11904761904761905*rho[8]*weight[8]+0.024845199749997667*rho[5]*weight[8]+0.04303314829119352*rho[3]*weight[8]-0.04303314829119352*rho[1]*weight[8]-0.074535599249993*rho[0]*weight[8]+0.024845199749997667*weight[5]*rho[8]+0.04303314829119352*weight[3]*rho[8]-0.04303314829119352*weight[1]*rho[8]-0.074535599249993*weight[0]*rho[8]+0.16666666666666669*rho[7]*weight[7]-0.04969039949999533*rho[5]*weight[7]+0.08606629658238704*rho[1]*weight[7]-0.04969039949999533*weight[5]*rho[7]+0.08606629658238704*weight[1]*rho[7]+0.1*rho[6]*weight[6]-0.03333333333333333*rho[4]*weight[6]-0.05773502691896258*rho[2]*weight[6]-0.03333333333333333*weight[4]*rho[6]-0.05773502691896258*weight[2]*rho[6]+0.16666666666666669*rho[5]*weight[5]+0.09622504486493762*rho[3]*weight[5]-0.09622504486493762*rho[1]*weight[5]-0.05555555555555556*rho[0]*weight[5]+0.09622504486493762*weight[3]*rho[5]-0.09622504486493762*weight[1]*rho[5]-0.05555555555555556*weight[0]*rho[5]+0.1*rho[4]*weight[4]+0.05773502691896258*rho[2]*weight[4]+0.05773502691896258*weight[2]*rho[4]+0.16666666666666669*rho[3]*weight[3]-0.05555555555555556*rho[1]*weight[3]-0.09622504486493762*rho[0]*weight[3]-0.05555555555555556*weight[1]*rho[3]-0.09622504486493762*weight[0]*rho[3]+0.1*rho[2]*weight[2]+0.16666666666666669*rho[1]*weight[1]+0.09622504486493762*rho[0]*weight[1]+0.09622504486493762*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[5]],-(0.034523809523809526*rho[19]*weight[19])-0.02*rho[18]*weight[19]+0.02*rho[17]*weight[19]-0.008935182737458497*rho[16]*weight[19]+0.008935182737458497*rho[15]*weight[19]+0.01924500897298753*rho[14]*weight[19]+0.01924500897298753*rho[13]*weight[19]+0.01924500897298753*rho[12]*weight[19]-0.01924500897298753*rho[11]*weight[19]-0.012909944487358056*rho[10]*weight[19]-0.021825396825396828*rho[9]*weight[19]-0.011111111111111112*rho[8]*weight[19]-0.011111111111111112*rho[7]*weight[19]+0.022360679774997897*rho[6]*weight[19]-0.022360679774997897*rho[5]*weight[19]+0.0372677996249965*rho[4]*weight[19]+0.02151657414559676*rho[3]*weight[19]-0.02151657414559676*rho[2]*weight[19]+0.02151657414559676*rho[1]*weight[19]-0.012422599874998833*rho[0]*weight[19]-0.02*weight[18]*rho[19]+0.02*weight[17]*rho[19]-0.008935182737458497*weight[16]*rho[19]+0.008935182737458497*weight[15]*rho[19]+0.01924500897298753*weight[14]*rho[19]+0.01924500897298753*weight[13]*rho[19]+0.01924500897298753*weight[12]*rho[19]-0.01924500897298753*weight[11]*rho[19]-0.012909944487358056*weight[10]*rho[19]-0.021825396825396828*weight[9]*rho[19]-0.011111111111111112*weight[8]*rho[19]-0.011111111111111112*weight[7]*rho[19]+0.022360679774997897*weight[6]*rho[19]-0.022360679774997897*weight[5]*rho[19]+0.0372677996249965*weight[4]*rho[19]+0.02151657414559676*weight[3]*rho[19]-0.02151657414559676*weight[2]*rho[19]+0.02151657414559676*weight[1]*rho[19]-0.012422599874998833*weight[0]*rho[19]-0.034523809523809526*rho[18]*weight[18]-0.02*rho[17]*weight[18]+0.01924500897298753*rho[16]*weight[18]-0.01924500897298753*rho[15]*weight[18]-0.008935182737458497*rho[14]*weight[18]-0.01924500897298753*rho[13]*weight[18]-0.008935182737458497*rho[12]*weight[18]+0.01924500897298753*rho[11]*weight[18]+0.012909944487358056*rho[10]*weight[18]+0.011111111111111112*rho[9]*weight[18]+0.021825396825396828*rho[8]*weight[18]+0.011111111111111112*rho[7]*weight[18]-0.022360679774997897*rho[6]*weight[18]+0.0372677996249965*rho[5]*weight[18]-0.022360679774997897*rho[4]*weight[18]-0.02151657414559676*rho[3]*weight[18]+0.02151657414559676*rho[2]*weight[18]-0.02151657414559676*rho[1]*weight[18]+0.012422599874998833*rho[0]*weight[18]-0.02*weight[17]*rho[18]+0.01924500897298753*weight[16]*rho[18]-0.01924500897298753*weight[15]*rho[18]-0.008935182737458497*weight[14]*rho[18]-0.01924500897298753*weight[13]*rho[18]-0.008935182737458497*weight[12]*rho[18]+0.01924500897298753*weight[11]*rho[18]+0.012909944487358056*weight[10]*rho[18]+0.011111111111111112*weight[9]*rho[18]+0.021825396825396828*weight[8]*rho[18]+0.011111111111111112*weight[7]*rho[18]-0.022360679774997897*weight[6]*rho[18]+0.0372677996249965*weight[5]*rho[18]-0.022360679774997897*weight[4]*rho[18]-0.02151657414559676*weight[3]*rho[18]+0.02151657414559676*weight[2]*rho[18]-0.02151657414559676*weight[1]*rho[18]+0.012422599874998833*weight[0]*rho[18]-0.034523809523809526*rho[17]*weight[17]-0.01924500897298753*rho[16]*weight[17]+0.01924500897298753*rho[15]*weight[17]+0.01924500897298753*rho[14]*weight[17]+0.008935182737458497*rho[13]*weight[17]+0.01924500897298753*rho[12]*weight[17]-0.008935182737458497*rho[11]*weight[17]-0.012909944487358056*rho[10]*weight[17]-0.011111111111111112*rho[9]*weight[17]-0.011111111111111112*rho[8]*weight[17]-0.021825396825396828*rho[7]*weight[17]+0.0372677996249965*rho[6]*weight[17]-0.022360679774997897*rho[5]*weight[17]+0.022360679774997897*rho[4]*weight[17]+0.02151657414559676*rho[3]*weight[17]-0.02151657414559676*rho[2]*weight[17]+0.02151657414559676*rho[1]*weight[17]-0.012422599874998833*rho[0]*weight[17]-0.01924500897298753*weight[16]*rho[17]+0.01924500897298753*weight[15]*rho[17]+0.01924500897298753*weight[14]*rho[17]+0.008935182737458497*weight[13]*rho[17]+0.01924500897298753*weight[12]*rho[17]-0.008935182737458497*weight[11]*rho[17]-0.012909944487358056*weight[10]*rho[17]-0.011111111111111112*weight[9]*rho[17]-0.011111111111111112*weight[8]*rho[17]-0.021825396825396828*weight[7]*rho[17]+0.0372677996249965*weight[6]*rho[17]-0.022360679774997897*weight[5]*rho[17]+0.022360679774997897*weight[4]*rho[17]+0.02151657414559676*weight[3]*rho[17]-0.02151657414559676*weight[2]*rho[17]+0.02151657414559676*weight[1]*rho[17]-0.012422599874998833*weight[0]*rho[17]-0.06785714285714287*rho[16]*weight[16]-0.021825396825396828*rho[15]*weight[16]-0.011111111111111112*rho[14]*weight[16]-0.011111111111111112*rho[13]*weight[16]-0.011111111111111112*rho[12]*weight[16]+0.022360679774997897*rho[10]*weight[16]-0.010309826235529031*rho[9]*weight[16]+0.01924500897298753*rho[8]*weight[16]+0.004303314829119352*rho[6]*weight[16]+0.021516574145596764*rho[5]*weight[16]-0.021516574145596764*rho[4]*weight[16]-0.012422599874998832*rho[3]*weight[16]+0.037267799624996496*rho[2]*weight[16]-0.012422599874998832*rho[1]*weight[16]+0.021516574145596764*rho[0]*weight[16]-0.021825396825396828*weight[15]*rho[16]-0.011111111111111112*weight[14]*rho[16]-0.011111111111111112*weight[13]*rho[16]-0.011111111111111112*weight[12]*rho[16]+0.022360679774997897*weight[10]*rho[16]-0.010309826235529031*weight[9]*rho[16]+0.01924500897298753*weight[8]*rho[16]+0.004303314829119352*weight[6]*rho[16]+0.021516574145596764*weight[5]*rho[16]-0.021516574145596764*weight[4]*rho[16]-0.012422599874998832*weight[3]*rho[16]+0.037267799624996496*weight[2]*rho[16]-0.012422599874998832*weight[1]*rho[16]+0.021516574145596764*weight[0]*rho[16]-0.06785714285714287*rho[15]*weight[15]+0.011111111111111112*rho[14]*weight[15]+0.011111111111111112*rho[13]*weight[15]-0.011111111111111112*rho[11]*weight[15]-0.022360679774997897*rho[10]*weight[15]+0.010309826235529031*rho[9]*weight[15]-0.01924500897298753*rho[7]*weight[15]+0.021516574145596764*rho[6]*weight[15]+0.004303314829119352*rho[5]*weight[15]+0.021516574145596764*rho[4]*weight[15]+0.012422599874998832*rho[3]*weight[15]-0.012422599874998832*rho[2]*weight[15]+0.037267799624996496*rho[1]*weight[15]-0.021516574145596764*rho[0]*weight[15]+0.011111111111111112*weight[14]*rho[15]+0.011111111111111112*weight[13]*rho[15]-0.011111111111111112*weight[11]*rho[15]-0.022360679774997897*weight[10]*rho[15]+0.010309826235529031*weight[9]*rho[15]-0.01924500897298753*weight[7]*rho[15]+0.021516574145596764*weight[6]*rho[15]+0.004303314829119352*weight[5]*rho[15]+0.021516574145596764*weight[4]*rho[15]+0.012422599874998832*weight[3]*rho[15]-0.012422599874998832*weight[2]*rho[15]+0.037267799624996496*weight[1]*rho[15]-0.021516574145596764*weight[0]*rho[15]-0.06785714285714287*rho[14]*weight[14]+0.021825396825396828*rho[12]*weight[14]-0.011111111111111112*rho[11]*weight[14]-0.022360679774997897*rho[10]*weight[14]-0.01924500897298753*rho[9]*weight[14]+0.010309826235529031*rho[8]*weight[14]-0.004303314829119352*rho[6]*weight[14]-0.021516574145596764*rho[5]*weight[14]+0.021516574145596764*rho[4]*weight[14]+0.037267799624996496*rho[3]*weight[14]-0.012422599874998832*rho[2]*weight[14]+0.012422599874998832*rho[1]*weight[14]-0.021516574145596764*rho[0]*weight[14]+0.021825396825396828*weight[12]*rho[14]-0.011111111111111112*weight[11]*rho[14]-0.022360679774997897*weight[10]*rho[14]-0.01924500897298753*weight[9]*rho[14]+0.010309826235529031*weight[8]*rho[14]-0.004303314829119352*weight[6]*rho[14]-0.021516574145596764*weight[5]*rho[14]+0.021516574145596764*weight[4]*rho[14]+0.037267799624996496*weight[3]*rho[14]-0.012422599874998832*weight[2]*rho[14]+0.012422599874998832*weight[1]*rho[14]-0.021516574145596764*weight[0]*rho[14]-0.06785714285714287*rho[13]*weight[13]+0.011111111111111112*rho[12]*weight[13]-0.021825396825396828*rho[11]*weight[13]-0.022360679774997897*rho[10]*weight[13]-0.01924500897298753*rho[9]*weight[13]+0.010309826235529031*rho[7]*weight[13]+0.021516574145596764*rho[6]*weight[13]+0.004303314829119352*rho[5]*weight[13]+0.021516574145596764*rho[4]*weight[13]+0.037267799624996496*rho[3]*weight[13]-0.012422599874998832*rho[2]*weight[13]+0.012422599874998832*rho[1]*weight[13]-0.021516574145596764*rho[0]*weight[13]+0.011111111111111112*weight[12]*rho[13]-0.021825396825396828*weight[11]*rho[13]-0.022360679774997897*weight[10]*rho[13]-0.01924500897298753*weight[9]*rho[13]+0.010309826235529031*weight[7]*rho[13]+0.021516574145596764*weight[6]*rho[13]+0.004303314829119352*weight[5]*rho[13]+0.021516574145596764*weight[4]*rho[13]+0.037267799624996496*weight[3]*rho[13]-0.012422599874998832*weight[2]*rho[13]+0.012422599874998832*weight[1]*rho[13]-0.021516574145596764*weight[0]*rho[13]-0.06785714285714287*rho[12]*weight[12]-0.011111111111111112*rho[11]*weight[12]-0.022360679774997897*rho[10]*weight[12]+0.010309826235529031*rho[8]*weight[12]-0.01924500897298753*rho[7]*weight[12]+0.021516574145596764*rho[6]*weight[12]-0.021516574145596764*rho[5]*weight[12]-0.004303314829119352*rho[4]*weight[12]+0.012422599874998832*rho[3]*weight[12]-0.012422599874998832*rho[2]*weight[12]+0.037267799624996496*rho[1]*weight[12]-0.021516574145596764*rho[0]*weight[12]-0.011111111111111112*weight[11]*rho[12]-0.022360679774997897*weight[10]*rho[12]+0.010309826235529031*weight[8]*rho[12]-0.01924500897298753*weight[7]*rho[12]+0.021516574145596764*weight[6]*rho[12]-0.021516574145596764*weight[5]*rho[12]-0.004303314829119352*weight[4]*rho[12]+0.012422599874998832*weight[3]*rho[12]-0.012422599874998832*weight[2]*rho[12]+0.037267799624996496*weight[1]*rho[12]-0.021516574145596764*weight[0]*rho[12]-0.06785714285714287*rho[11]*weight[11]+0.022360679774997897*rho[10]*weight[11]+0.01924500897298753*rho[8]*weight[11]-0.010309826235529031*rho[7]*weight[11]-0.021516574145596764*rho[6]*weight[11]+0.021516574145596764*rho[5]*weight[11]+0.004303314829119352*rho[4]*weight[11]-0.012422599874998832*rho[3]*weight[11]+0.037267799624996496*rho[2]*weight[11]-0.012422599874998832*rho[1]*weight[11]+0.021516574145596764*rho[0]*weight[11]+0.022360679774997897*weight[10]*rho[11]+0.01924500897298753*weight[8]*rho[11]-0.010309826235529031*weight[7]*rho[11]-0.021516574145596764*weight[6]*rho[11]+0.021516574145596764*weight[5]*rho[11]+0.004303314829119352*weight[4]*rho[11]-0.012422599874998832*weight[3]*rho[11]+0.037267799624996496*weight[2]*rho[11]-0.012422599874998832*weight[1]*rho[11]+0.021516574145596764*weight[0]*rho[11]-0.025*rho[10]*weight[10]+0.02151657414559676*rho[9]*weight[10]+0.02151657414559676*rho[8]*weight[10]+0.02151657414559676*rho[7]*weight[10]-0.014433756729740645*rho[6]*weight[10]+0.014433756729740645*rho[5]*weight[10]-0.014433756729740645*rho[4]*weight[10]-0.025*rho[3]*weight[10]+0.025*rho[2]*weight[10]-0.025*rho[1]*weight[10]+0.024056261216234404*rho[0]*weight[10]+0.02151657414559676*weight[9]*rho[10]+0.02151657414559676*weight[8]*rho[10]+0.02151657414559676*weight[7]*rho[10]-0.014433756729740645*weight[6]*rho[10]+0.014433756729740645*weight[5]*rho[10]-0.014433756729740645*weight[4]*rho[10]-0.025*weight[3]*rho[10]+0.025*weight[2]*rho[10]-0.025*weight[1]*rho[10]+0.024056261216234404*weight[0]*rho[10]-0.10119047619047619*rho[9]*weight[9]-0.012422599874998833*rho[6]*weight[9]+0.012422599874998833*rho[5]*weight[9]-0.012422599874998833*rho[4]*weight[9]+0.02151657414559676*rho[3]*weight[9]+0.02151657414559676*rho[2]*weight[9]-0.02151657414559676*rho[1]*weight[9]+0.0372677996249965*rho[0]*weight[9]-0.012422599874998833*weight[6]*rho[9]+0.012422599874998833*weight[5]*rho[9]-0.012422599874998833*weight[4]*rho[9]+0.02151657414559676*weight[3]*rho[9]+0.02151657414559676*weight[2]*rho[9]-0.02151657414559676*weight[1]*rho[9]+0.0372677996249965*weight[0]*rho[9]-0.10119047619047619*rho[8]*weight[8]-0.012422599874998833*rho[6]*weight[8]+0.012422599874998833*rho[5]*weight[8]-0.012422599874998833*rho[4]*weight[8]-0.02151657414559676*rho[3]*weight[8]-0.02151657414559676*rho[2]*weight[8]-0.02151657414559676*rho[1]*weight[8]+0.0372677996249965*rho[0]*weight[8]-0.012422599874998833*weight[6]*rho[8]+0.012422599874998833*weight[5]*rho[8]-0.012422599874998833*weight[4]*rho[8]-0.02151657414559676*weight[3]*rho[8]-0.02151657414559676*weight[2]*rho[8]-0.02151657414559676*weight[1]*rho[8]+0.0372677996249965*weight[0]*rho[8]-0.10119047619047619*rho[7]*weight[7]-0.012422599874998833*rho[6]*weight[7]+0.012422599874998833*rho[5]*weight[7]-0.012422599874998833*rho[4]*weight[7]-0.02151657414559676*rho[3]*weight[7]+0.02151657414559676*rho[2]*weight[7]+0.02151657414559676*rho[1]*weight[7]+0.0372677996249965*rho[0]*weight[7]-0.012422599874998833*weight[6]*rho[7]+0.012422599874998833*weight[5]*rho[7]-0.012422599874998833*weight[4]*rho[7]-0.02151657414559676*weight[3]*rho[7]+0.02151657414559676*weight[2]*rho[7]+0.02151657414559676*weight[1]*rho[7]+0.0372677996249965*weight[0]*rho[7]-0.058333333333333334*rho[6]*weight[6]-0.025*rho[5]*weight[6]+0.025*rho[4]*weight[6]-0.004811252243246881*rho[3]*weight[6]+0.004811252243246881*rho[2]*weight[6]+0.024056261216234404*rho[1]*weight[6]-0.01388888888888889*rho[0]*weight[6]-0.025*weight[5]*rho[6]+0.025*weight[4]*rho[6]-0.004811252243246881*weight[3]*rho[6]+0.004811252243246881*weight[2]*rho[6]+0.024056261216234404*weight[1]*rho[6]-0.01388888888888889*weight[0]*rho[6]-0.058333333333333334*rho[5]*weight[5]-0.025*rho[4]*weight[5]+0.004811252243246881*rho[3]*weight[5]+0.024056261216234404*rho[2]*weight[5]+0.004811252243246881*rho[1]*weight[5]+0.01388888888888889*rho[0]*weight[5]-0.025*weight[4]*rho[5]+0.004811252243246881*weight[3]*rho[5]+0.024056261216234404*weight[2]*rho[5]+0.004811252243246881*weight[1]*rho[5]+0.01388888888888889*weight[0]*rho[5]-0.058333333333333334*rho[4]*weight[4]+0.024056261216234404*rho[3]*weight[4]+0.004811252243246881*rho[2]*weight[4]-0.004811252243246881*rho[1]*weight[4]-0.01388888888888889*rho[0]*weight[4]+0.024056261216234404*weight[3]*rho[4]+0.004811252243246881*weight[2]*rho[4]-0.004811252243246881*weight[1]*rho[4]-0.01388888888888889*weight[0]*rho[4]-0.09166666666666667*rho[3]*weight[3]-0.01388888888888889*rho[2]*weight[3]+0.01388888888888889*rho[1]*weight[3]+0.024056261216234404*rho[0]*weight[3]-0.01388888888888889*weight[2]*rho[3]+0.01388888888888889*weight[1]*rho[3]+0.024056261216234404*weight[0]*rho[3]-0.09166666666666667*rho[2]*weight[2]-0.01388888888888889*rho[1]*weight[2]-0.024056261216234404*rho[0]*weight[2]-0.01388888888888889*weight[1]*rho[2]-0.024056261216234404*weight[0]*rho[2]-0.09166666666666667*rho[1]*weight[1]+0.024056261216234404*rho[0]*weight[1]+0.024056261216234404*weight[0]*rho[1]-0.125*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[5]] += -(0.034523809523809526*rho[19]*weight[19])-0.02*rho[18]*weight[19]+0.02*rho[17]*weight[19]-0.008935182737458497*rho[16]*weight[19]+0.008935182737458497*rho[15]*weight[19]+0.01924500897298753*rho[14]*weight[19]+0.01924500897298753*rho[13]*weight[19]+0.01924500897298753*rho[12]*weight[19]-0.01924500897298753*rho[11]*weight[19]-0.012909944487358056*rho[10]*weight[19]-0.021825396825396828*rho[9]*weight[19]-0.011111111111111112*rho[8]*weight[19]-0.011111111111111112*rho[7]*weight[19]+0.022360679774997897*rho[6]*weight[19]-0.022360679774997897*rho[5]*weight[19]+0.0372677996249965*rho[4]*weight[19]+0.02151657414559676*rho[3]*weight[19]-0.02151657414559676*rho[2]*weight[19]+0.02151657414559676*rho[1]*weight[19]-0.012422599874998833*rho[0]*weight[19]-0.02*weight[18]*rho[19]+0.02*weight[17]*rho[19]-0.008935182737458497*weight[16]*rho[19]+0.008935182737458497*weight[15]*rho[19]+0.01924500897298753*weight[14]*rho[19]+0.01924500897298753*weight[13]*rho[19]+0.01924500897298753*weight[12]*rho[19]-0.01924500897298753*weight[11]*rho[19]-0.012909944487358056*weight[10]*rho[19]-0.021825396825396828*weight[9]*rho[19]-0.011111111111111112*weight[8]*rho[19]-0.011111111111111112*weight[7]*rho[19]+0.022360679774997897*weight[6]*rho[19]-0.022360679774997897*weight[5]*rho[19]+0.0372677996249965*weight[4]*rho[19]+0.02151657414559676*weight[3]*rho[19]-0.02151657414559676*weight[2]*rho[19]+0.02151657414559676*weight[1]*rho[19]-0.012422599874998833*weight[0]*rho[19]-0.034523809523809526*rho[18]*weight[18]-0.02*rho[17]*weight[18]+0.01924500897298753*rho[16]*weight[18]-0.01924500897298753*rho[15]*weight[18]-0.008935182737458497*rho[14]*weight[18]-0.01924500897298753*rho[13]*weight[18]-0.008935182737458497*rho[12]*weight[18]+0.01924500897298753*rho[11]*weight[18]+0.012909944487358056*rho[10]*weight[18]+0.011111111111111112*rho[9]*weight[18]+0.021825396825396828*rho[8]*weight[18]+0.011111111111111112*rho[7]*weight[18]-0.022360679774997897*rho[6]*weight[18]+0.0372677996249965*rho[5]*weight[18]-0.022360679774997897*rho[4]*weight[18]-0.02151657414559676*rho[3]*weight[18]+0.02151657414559676*rho[2]*weight[18]-0.02151657414559676*rho[1]*weight[18]+0.012422599874998833*rho[0]*weight[18]-0.02*weight[17]*rho[18]+0.01924500897298753*weight[16]*rho[18]-0.01924500897298753*weight[15]*rho[18]-0.008935182737458497*weight[14]*rho[18]-0.01924500897298753*weight[13]*rho[18]-0.008935182737458497*weight[12]*rho[18]+0.01924500897298753*weight[11]*rho[18]+0.012909944487358056*weight[10]*rho[18]+0.011111111111111112*weight[9]*rho[18]+0.021825396825396828*weight[8]*rho[18]+0.011111111111111112*weight[7]*rho[18]-0.022360679774997897*weight[6]*rho[18]+0.0372677996249965*weight[5]*rho[18]-0.022360679774997897*weight[4]*rho[18]-0.02151657414559676*weight[3]*rho[18]+0.02151657414559676*weight[2]*rho[18]-0.02151657414559676*weight[1]*rho[18]+0.012422599874998833*weight[0]*rho[18]-0.034523809523809526*rho[17]*weight[17]-0.01924500897298753*rho[16]*weight[17]+0.01924500897298753*rho[15]*weight[17]+0.01924500897298753*rho[14]*weight[17]+0.008935182737458497*rho[13]*weight[17]+0.01924500897298753*rho[12]*weight[17]-0.008935182737458497*rho[11]*weight[17]-0.012909944487358056*rho[10]*weight[17]-0.011111111111111112*rho[9]*weight[17]-0.011111111111111112*rho[8]*weight[17]-0.021825396825396828*rho[7]*weight[17]+0.0372677996249965*rho[6]*weight[17]-0.022360679774997897*rho[5]*weight[17]+0.022360679774997897*rho[4]*weight[17]+0.02151657414559676*rho[3]*weight[17]-0.02151657414559676*rho[2]*weight[17]+0.02151657414559676*rho[1]*weight[17]-0.012422599874998833*rho[0]*weight[17]-0.01924500897298753*weight[16]*rho[17]+0.01924500897298753*weight[15]*rho[17]+0.01924500897298753*weight[14]*rho[17]+0.008935182737458497*weight[13]*rho[17]+0.01924500897298753*weight[12]*rho[17]-0.008935182737458497*weight[11]*rho[17]-0.012909944487358056*weight[10]*rho[17]-0.011111111111111112*weight[9]*rho[17]-0.011111111111111112*weight[8]*rho[17]-0.021825396825396828*weight[7]*rho[17]+0.0372677996249965*weight[6]*rho[17]-0.022360679774997897*weight[5]*rho[17]+0.022360679774997897*weight[4]*rho[17]+0.02151657414559676*weight[3]*rho[17]-0.02151657414559676*weight[2]*rho[17]+0.02151657414559676*weight[1]*rho[17]-0.012422599874998833*weight[0]*rho[17]-0.06785714285714287*rho[16]*weight[16]-0.021825396825396828*rho[15]*weight[16]-0.011111111111111112*rho[14]*weight[16]-0.011111111111111112*rho[13]*weight[16]-0.011111111111111112*rho[12]*weight[16]+0.022360679774997897*rho[10]*weight[16]-0.010309826235529031*rho[9]*weight[16]+0.01924500897298753*rho[8]*weight[16]+0.004303314829119352*rho[6]*weight[16]+0.021516574145596764*rho[5]*weight[16]-0.021516574145596764*rho[4]*weight[16]-0.012422599874998832*rho[3]*weight[16]+0.037267799624996496*rho[2]*weight[16]-0.012422599874998832*rho[1]*weight[16]+0.021516574145596764*rho[0]*weight[16]-0.021825396825396828*weight[15]*rho[16]-0.011111111111111112*weight[14]*rho[16]-0.011111111111111112*weight[13]*rho[16]-0.011111111111111112*weight[12]*rho[16]+0.022360679774997897*weight[10]*rho[16]-0.010309826235529031*weight[9]*rho[16]+0.01924500897298753*weight[8]*rho[16]+0.004303314829119352*weight[6]*rho[16]+0.021516574145596764*weight[5]*rho[16]-0.021516574145596764*weight[4]*rho[16]-0.012422599874998832*weight[3]*rho[16]+0.037267799624996496*weight[2]*rho[16]-0.012422599874998832*weight[1]*rho[16]+0.021516574145596764*weight[0]*rho[16]-0.06785714285714287*rho[15]*weight[15]+0.011111111111111112*rho[14]*weight[15]+0.011111111111111112*rho[13]*weight[15]-0.011111111111111112*rho[11]*weight[15]-0.022360679774997897*rho[10]*weight[15]+0.010309826235529031*rho[9]*weight[15]-0.01924500897298753*rho[7]*weight[15]+0.021516574145596764*rho[6]*weight[15]+0.004303314829119352*rho[5]*weight[15]+0.021516574145596764*rho[4]*weight[15]+0.012422599874998832*rho[3]*weight[15]-0.012422599874998832*rho[2]*weight[15]+0.037267799624996496*rho[1]*weight[15]-0.021516574145596764*rho[0]*weight[15]+0.011111111111111112*weight[14]*rho[15]+0.011111111111111112*weight[13]*rho[15]-0.011111111111111112*weight[11]*rho[15]-0.022360679774997897*weight[10]*rho[15]+0.010309826235529031*weight[9]*rho[15]-0.01924500897298753*weight[7]*rho[15]+0.021516574145596764*weight[6]*rho[15]+0.004303314829119352*weight[5]*rho[15]+0.021516574145596764*weight[4]*rho[15]+0.012422599874998832*weight[3]*rho[15]-0.012422599874998832*weight[2]*rho[15]+0.037267799624996496*weight[1]*rho[15]-0.021516574145596764*weight[0]*rho[15]-0.06785714285714287*rho[14]*weight[14]+0.021825396825396828*rho[12]*weight[14]-0.011111111111111112*rho[11]*weight[14]-0.022360679774997897*rho[10]*weight[14]-0.01924500897298753*rho[9]*weight[14]+0.010309826235529031*rho[8]*weight[14]-0.004303314829119352*rho[6]*weight[14]-0.021516574145596764*rho[5]*weight[14]+0.021516574145596764*rho[4]*weight[14]+0.037267799624996496*rho[3]*weight[14]-0.012422599874998832*rho[2]*weight[14]+0.012422599874998832*rho[1]*weight[14]-0.021516574145596764*rho[0]*weight[14]+0.021825396825396828*weight[12]*rho[14]-0.011111111111111112*weight[11]*rho[14]-0.022360679774997897*weight[10]*rho[14]-0.01924500897298753*weight[9]*rho[14]+0.010309826235529031*weight[8]*rho[14]-0.004303314829119352*weight[6]*rho[14]-0.021516574145596764*weight[5]*rho[14]+0.021516574145596764*weight[4]*rho[14]+0.037267799624996496*weight[3]*rho[14]-0.012422599874998832*weight[2]*rho[14]+0.012422599874998832*weight[1]*rho[14]-0.021516574145596764*weight[0]*rho[14]-0.06785714285714287*rho[13]*weight[13]+0.011111111111111112*rho[12]*weight[13]-0.021825396825396828*rho[11]*weight[13]-0.022360679774997897*rho[10]*weight[13]-0.01924500897298753*rho[9]*weight[13]+0.010309826235529031*rho[7]*weight[13]+0.021516574145596764*rho[6]*weight[13]+0.004303314829119352*rho[5]*weight[13]+0.021516574145596764*rho[4]*weight[13]+0.037267799624996496*rho[3]*weight[13]-0.012422599874998832*rho[2]*weight[13]+0.012422599874998832*rho[1]*weight[13]-0.021516574145596764*rho[0]*weight[13]+0.011111111111111112*weight[12]*rho[13]-0.021825396825396828*weight[11]*rho[13]-0.022360679774997897*weight[10]*rho[13]-0.01924500897298753*weight[9]*rho[13]+0.010309826235529031*weight[7]*rho[13]+0.021516574145596764*weight[6]*rho[13]+0.004303314829119352*weight[5]*rho[13]+0.021516574145596764*weight[4]*rho[13]+0.037267799624996496*weight[3]*rho[13]-0.012422599874998832*weight[2]*rho[13]+0.012422599874998832*weight[1]*rho[13]-0.021516574145596764*weight[0]*rho[13]-0.06785714285714287*rho[12]*weight[12]-0.011111111111111112*rho[11]*weight[12]-0.022360679774997897*rho[10]*weight[12]+0.010309826235529031*rho[8]*weight[12]-0.01924500897298753*rho[7]*weight[12]+0.021516574145596764*rho[6]*weight[12]-0.021516574145596764*rho[5]*weight[12]-0.004303314829119352*rho[4]*weight[12]+0.012422599874998832*rho[3]*weight[12]-0.012422599874998832*rho[2]*weight[12]+0.037267799624996496*rho[1]*weight[12]-0.021516574145596764*rho[0]*weight[12]-0.011111111111111112*weight[11]*rho[12]-0.022360679774997897*weight[10]*rho[12]+0.010309826235529031*weight[8]*rho[12]-0.01924500897298753*weight[7]*rho[12]+0.021516574145596764*weight[6]*rho[12]-0.021516574145596764*weight[5]*rho[12]-0.004303314829119352*weight[4]*rho[12]+0.012422599874998832*weight[3]*rho[12]-0.012422599874998832*weight[2]*rho[12]+0.037267799624996496*weight[1]*rho[12]-0.021516574145596764*weight[0]*rho[12]-0.06785714285714287*rho[11]*weight[11]+0.022360679774997897*rho[10]*weight[11]+0.01924500897298753*rho[8]*weight[11]-0.010309826235529031*rho[7]*weight[11]-0.021516574145596764*rho[6]*weight[11]+0.021516574145596764*rho[5]*weight[11]+0.004303314829119352*rho[4]*weight[11]-0.012422599874998832*rho[3]*weight[11]+0.037267799624996496*rho[2]*weight[11]-0.012422599874998832*rho[1]*weight[11]+0.021516574145596764*rho[0]*weight[11]+0.022360679774997897*weight[10]*rho[11]+0.01924500897298753*weight[8]*rho[11]-0.010309826235529031*weight[7]*rho[11]-0.021516574145596764*weight[6]*rho[11]+0.021516574145596764*weight[5]*rho[11]+0.004303314829119352*weight[4]*rho[11]-0.012422599874998832*weight[3]*rho[11]+0.037267799624996496*weight[2]*rho[11]-0.012422599874998832*weight[1]*rho[11]+0.021516574145596764*weight[0]*rho[11]-0.025*rho[10]*weight[10]+0.02151657414559676*rho[9]*weight[10]+0.02151657414559676*rho[8]*weight[10]+0.02151657414559676*rho[7]*weight[10]-0.014433756729740645*rho[6]*weight[10]+0.014433756729740645*rho[5]*weight[10]-0.014433756729740645*rho[4]*weight[10]-0.025*rho[3]*weight[10]+0.025*rho[2]*weight[10]-0.025*rho[1]*weight[10]+0.024056261216234404*rho[0]*weight[10]+0.02151657414559676*weight[9]*rho[10]+0.02151657414559676*weight[8]*rho[10]+0.02151657414559676*weight[7]*rho[10]-0.014433756729740645*weight[6]*rho[10]+0.014433756729740645*weight[5]*rho[10]-0.014433756729740645*weight[4]*rho[10]-0.025*weight[3]*rho[10]+0.025*weight[2]*rho[10]-0.025*weight[1]*rho[10]+0.024056261216234404*weight[0]*rho[10]-0.10119047619047619*rho[9]*weight[9]-0.012422599874998833*rho[6]*weight[9]+0.012422599874998833*rho[5]*weight[9]-0.012422599874998833*rho[4]*weight[9]+0.02151657414559676*rho[3]*weight[9]+0.02151657414559676*rho[2]*weight[9]-0.02151657414559676*rho[1]*weight[9]+0.0372677996249965*rho[0]*weight[9]-0.012422599874998833*weight[6]*rho[9]+0.012422599874998833*weight[5]*rho[9]-0.012422599874998833*weight[4]*rho[9]+0.02151657414559676*weight[3]*rho[9]+0.02151657414559676*weight[2]*rho[9]-0.02151657414559676*weight[1]*rho[9]+0.0372677996249965*weight[0]*rho[9]-0.10119047619047619*rho[8]*weight[8]-0.012422599874998833*rho[6]*weight[8]+0.012422599874998833*rho[5]*weight[8]-0.012422599874998833*rho[4]*weight[8]-0.02151657414559676*rho[3]*weight[8]-0.02151657414559676*rho[2]*weight[8]-0.02151657414559676*rho[1]*weight[8]+0.0372677996249965*rho[0]*weight[8]-0.012422599874998833*weight[6]*rho[8]+0.012422599874998833*weight[5]*rho[8]-0.012422599874998833*weight[4]*rho[8]-0.02151657414559676*weight[3]*rho[8]-0.02151657414559676*weight[2]*rho[8]-0.02151657414559676*weight[1]*rho[8]+0.0372677996249965*weight[0]*rho[8]-0.10119047619047619*rho[7]*weight[7]-0.012422599874998833*rho[6]*weight[7]+0.012422599874998833*rho[5]*weight[7]-0.012422599874998833*rho[4]*weight[7]-0.02151657414559676*rho[3]*weight[7]+0.02151657414559676*rho[2]*weight[7]+0.02151657414559676*rho[1]*weight[7]+0.0372677996249965*rho[0]*weight[7]-0.012422599874998833*weight[6]*rho[7]+0.012422599874998833*weight[5]*rho[7]-0.012422599874998833*weight[4]*rho[7]-0.02151657414559676*weight[3]*rho[7]+0.02151657414559676*weight[2]*rho[7]+0.02151657414559676*weight[1]*rho[7]+0.0372677996249965*weight[0]*rho[7]-0.058333333333333334*rho[6]*weight[6]-0.025*rho[5]*weight[6]+0.025*rho[4]*weight[6]-0.004811252243246881*rho[3]*weight[6]+0.004811252243246881*rho[2]*weight[6]+0.024056261216234404*rho[1]*weight[6]-0.01388888888888889*rho[0]*weight[6]-0.025*weight[5]*rho[6]+0.025*weight[4]*rho[6]-0.004811252243246881*weight[3]*rho[6]+0.004811252243246881*weight[2]*rho[6]+0.024056261216234404*weight[1]*rho[6]-0.01388888888888889*weight[0]*rho[6]-0.058333333333333334*rho[5]*weight[5]-0.025*rho[4]*weight[5]+0.004811252243246881*rho[3]*weight[5]+0.024056261216234404*rho[2]*weight[5]+0.004811252243246881*rho[1]*weight[5]+0.01388888888888889*rho[0]*weight[5]-0.025*weight[4]*rho[5]+0.004811252243246881*weight[3]*rho[5]+0.024056261216234404*weight[2]*rho[5]+0.004811252243246881*weight[1]*rho[5]+0.01388888888888889*weight[0]*rho[5]-0.058333333333333334*rho[4]*weight[4]+0.024056261216234404*rho[3]*weight[4]+0.004811252243246881*rho[2]*weight[4]-0.004811252243246881*rho[1]*weight[4]-0.01388888888888889*rho[0]*weight[4]+0.024056261216234404*weight[3]*rho[4]+0.004811252243246881*weight[2]*rho[4]-0.004811252243246881*weight[1]*rho[4]-0.01388888888888889*weight[0]*rho[4]-0.09166666666666667*rho[3]*weight[3]-0.01388888888888889*rho[2]*weight[3]+0.01388888888888889*rho[1]*weight[3]+0.024056261216234404*rho[0]*weight[3]-0.01388888888888889*weight[2]*rho[3]+0.01388888888888889*weight[1]*rho[3]+0.024056261216234404*weight[0]*rho[3]-0.09166666666666667*rho[2]*weight[2]-0.01388888888888889*rho[1]*weight[2]-0.024056261216234404*rho[0]*weight[2]-0.01388888888888889*weight[1]*rho[2]-0.024056261216234404*weight[0]*rho[2]-0.09166666666666667*rho[1]*weight[1]+0.024056261216234404*rho[0]*weight[1]+0.024056261216234404*weight[0]*rho[1]-0.125*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[6]],0.1*rho[19]*weight[19]-0.02666666666666667*rho[18]*weight[19]+0.05773502691896258*rho[15]*weight[19]-0.051639777949432225*rho[10]*weight[19]-0.029814239699997195*rho[5]*weight[19]-0.02666666666666667*weight[18]*rho[19]+0.05773502691896258*weight[15]*rho[19]-0.051639777949432225*weight[10]*rho[19]-0.029814239699997195*weight[5]*rho[19]+0.1*rho[18]*weight[18]-0.05773502691896258*rho[12]*weight[18]+0.051639777949432225*rho[10]*weight[18]-0.029814239699997195*rho[4]*weight[18]-0.05773502691896258*weight[12]*rho[18]+0.051639777949432225*weight[10]*rho[18]-0.029814239699997195*weight[4]*rho[18]+0.11904761904761905*rho[17]*weight[17]+0.03849001794597506*rho[16]*weight[17]-0.03849001794597506*rho[14]*weight[17]+0.06873217490352689*rho[13]*weight[17]-0.06873217490352689*rho[11]*weight[17]+0.022222222222222223*rho[9]*weight[17]+0.022222222222222223*rho[8]*weight[17]-0.03968253968253969*rho[7]*weight[17]-0.074535599249993*rho[6]*weight[17]-0.04303314829119352*rho[3]*weight[17]+0.04303314829119352*rho[2]*weight[17]+0.024845199749997667*rho[0]*weight[17]+0.03849001794597506*weight[16]*rho[17]-0.03849001794597506*weight[14]*rho[17]+0.06873217490352689*weight[13]*rho[17]-0.06873217490352689*weight[11]*rho[17]+0.022222222222222223*weight[9]*rho[17]+0.022222222222222223*weight[8]*rho[17]-0.03968253968253969*weight[7]*rho[17]-0.074535599249993*weight[6]*rho[17]-0.04303314829119352*weight[3]*rho[17]+0.04303314829119352*weight[2]*rho[17]+0.024845199749997667*weight[0]*rho[17]+0.16666666666666669*rho[16]*weight[16]-0.044444444444444446*rho[14]*weight[16]+0.022222222222222223*rho[13]*weight[16]+0.09622504486493764*rho[9]*weight[16]-0.08606629658238706*rho[6]*weight[16]-0.049690399499995326*rho[3]*weight[16]-0.044444444444444446*weight[14]*rho[16]+0.022222222222222223*weight[13]*rho[16]+0.09622504486493764*weight[9]*rho[16]-0.08606629658238706*weight[6]*rho[16]-0.049690399499995326*weight[3]*rho[16]+0.1*rho[15]*weight[15]-0.029814239699997195*rho[10]*weight[15]-0.05163977794943223*rho[5]*weight[15]-0.029814239699997195*weight[10]*rho[15]-0.05163977794943223*weight[5]*rho[15]+0.16666666666666669*rho[14]*weight[14]+0.022222222222222223*rho[11]*weight[14]-0.09622504486493764*rho[8]*weight[14]+0.08606629658238706*rho[6]*weight[14]-0.049690399499995326*rho[2]*weight[14]+0.022222222222222223*weight[11]*rho[14]-0.09622504486493764*weight[8]*rho[14]+0.08606629658238706*weight[6]*rho[14]-0.049690399499995326*weight[2]*rho[14]+0.11904761904761905*rho[13]*weight[13]-0.03968253968253969*rho[11]*weight[13]+0.03849001794597506*rho[9]*weight[13]-0.06873217490352689*rho[7]*weight[13]-0.04303314829119353*rho[6]*weight[13]-0.07453559924999299*rho[3]*weight[13]+0.024845199749997663*rho[2]*weight[13]+0.04303314829119353*rho[0]*weight[13]-0.03968253968253969*weight[11]*rho[13]+0.03849001794597506*weight[9]*rho[13]-0.06873217490352689*weight[7]*rho[13]-0.04303314829119353*weight[6]*rho[13]-0.07453559924999299*weight[3]*rho[13]+0.024845199749997663*weight[2]*rho[13]+0.04303314829119353*weight[0]*rho[13]+0.1*rho[12]*weight[12]-0.029814239699997195*rho[10]*weight[12]+0.05163977794943223*rho[4]*weight[12]-0.029814239699997195*weight[10]*rho[12]+0.05163977794943223*weight[4]*rho[12]+0.11904761904761905*rho[11]*weight[11]-0.03849001794597506*rho[8]*weight[11]+0.06873217490352689*rho[7]*weight[11]+0.04303314829119353*rho[6]*weight[11]+0.024845199749997663*rho[3]*weight[11]-0.07453559924999299*rho[2]*weight[11]-0.04303314829119353*rho[0]*weight[11]-0.03849001794597506*weight[8]*rho[11]+0.06873217490352689*weight[7]*rho[11]+0.04303314829119353*weight[6]*rho[11]+0.024845199749997663*weight[3]*rho[11]-0.07453559924999299*weight[2]*rho[11]-0.04303314829119353*weight[0]*rho[11]+0.1*rho[10]*weight[10]+0.05773502691896258*rho[5]*weight[10]-0.05773502691896258*rho[4]*weight[10]-0.03333333333333333*rho[1]*weight[10]+0.05773502691896258*weight[5]*rho[10]-0.05773502691896258*weight[4]*rho[10]-0.03333333333333333*weight[1]*rho[10]+0.16666666666666669*rho[9]*weight[9]-0.04969039949999533*rho[6]*weight[9]-0.08606629658238704*rho[3]*weight[9]-0.04969039949999533*weight[6]*rho[9]-0.08606629658238704*weight[3]*rho[9]+0.16666666666666669*rho[8]*weight[8]-0.04969039949999533*rho[6]*weight[8]+0.08606629658238704*rho[2]*weight[8]-0.04969039949999533*weight[6]*rho[8]+0.08606629658238704*weight[2]*rho[8]+0.11904761904761905*rho[7]*weight[7]+0.024845199749997667*rho[6]*weight[7]+0.04303314829119352*rho[3]*weight[7]-0.04303314829119352*rho[2]*weight[7]-0.074535599249993*rho[0]*weight[7]+0.024845199749997667*weight[6]*rho[7]+0.04303314829119352*weight[3]*rho[7]-0.04303314829119352*weight[2]*rho[7]-0.074535599249993*weight[0]*rho[7]+0.16666666666666669*rho[6]*weight[6]+0.09622504486493762*rho[3]*weight[6]-0.09622504486493762*rho[2]*weight[6]-0.05555555555555556*rho[0]*weight[6]+0.09622504486493762*weight[3]*rho[6]-0.09622504486493762*weight[2]*rho[6]-0.05555555555555556*weight[0]*rho[6]+0.1*rho[5]*weight[5]-0.03333333333333333*rho[4]*weight[5]-0.05773502691896258*rho[1]*weight[5]-0.03333333333333333*weight[4]*rho[5]-0.05773502691896258*weight[1]*rho[5]+0.1*rho[4]*weight[4]+0.05773502691896258*rho[1]*weight[4]+0.05773502691896258*weight[1]*rho[4]+0.16666666666666669*rho[3]*weight[3]-0.05555555555555556*rho[2]*weight[3]-0.09622504486493762*rho[0]*weight[3]-0.05555555555555556*weight[2]*rho[3]-0.09622504486493762*weight[0]*rho[3]+0.16666666666666669*rho[2]*weight[2]+0.09622504486493762*rho[0]*weight[2]+0.09622504486493762*weight[0]*rho[2]+0.1*rho[1]*weight[1]+0.16666666666666669*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[6]] += 0.1*rho[19]*weight[19]-0.02666666666666667*rho[18]*weight[19]+0.05773502691896258*rho[15]*weight[19]-0.051639777949432225*rho[10]*weight[19]-0.029814239699997195*rho[5]*weight[19]-0.02666666666666667*weight[18]*rho[19]+0.05773502691896258*weight[15]*rho[19]-0.051639777949432225*weight[10]*rho[19]-0.029814239699997195*weight[5]*rho[19]+0.1*rho[18]*weight[18]-0.05773502691896258*rho[12]*weight[18]+0.051639777949432225*rho[10]*weight[18]-0.029814239699997195*rho[4]*weight[18]-0.05773502691896258*weight[12]*rho[18]+0.051639777949432225*weight[10]*rho[18]-0.029814239699997195*weight[4]*rho[18]+0.11904761904761905*rho[17]*weight[17]+0.03849001794597506*rho[16]*weight[17]-0.03849001794597506*rho[14]*weight[17]+0.06873217490352689*rho[13]*weight[17]-0.06873217490352689*rho[11]*weight[17]+0.022222222222222223*rho[9]*weight[17]+0.022222222222222223*rho[8]*weight[17]-0.03968253968253969*rho[7]*weight[17]-0.074535599249993*rho[6]*weight[17]-0.04303314829119352*rho[3]*weight[17]+0.04303314829119352*rho[2]*weight[17]+0.024845199749997667*rho[0]*weight[17]+0.03849001794597506*weight[16]*rho[17]-0.03849001794597506*weight[14]*rho[17]+0.06873217490352689*weight[13]*rho[17]-0.06873217490352689*weight[11]*rho[17]+0.022222222222222223*weight[9]*rho[17]+0.022222222222222223*weight[8]*rho[17]-0.03968253968253969*weight[7]*rho[17]-0.074535599249993*weight[6]*rho[17]-0.04303314829119352*weight[3]*rho[17]+0.04303314829119352*weight[2]*rho[17]+0.024845199749997667*weight[0]*rho[17]+0.16666666666666669*rho[16]*weight[16]-0.044444444444444446*rho[14]*weight[16]+0.022222222222222223*rho[13]*weight[16]+0.09622504486493764*rho[9]*weight[16]-0.08606629658238706*rho[6]*weight[16]-0.049690399499995326*rho[3]*weight[16]-0.044444444444444446*weight[14]*rho[16]+0.022222222222222223*weight[13]*rho[16]+0.09622504486493764*weight[9]*rho[16]-0.08606629658238706*weight[6]*rho[16]-0.049690399499995326*weight[3]*rho[16]+0.1*rho[15]*weight[15]-0.029814239699997195*rho[10]*weight[15]-0.05163977794943223*rho[5]*weight[15]-0.029814239699997195*weight[10]*rho[15]-0.05163977794943223*weight[5]*rho[15]+0.16666666666666669*rho[14]*weight[14]+0.022222222222222223*rho[11]*weight[14]-0.09622504486493764*rho[8]*weight[14]+0.08606629658238706*rho[6]*weight[14]-0.049690399499995326*rho[2]*weight[14]+0.022222222222222223*weight[11]*rho[14]-0.09622504486493764*weight[8]*rho[14]+0.08606629658238706*weight[6]*rho[14]-0.049690399499995326*weight[2]*rho[14]+0.11904761904761905*rho[13]*weight[13]-0.03968253968253969*rho[11]*weight[13]+0.03849001794597506*rho[9]*weight[13]-0.06873217490352689*rho[7]*weight[13]-0.04303314829119353*rho[6]*weight[13]-0.07453559924999299*rho[3]*weight[13]+0.024845199749997663*rho[2]*weight[13]+0.04303314829119353*rho[0]*weight[13]-0.03968253968253969*weight[11]*rho[13]+0.03849001794597506*weight[9]*rho[13]-0.06873217490352689*weight[7]*rho[13]-0.04303314829119353*weight[6]*rho[13]-0.07453559924999299*weight[3]*rho[13]+0.024845199749997663*weight[2]*rho[13]+0.04303314829119353*weight[0]*rho[13]+0.1*rho[12]*weight[12]-0.029814239699997195*rho[10]*weight[12]+0.05163977794943223*rho[4]*weight[12]-0.029814239699997195*weight[10]*rho[12]+0.05163977794943223*weight[4]*rho[12]+0.11904761904761905*rho[11]*weight[11]-0.03849001794597506*rho[8]*weight[11]+0.06873217490352689*rho[7]*weight[11]+0.04303314829119353*rho[6]*weight[11]+0.024845199749997663*rho[3]*weight[11]-0.07453559924999299*rho[2]*weight[11]-0.04303314829119353*rho[0]*weight[11]-0.03849001794597506*weight[8]*rho[11]+0.06873217490352689*weight[7]*rho[11]+0.04303314829119353*weight[6]*rho[11]+0.024845199749997663*weight[3]*rho[11]-0.07453559924999299*weight[2]*rho[11]-0.04303314829119353*weight[0]*rho[11]+0.1*rho[10]*weight[10]+0.05773502691896258*rho[5]*weight[10]-0.05773502691896258*rho[4]*weight[10]-0.03333333333333333*rho[1]*weight[10]+0.05773502691896258*weight[5]*rho[10]-0.05773502691896258*weight[4]*rho[10]-0.03333333333333333*weight[1]*rho[10]+0.16666666666666669*rho[9]*weight[9]-0.04969039949999533*rho[6]*weight[9]-0.08606629658238704*rho[3]*weight[9]-0.04969039949999533*weight[6]*rho[9]-0.08606629658238704*weight[3]*rho[9]+0.16666666666666669*rho[8]*weight[8]-0.04969039949999533*rho[6]*weight[8]+0.08606629658238704*rho[2]*weight[8]-0.04969039949999533*weight[6]*rho[8]+0.08606629658238704*weight[2]*rho[8]+0.11904761904761905*rho[7]*weight[7]+0.024845199749997667*rho[6]*weight[7]+0.04303314829119352*rho[3]*weight[7]-0.04303314829119352*rho[2]*weight[7]-0.074535599249993*rho[0]*weight[7]+0.024845199749997667*weight[6]*rho[7]+0.04303314829119352*weight[3]*rho[7]-0.04303314829119352*weight[2]*rho[7]-0.074535599249993*weight[0]*rho[7]+0.16666666666666669*rho[6]*weight[6]+0.09622504486493762*rho[3]*weight[6]-0.09622504486493762*rho[2]*weight[6]-0.05555555555555556*rho[0]*weight[6]+0.09622504486493762*weight[3]*rho[6]-0.09622504486493762*weight[2]*rho[6]-0.05555555555555556*weight[0]*rho[6]+0.1*rho[5]*weight[5]-0.03333333333333333*rho[4]*weight[5]-0.05773502691896258*rho[1]*weight[5]-0.03333333333333333*weight[4]*rho[5]-0.05773502691896258*weight[1]*rho[5]+0.1*rho[4]*weight[4]+0.05773502691896258*rho[1]*weight[4]+0.05773502691896258*weight[1]*rho[4]+0.16666666666666669*rho[3]*weight[3]-0.05555555555555556*rho[2]*weight[3]-0.09622504486493762*rho[0]*weight[3]-0.05555555555555556*weight[2]*rho[3]-0.09622504486493762*weight[0]*rho[3]+0.16666666666666669*rho[2]*weight[2]+0.09622504486493762*rho[0]*weight[2]+0.09622504486493762*weight[0]*rho[2]+0.1*rho[1]*weight[1]+0.16666666666666669*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[7]],-(0.034523809523809526*rho[19]*weight[19])-0.02*rho[18]*weight[19]-0.02*rho[17]*weight[19]+0.008935182737458497*rho[16]*weight[19]+0.008935182737458497*rho[15]*weight[19]-0.01924500897298753*rho[14]*weight[19]-0.01924500897298753*rho[13]*weight[19]+0.01924500897298753*rho[12]*weight[19]+0.01924500897298753*rho[11]*weight[19]-0.012909944487358056*rho[10]*weight[19]+0.021825396825396828*rho[9]*weight[19]+0.011111111111111112*rho[8]*weight[19]+0.011111111111111112*rho[7]*weight[19]-0.022360679774997897*rho[6]*weight[19]-0.022360679774997897*rho[5]*weight[19]+0.0372677996249965*rho[4]*weight[19]-0.02151657414559676*rho[3]*weight[19]+0.02151657414559676*rho[2]*weight[19]+0.02151657414559676*rho[1]*weight[19]+0.012422599874998833*rho[0]*weight[19]-0.02*weight[18]*rho[19]-0.02*weight[17]*rho[19]+0.008935182737458497*weight[16]*rho[19]+0.008935182737458497*weight[15]*rho[19]-0.01924500897298753*weight[14]*rho[19]-0.01924500897298753*weight[13]*rho[19]+0.01924500897298753*weight[12]*rho[19]+0.01924500897298753*weight[11]*rho[19]-0.012909944487358056*weight[10]*rho[19]+0.021825396825396828*weight[9]*rho[19]+0.011111111111111112*weight[8]*rho[19]+0.011111111111111112*weight[7]*rho[19]-0.022360679774997897*weight[6]*rho[19]-0.022360679774997897*weight[5]*rho[19]+0.0372677996249965*weight[4]*rho[19]-0.02151657414559676*weight[3]*rho[19]+0.02151657414559676*weight[2]*rho[19]+0.02151657414559676*weight[1]*rho[19]+0.012422599874998833*weight[0]*rho[19]-0.034523809523809526*rho[18]*weight[18]+0.02*rho[17]*weight[18]-0.01924500897298753*rho[16]*weight[18]-0.01924500897298753*rho[15]*weight[18]+0.008935182737458497*rho[14]*weight[18]+0.01924500897298753*rho[13]*weight[18]-0.008935182737458497*rho[12]*weight[18]-0.01924500897298753*rho[11]*weight[18]+0.012909944487358056*rho[10]*weight[18]-0.011111111111111112*rho[9]*weight[18]-0.021825396825396828*rho[8]*weight[18]-0.011111111111111112*rho[7]*weight[18]+0.022360679774997897*rho[6]*weight[18]+0.0372677996249965*rho[5]*weight[18]-0.022360679774997897*rho[4]*weight[18]+0.02151657414559676*rho[3]*weight[18]-0.02151657414559676*rho[2]*weight[18]-0.02151657414559676*rho[1]*weight[18]-0.012422599874998833*rho[0]*weight[18]+0.02*weight[17]*rho[18]-0.01924500897298753*weight[16]*rho[18]-0.01924500897298753*weight[15]*rho[18]+0.008935182737458497*weight[14]*rho[18]+0.01924500897298753*weight[13]*rho[18]-0.008935182737458497*weight[12]*rho[18]-0.01924500897298753*weight[11]*rho[18]+0.012909944487358056*weight[10]*rho[18]-0.011111111111111112*weight[9]*rho[18]-0.021825396825396828*weight[8]*rho[18]-0.011111111111111112*weight[7]*rho[18]+0.022360679774997897*weight[6]*rho[18]+0.0372677996249965*weight[5]*rho[18]-0.022360679774997897*weight[4]*rho[18]+0.02151657414559676*weight[3]*rho[18]-0.02151657414559676*weight[2]*rho[18]-0.02151657414559676*weight[1]*rho[18]-0.012422599874998833*weight[0]*rho[18]-0.034523809523809526*rho[17]*weight[17]-0.01924500897298753*rho[16]*weight[17]-0.01924500897298753*rho[15]*weight[17]+0.01924500897298753*rho[14]*weight[17]+0.008935182737458497*rho[13]*weight[17]-0.01924500897298753*rho[12]*weight[17]-0.008935182737458497*rho[11]*weight[17]+0.012909944487358056*rho[10]*weight[17]-0.011111111111111112*rho[9]*weight[17]-0.011111111111111112*rho[8]*weight[17]-0.021825396825396828*rho[7]*weight[17]+0.0372677996249965*rho[6]*weight[17]+0.022360679774997897*rho[5]*weight[17]-0.022360679774997897*rho[4]*weight[17]+0.02151657414559676*rho[3]*weight[17]-0.02151657414559676*rho[2]*weight[17]-0.02151657414559676*rho[1]*weight[17]-0.012422599874998833*rho[0]*weight[17]-0.01924500897298753*weight[16]*rho[17]-0.01924500897298753*weight[15]*rho[17]+0.01924500897298753*weight[14]*rho[17]+0.008935182737458497*weight[13]*rho[17]-0.01924500897298753*weight[12]*rho[17]-0.008935182737458497*weight[11]*rho[17]+0.012909944487358056*weight[10]*rho[17]-0.011111111111111112*weight[9]*rho[17]-0.011111111111111112*weight[8]*rho[17]-0.021825396825396828*weight[7]*rho[17]+0.0372677996249965*weight[6]*rho[17]+0.022360679774997897*weight[5]*rho[17]-0.022360679774997897*weight[4]*rho[17]+0.02151657414559676*weight[3]*rho[17]-0.02151657414559676*weight[2]*rho[17]-0.02151657414559676*weight[1]*rho[17]-0.012422599874998833*weight[0]*rho[17]-0.06785714285714287*rho[16]*weight[16]+0.021825396825396828*rho[15]*weight[16]-0.011111111111111112*rho[14]*weight[16]-0.011111111111111112*rho[13]*weight[16]+0.011111111111111112*rho[12]*weight[16]-0.022360679774997897*rho[10]*weight[16]-0.010309826235529031*rho[9]*weight[16]+0.01924500897298753*rho[8]*weight[16]+0.004303314829119352*rho[6]*weight[16]-0.021516574145596764*rho[5]*weight[16]+0.021516574145596764*rho[4]*weight[16]-0.012422599874998832*rho[3]*weight[16]+0.037267799624996496*rho[2]*weight[16]+0.012422599874998832*rho[1]*weight[16]+0.021516574145596764*rho[0]*weight[16]+0.021825396825396828*weight[15]*rho[16]-0.011111111111111112*weight[14]*rho[16]-0.011111111111111112*weight[13]*rho[16]+0.011111111111111112*weight[12]*rho[16]-0.022360679774997897*weight[10]*rho[16]-0.010309826235529031*weight[9]*rho[16]+0.01924500897298753*weight[8]*rho[16]+0.004303314829119352*weight[6]*rho[16]-0.021516574145596764*weight[5]*rho[16]+0.021516574145596764*weight[4]*rho[16]-0.012422599874998832*weight[3]*rho[16]+0.037267799624996496*weight[2]*rho[16]+0.012422599874998832*weight[1]*rho[16]+0.021516574145596764*weight[0]*rho[16]-0.06785714285714287*rho[15]*weight[15]-0.011111111111111112*rho[14]*weight[15]-0.011111111111111112*rho[13]*weight[15]+0.011111111111111112*rho[11]*weight[15]-0.022360679774997897*rho[10]*weight[15]-0.010309826235529031*rho[9]*weight[15]+0.01924500897298753*rho[7]*weight[15]-0.021516574145596764*rho[6]*weight[15]+0.004303314829119352*rho[5]*weight[15]+0.021516574145596764*rho[4]*weight[15]-0.012422599874998832*rho[3]*weight[15]+0.012422599874998832*rho[2]*weight[15]+0.037267799624996496*rho[1]*weight[15]+0.021516574145596764*rho[0]*weight[15]-0.011111111111111112*weight[14]*rho[15]-0.011111111111111112*weight[13]*rho[15]+0.011111111111111112*weight[11]*rho[15]-0.022360679774997897*weight[10]*rho[15]-0.010309826235529031*weight[9]*rho[15]+0.01924500897298753*weight[7]*rho[15]-0.021516574145596764*weight[6]*rho[15]+0.004303314829119352*weight[5]*rho[15]+0.021516574145596764*weight[4]*rho[15]-0.012422599874998832*weight[3]*rho[15]+0.012422599874998832*weight[2]*rho[15]+0.037267799624996496*weight[1]*rho[15]+0.021516574145596764*weight[0]*rho[15]-0.06785714285714287*rho[14]*weight[14]-0.021825396825396828*rho[12]*weight[14]-0.011111111111111112*rho[11]*weight[14]+0.022360679774997897*rho[10]*weight[14]-0.01924500897298753*rho[9]*weight[14]+0.010309826235529031*rho[8]*weight[14]-0.004303314829119352*rho[6]*weight[14]+0.021516574145596764*rho[5]*weight[14]-0.021516574145596764*rho[4]*weight[14]+0.037267799624996496*rho[3]*weight[14]-0.012422599874998832*rho[2]*weight[14]-0.012422599874998832*rho[1]*weight[14]-0.021516574145596764*rho[0]*weight[14]-0.021825396825396828*weight[12]*rho[14]-0.011111111111111112*weight[11]*rho[14]+0.022360679774997897*weight[10]*rho[14]-0.01924500897298753*weight[9]*rho[14]+0.010309826235529031*weight[8]*rho[14]-0.004303314829119352*weight[6]*rho[14]+0.021516574145596764*weight[5]*rho[14]-0.021516574145596764*weight[4]*rho[14]+0.037267799624996496*weight[3]*rho[14]-0.012422599874998832*weight[2]*rho[14]-0.012422599874998832*weight[1]*rho[14]-0.021516574145596764*weight[0]*rho[14]-0.06785714285714287*rho[13]*weight[13]-0.011111111111111112*rho[12]*weight[13]-0.021825396825396828*rho[11]*weight[13]+0.022360679774997897*rho[10]*weight[13]-0.01924500897298753*rho[9]*weight[13]+0.010309826235529031*rho[7]*weight[13]+0.021516574145596764*rho[6]*weight[13]-0.004303314829119352*rho[5]*weight[13]-0.021516574145596764*rho[4]*weight[13]+0.037267799624996496*rho[3]*weight[13]-0.012422599874998832*rho[2]*weight[13]-0.012422599874998832*rho[1]*weight[13]-0.021516574145596764*rho[0]*weight[13]-0.011111111111111112*weight[12]*rho[13]-0.021825396825396828*weight[11]*rho[13]+0.022360679774997897*weight[10]*rho[13]-0.01924500897298753*weight[9]*rho[13]+0.010309826235529031*weight[7]*rho[13]+0.021516574145596764*weight[6]*rho[13]-0.004303314829119352*weight[5]*rho[13]-0.021516574145596764*weight[4]*rho[13]+0.037267799624996496*weight[3]*rho[13]-0.012422599874998832*weight[2]*rho[13]-0.012422599874998832*weight[1]*rho[13]-0.021516574145596764*weight[0]*rho[13]-0.06785714285714287*rho[12]*weight[12]+0.011111111111111112*rho[11]*weight[12]-0.022360679774997897*rho[10]*weight[12]-0.010309826235529031*rho[8]*weight[12]+0.01924500897298753*rho[7]*weight[12]-0.021516574145596764*rho[6]*weight[12]-0.021516574145596764*rho[5]*weight[12]-0.004303314829119352*rho[4]*weight[12]-0.012422599874998832*rho[3]*weight[12]+0.012422599874998832*rho[2]*weight[12]+0.037267799624996496*rho[1]*weight[12]+0.021516574145596764*rho[0]*weight[12]+0.011111111111111112*weight[11]*rho[12]-0.022360679774997897*weight[10]*rho[12]-0.010309826235529031*weight[8]*rho[12]+0.01924500897298753*weight[7]*rho[12]-0.021516574145596764*weight[6]*rho[12]-0.021516574145596764*weight[5]*rho[12]-0.004303314829119352*weight[4]*rho[12]-0.012422599874998832*weight[3]*rho[12]+0.012422599874998832*weight[2]*rho[12]+0.037267799624996496*weight[1]*rho[12]+0.021516574145596764*weight[0]*rho[12]-0.06785714285714287*rho[11]*weight[11]-0.022360679774997897*rho[10]*weight[11]+0.01924500897298753*rho[8]*weight[11]-0.010309826235529031*rho[7]*weight[11]-0.021516574145596764*rho[6]*weight[11]-0.021516574145596764*rho[5]*weight[11]-0.004303314829119352*rho[4]*weight[11]-0.012422599874998832*rho[3]*weight[11]+0.037267799624996496*rho[2]*weight[11]+0.012422599874998832*rho[1]*weight[11]+0.021516574145596764*rho[0]*weight[11]-0.022360679774997897*weight[10]*rho[11]+0.01924500897298753*weight[8]*rho[11]-0.010309826235529031*weight[7]*rho[11]-0.021516574145596764*weight[6]*rho[11]-0.021516574145596764*weight[5]*rho[11]-0.004303314829119352*weight[4]*rho[11]-0.012422599874998832*weight[3]*rho[11]+0.037267799624996496*weight[2]*rho[11]+0.012422599874998832*weight[1]*rho[11]+0.021516574145596764*weight[0]*rho[11]-0.025*rho[10]*weight[10]-0.02151657414559676*rho[9]*weight[10]-0.02151657414559676*rho[8]*weight[10]-0.02151657414559676*rho[7]*weight[10]+0.014433756729740645*rho[6]*weight[10]+0.014433756729740645*rho[5]*weight[10]-0.014433756729740645*rho[4]*weight[10]+0.025*rho[3]*weight[10]-0.025*rho[2]*weight[10]-0.025*rho[1]*weight[10]-0.024056261216234404*rho[0]*weight[10]-0.02151657414559676*weight[9]*rho[10]-0.02151657414559676*weight[8]*rho[10]-0.02151657414559676*weight[7]*rho[10]+0.014433756729740645*weight[6]*rho[10]+0.014433756729740645*weight[5]*rho[10]-0.014433756729740645*weight[4]*rho[10]+0.025*weight[3]*rho[10]-0.025*weight[2]*rho[10]-0.025*weight[1]*rho[10]-0.024056261216234404*weight[0]*rho[10]-0.10119047619047619*rho[9]*weight[9]-0.012422599874998833*rho[6]*weight[9]-0.012422599874998833*rho[5]*weight[9]+0.012422599874998833*rho[4]*weight[9]+0.02151657414559676*rho[3]*weight[9]+0.02151657414559676*rho[2]*weight[9]+0.02151657414559676*rho[1]*weight[9]+0.0372677996249965*rho[0]*weight[9]-0.012422599874998833*weight[6]*rho[9]-0.012422599874998833*weight[5]*rho[9]+0.012422599874998833*weight[4]*rho[9]+0.02151657414559676*weight[3]*rho[9]+0.02151657414559676*weight[2]*rho[9]+0.02151657414559676*weight[1]*rho[9]+0.0372677996249965*weight[0]*rho[9]-0.10119047619047619*rho[8]*weight[8]-0.012422599874998833*rho[6]*weight[8]-0.012422599874998833*rho[5]*weight[8]+0.012422599874998833*rho[4]*weight[8]-0.02151657414559676*rho[3]*weight[8]-0.02151657414559676*rho[2]*weight[8]+0.02151657414559676*rho[1]*weight[8]+0.0372677996249965*rho[0]*weight[8]-0.012422599874998833*weight[6]*rho[8]-0.012422599874998833*weight[5]*rho[8]+0.012422599874998833*weight[4]*rho[8]-0.02151657414559676*weight[3]*rho[8]-0.02151657414559676*weight[2]*rho[8]+0.02151657414559676*weight[1]*rho[8]+0.0372677996249965*weight[0]*rho[8]-0.10119047619047619*rho[7]*weight[7]-0.012422599874998833*rho[6]*weight[7]-0.012422599874998833*rho[5]*weight[7]+0.012422599874998833*rho[4]*weight[7]-0.02151657414559676*rho[3]*weight[7]+0.02151657414559676*rho[2]*weight[7]-0.02151657414559676*rho[1]*weight[7]+0.0372677996249965*rho[0]*weight[7]-0.012422599874998833*weight[6]*rho[7]-0.012422599874998833*weight[5]*rho[7]+0.012422599874998833*weight[4]*rho[7]-0.02151657414559676*weight[3]*rho[7]+0.02151657414559676*weight[2]*rho[7]-0.02151657414559676*weight[1]*rho[7]+0.0372677996249965*weight[0]*rho[7]-0.058333333333333334*rho[6]*weight[6]+0.025*rho[5]*weight[6]-0.025*rho[4]*weight[6]-0.004811252243246881*rho[3]*weight[6]+0.004811252243246881*rho[2]*weight[6]-0.024056261216234404*rho[1]*weight[6]-0.01388888888888889*rho[0]*weight[6]+0.025*weight[5]*rho[6]-0.025*weight[4]*rho[6]-0.004811252243246881*weight[3]*rho[6]+0.004811252243246881*weight[2]*rho[6]-0.024056261216234404*weight[1]*rho[6]-0.01388888888888889*weight[0]*rho[6]-0.058333333333333334*rho[5]*weight[5]-0.025*rho[4]*weight[5]-0.004811252243246881*rho[3]*weight[5]-0.024056261216234404*rho[2]*weight[5]+0.004811252243246881*rho[1]*weight[5]-0.01388888888888889*rho[0]*weight[5]-0.025*weight[4]*rho[5]-0.004811252243246881*weight[3]*rho[5]-0.024056261216234404*weight[2]*rho[5]+0.004811252243246881*weight[1]*rho[5]-0.01388888888888889*weight[0]*rho[5]-0.058333333333333334*rho[4]*weight[4]-0.024056261216234404*rho[3]*weight[4]-0.004811252243246881*rho[2]*weight[4]-0.004811252243246881*rho[1]*weight[4]+0.01388888888888889*rho[0]*weight[4]-0.024056261216234404*weight[3]*rho[4]-0.004811252243246881*weight[2]*rho[4]-0.004811252243246881*weight[1]*rho[4]+0.01388888888888889*weight[0]*rho[4]-0.09166666666666667*rho[3]*weight[3]-0.01388888888888889*rho[2]*weight[3]-0.01388888888888889*rho[1]*weight[3]+0.024056261216234404*rho[0]*weight[3]-0.01388888888888889*weight[2]*rho[3]-0.01388888888888889*weight[1]*rho[3]+0.024056261216234404*weight[0]*rho[3]-0.09166666666666667*rho[2]*weight[2]+0.01388888888888889*rho[1]*weight[2]-0.024056261216234404*rho[0]*weight[2]+0.01388888888888889*weight[1]*rho[2]-0.024056261216234404*weight[0]*rho[2]-0.09166666666666667*rho[1]*weight[1]-0.024056261216234404*rho[0]*weight[1]-0.024056261216234404*weight[0]*rho[1]-0.125*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[7]] += -(0.034523809523809526*rho[19]*weight[19])-0.02*rho[18]*weight[19]-0.02*rho[17]*weight[19]+0.008935182737458497*rho[16]*weight[19]+0.008935182737458497*rho[15]*weight[19]-0.01924500897298753*rho[14]*weight[19]-0.01924500897298753*rho[13]*weight[19]+0.01924500897298753*rho[12]*weight[19]+0.01924500897298753*rho[11]*weight[19]-0.012909944487358056*rho[10]*weight[19]+0.021825396825396828*rho[9]*weight[19]+0.011111111111111112*rho[8]*weight[19]+0.011111111111111112*rho[7]*weight[19]-0.022360679774997897*rho[6]*weight[19]-0.022360679774997897*rho[5]*weight[19]+0.0372677996249965*rho[4]*weight[19]-0.02151657414559676*rho[3]*weight[19]+0.02151657414559676*rho[2]*weight[19]+0.02151657414559676*rho[1]*weight[19]+0.012422599874998833*rho[0]*weight[19]-0.02*weight[18]*rho[19]-0.02*weight[17]*rho[19]+0.008935182737458497*weight[16]*rho[19]+0.008935182737458497*weight[15]*rho[19]-0.01924500897298753*weight[14]*rho[19]-0.01924500897298753*weight[13]*rho[19]+0.01924500897298753*weight[12]*rho[19]+0.01924500897298753*weight[11]*rho[19]-0.012909944487358056*weight[10]*rho[19]+0.021825396825396828*weight[9]*rho[19]+0.011111111111111112*weight[8]*rho[19]+0.011111111111111112*weight[7]*rho[19]-0.022360679774997897*weight[6]*rho[19]-0.022360679774997897*weight[5]*rho[19]+0.0372677996249965*weight[4]*rho[19]-0.02151657414559676*weight[3]*rho[19]+0.02151657414559676*weight[2]*rho[19]+0.02151657414559676*weight[1]*rho[19]+0.012422599874998833*weight[0]*rho[19]-0.034523809523809526*rho[18]*weight[18]+0.02*rho[17]*weight[18]-0.01924500897298753*rho[16]*weight[18]-0.01924500897298753*rho[15]*weight[18]+0.008935182737458497*rho[14]*weight[18]+0.01924500897298753*rho[13]*weight[18]-0.008935182737458497*rho[12]*weight[18]-0.01924500897298753*rho[11]*weight[18]+0.012909944487358056*rho[10]*weight[18]-0.011111111111111112*rho[9]*weight[18]-0.021825396825396828*rho[8]*weight[18]-0.011111111111111112*rho[7]*weight[18]+0.022360679774997897*rho[6]*weight[18]+0.0372677996249965*rho[5]*weight[18]-0.022360679774997897*rho[4]*weight[18]+0.02151657414559676*rho[3]*weight[18]-0.02151657414559676*rho[2]*weight[18]-0.02151657414559676*rho[1]*weight[18]-0.012422599874998833*rho[0]*weight[18]+0.02*weight[17]*rho[18]-0.01924500897298753*weight[16]*rho[18]-0.01924500897298753*weight[15]*rho[18]+0.008935182737458497*weight[14]*rho[18]+0.01924500897298753*weight[13]*rho[18]-0.008935182737458497*weight[12]*rho[18]-0.01924500897298753*weight[11]*rho[18]+0.012909944487358056*weight[10]*rho[18]-0.011111111111111112*weight[9]*rho[18]-0.021825396825396828*weight[8]*rho[18]-0.011111111111111112*weight[7]*rho[18]+0.022360679774997897*weight[6]*rho[18]+0.0372677996249965*weight[5]*rho[18]-0.022360679774997897*weight[4]*rho[18]+0.02151657414559676*weight[3]*rho[18]-0.02151657414559676*weight[2]*rho[18]-0.02151657414559676*weight[1]*rho[18]-0.012422599874998833*weight[0]*rho[18]-0.034523809523809526*rho[17]*weight[17]-0.01924500897298753*rho[16]*weight[17]-0.01924500897298753*rho[15]*weight[17]+0.01924500897298753*rho[14]*weight[17]+0.008935182737458497*rho[13]*weight[17]-0.01924500897298753*rho[12]*weight[17]-0.008935182737458497*rho[11]*weight[17]+0.012909944487358056*rho[10]*weight[17]-0.011111111111111112*rho[9]*weight[17]-0.011111111111111112*rho[8]*weight[17]-0.021825396825396828*rho[7]*weight[17]+0.0372677996249965*rho[6]*weight[17]+0.022360679774997897*rho[5]*weight[17]-0.022360679774997897*rho[4]*weight[17]+0.02151657414559676*rho[3]*weight[17]-0.02151657414559676*rho[2]*weight[17]-0.02151657414559676*rho[1]*weight[17]-0.012422599874998833*rho[0]*weight[17]-0.01924500897298753*weight[16]*rho[17]-0.01924500897298753*weight[15]*rho[17]+0.01924500897298753*weight[14]*rho[17]+0.008935182737458497*weight[13]*rho[17]-0.01924500897298753*weight[12]*rho[17]-0.008935182737458497*weight[11]*rho[17]+0.012909944487358056*weight[10]*rho[17]-0.011111111111111112*weight[9]*rho[17]-0.011111111111111112*weight[8]*rho[17]-0.021825396825396828*weight[7]*rho[17]+0.0372677996249965*weight[6]*rho[17]+0.022360679774997897*weight[5]*rho[17]-0.022360679774997897*weight[4]*rho[17]+0.02151657414559676*weight[3]*rho[17]-0.02151657414559676*weight[2]*rho[17]-0.02151657414559676*weight[1]*rho[17]-0.012422599874998833*weight[0]*rho[17]-0.06785714285714287*rho[16]*weight[16]+0.021825396825396828*rho[15]*weight[16]-0.011111111111111112*rho[14]*weight[16]-0.011111111111111112*rho[13]*weight[16]+0.011111111111111112*rho[12]*weight[16]-0.022360679774997897*rho[10]*weight[16]-0.010309826235529031*rho[9]*weight[16]+0.01924500897298753*rho[8]*weight[16]+0.004303314829119352*rho[6]*weight[16]-0.021516574145596764*rho[5]*weight[16]+0.021516574145596764*rho[4]*weight[16]-0.012422599874998832*rho[3]*weight[16]+0.037267799624996496*rho[2]*weight[16]+0.012422599874998832*rho[1]*weight[16]+0.021516574145596764*rho[0]*weight[16]+0.021825396825396828*weight[15]*rho[16]-0.011111111111111112*weight[14]*rho[16]-0.011111111111111112*weight[13]*rho[16]+0.011111111111111112*weight[12]*rho[16]-0.022360679774997897*weight[10]*rho[16]-0.010309826235529031*weight[9]*rho[16]+0.01924500897298753*weight[8]*rho[16]+0.004303314829119352*weight[6]*rho[16]-0.021516574145596764*weight[5]*rho[16]+0.021516574145596764*weight[4]*rho[16]-0.012422599874998832*weight[3]*rho[16]+0.037267799624996496*weight[2]*rho[16]+0.012422599874998832*weight[1]*rho[16]+0.021516574145596764*weight[0]*rho[16]-0.06785714285714287*rho[15]*weight[15]-0.011111111111111112*rho[14]*weight[15]-0.011111111111111112*rho[13]*weight[15]+0.011111111111111112*rho[11]*weight[15]-0.022360679774997897*rho[10]*weight[15]-0.010309826235529031*rho[9]*weight[15]+0.01924500897298753*rho[7]*weight[15]-0.021516574145596764*rho[6]*weight[15]+0.004303314829119352*rho[5]*weight[15]+0.021516574145596764*rho[4]*weight[15]-0.012422599874998832*rho[3]*weight[15]+0.012422599874998832*rho[2]*weight[15]+0.037267799624996496*rho[1]*weight[15]+0.021516574145596764*rho[0]*weight[15]-0.011111111111111112*weight[14]*rho[15]-0.011111111111111112*weight[13]*rho[15]+0.011111111111111112*weight[11]*rho[15]-0.022360679774997897*weight[10]*rho[15]-0.010309826235529031*weight[9]*rho[15]+0.01924500897298753*weight[7]*rho[15]-0.021516574145596764*weight[6]*rho[15]+0.004303314829119352*weight[5]*rho[15]+0.021516574145596764*weight[4]*rho[15]-0.012422599874998832*weight[3]*rho[15]+0.012422599874998832*weight[2]*rho[15]+0.037267799624996496*weight[1]*rho[15]+0.021516574145596764*weight[0]*rho[15]-0.06785714285714287*rho[14]*weight[14]-0.021825396825396828*rho[12]*weight[14]-0.011111111111111112*rho[11]*weight[14]+0.022360679774997897*rho[10]*weight[14]-0.01924500897298753*rho[9]*weight[14]+0.010309826235529031*rho[8]*weight[14]-0.004303314829119352*rho[6]*weight[14]+0.021516574145596764*rho[5]*weight[14]-0.021516574145596764*rho[4]*weight[14]+0.037267799624996496*rho[3]*weight[14]-0.012422599874998832*rho[2]*weight[14]-0.012422599874998832*rho[1]*weight[14]-0.021516574145596764*rho[0]*weight[14]-0.021825396825396828*weight[12]*rho[14]-0.011111111111111112*weight[11]*rho[14]+0.022360679774997897*weight[10]*rho[14]-0.01924500897298753*weight[9]*rho[14]+0.010309826235529031*weight[8]*rho[14]-0.004303314829119352*weight[6]*rho[14]+0.021516574145596764*weight[5]*rho[14]-0.021516574145596764*weight[4]*rho[14]+0.037267799624996496*weight[3]*rho[14]-0.012422599874998832*weight[2]*rho[14]-0.012422599874998832*weight[1]*rho[14]-0.021516574145596764*weight[0]*rho[14]-0.06785714285714287*rho[13]*weight[13]-0.011111111111111112*rho[12]*weight[13]-0.021825396825396828*rho[11]*weight[13]+0.022360679774997897*rho[10]*weight[13]-0.01924500897298753*rho[9]*weight[13]+0.010309826235529031*rho[7]*weight[13]+0.021516574145596764*rho[6]*weight[13]-0.004303314829119352*rho[5]*weight[13]-0.021516574145596764*rho[4]*weight[13]+0.037267799624996496*rho[3]*weight[13]-0.012422599874998832*rho[2]*weight[13]-0.012422599874998832*rho[1]*weight[13]-0.021516574145596764*rho[0]*weight[13]-0.011111111111111112*weight[12]*rho[13]-0.021825396825396828*weight[11]*rho[13]+0.022360679774997897*weight[10]*rho[13]-0.01924500897298753*weight[9]*rho[13]+0.010309826235529031*weight[7]*rho[13]+0.021516574145596764*weight[6]*rho[13]-0.004303314829119352*weight[5]*rho[13]-0.021516574145596764*weight[4]*rho[13]+0.037267799624996496*weight[3]*rho[13]-0.012422599874998832*weight[2]*rho[13]-0.012422599874998832*weight[1]*rho[13]-0.021516574145596764*weight[0]*rho[13]-0.06785714285714287*rho[12]*weight[12]+0.011111111111111112*rho[11]*weight[12]-0.022360679774997897*rho[10]*weight[12]-0.010309826235529031*rho[8]*weight[12]+0.01924500897298753*rho[7]*weight[12]-0.021516574145596764*rho[6]*weight[12]-0.021516574145596764*rho[5]*weight[12]-0.004303314829119352*rho[4]*weight[12]-0.012422599874998832*rho[3]*weight[12]+0.012422599874998832*rho[2]*weight[12]+0.037267799624996496*rho[1]*weight[12]+0.021516574145596764*rho[0]*weight[12]+0.011111111111111112*weight[11]*rho[12]-0.022360679774997897*weight[10]*rho[12]-0.010309826235529031*weight[8]*rho[12]+0.01924500897298753*weight[7]*rho[12]-0.021516574145596764*weight[6]*rho[12]-0.021516574145596764*weight[5]*rho[12]-0.004303314829119352*weight[4]*rho[12]-0.012422599874998832*weight[3]*rho[12]+0.012422599874998832*weight[2]*rho[12]+0.037267799624996496*weight[1]*rho[12]+0.021516574145596764*weight[0]*rho[12]-0.06785714285714287*rho[11]*weight[11]-0.022360679774997897*rho[10]*weight[11]+0.01924500897298753*rho[8]*weight[11]-0.010309826235529031*rho[7]*weight[11]-0.021516574145596764*rho[6]*weight[11]-0.021516574145596764*rho[5]*weight[11]-0.004303314829119352*rho[4]*weight[11]-0.012422599874998832*rho[3]*weight[11]+0.037267799624996496*rho[2]*weight[11]+0.012422599874998832*rho[1]*weight[11]+0.021516574145596764*rho[0]*weight[11]-0.022360679774997897*weight[10]*rho[11]+0.01924500897298753*weight[8]*rho[11]-0.010309826235529031*weight[7]*rho[11]-0.021516574145596764*weight[6]*rho[11]-0.021516574145596764*weight[5]*rho[11]-0.004303314829119352*weight[4]*rho[11]-0.012422599874998832*weight[3]*rho[11]+0.037267799624996496*weight[2]*rho[11]+0.012422599874998832*weight[1]*rho[11]+0.021516574145596764*weight[0]*rho[11]-0.025*rho[10]*weight[10]-0.02151657414559676*rho[9]*weight[10]-0.02151657414559676*rho[8]*weight[10]-0.02151657414559676*rho[7]*weight[10]+0.014433756729740645*rho[6]*weight[10]+0.014433756729740645*rho[5]*weight[10]-0.014433756729740645*rho[4]*weight[10]+0.025*rho[3]*weight[10]-0.025*rho[2]*weight[10]-0.025*rho[1]*weight[10]-0.024056261216234404*rho[0]*weight[10]-0.02151657414559676*weight[9]*rho[10]-0.02151657414559676*weight[8]*rho[10]-0.02151657414559676*weight[7]*rho[10]+0.014433756729740645*weight[6]*rho[10]+0.014433756729740645*weight[5]*rho[10]-0.014433756729740645*weight[4]*rho[10]+0.025*weight[3]*rho[10]-0.025*weight[2]*rho[10]-0.025*weight[1]*rho[10]-0.024056261216234404*weight[0]*rho[10]-0.10119047619047619*rho[9]*weight[9]-0.012422599874998833*rho[6]*weight[9]-0.012422599874998833*rho[5]*weight[9]+0.012422599874998833*rho[4]*weight[9]+0.02151657414559676*rho[3]*weight[9]+0.02151657414559676*rho[2]*weight[9]+0.02151657414559676*rho[1]*weight[9]+0.0372677996249965*rho[0]*weight[9]-0.012422599874998833*weight[6]*rho[9]-0.012422599874998833*weight[5]*rho[9]+0.012422599874998833*weight[4]*rho[9]+0.02151657414559676*weight[3]*rho[9]+0.02151657414559676*weight[2]*rho[9]+0.02151657414559676*weight[1]*rho[9]+0.0372677996249965*weight[0]*rho[9]-0.10119047619047619*rho[8]*weight[8]-0.012422599874998833*rho[6]*weight[8]-0.012422599874998833*rho[5]*weight[8]+0.012422599874998833*rho[4]*weight[8]-0.02151657414559676*rho[3]*weight[8]-0.02151657414559676*rho[2]*weight[8]+0.02151657414559676*rho[1]*weight[8]+0.0372677996249965*rho[0]*weight[8]-0.012422599874998833*weight[6]*rho[8]-0.012422599874998833*weight[5]*rho[8]+0.012422599874998833*weight[4]*rho[8]-0.02151657414559676*weight[3]*rho[8]-0.02151657414559676*weight[2]*rho[8]+0.02151657414559676*weight[1]*rho[8]+0.0372677996249965*weight[0]*rho[8]-0.10119047619047619*rho[7]*weight[7]-0.012422599874998833*rho[6]*weight[7]-0.012422599874998833*rho[5]*weight[7]+0.012422599874998833*rho[4]*weight[7]-0.02151657414559676*rho[3]*weight[7]+0.02151657414559676*rho[2]*weight[7]-0.02151657414559676*rho[1]*weight[7]+0.0372677996249965*rho[0]*weight[7]-0.012422599874998833*weight[6]*rho[7]-0.012422599874998833*weight[5]*rho[7]+0.012422599874998833*weight[4]*rho[7]-0.02151657414559676*weight[3]*rho[7]+0.02151657414559676*weight[2]*rho[7]-0.02151657414559676*weight[1]*rho[7]+0.0372677996249965*weight[0]*rho[7]-0.058333333333333334*rho[6]*weight[6]+0.025*rho[5]*weight[6]-0.025*rho[4]*weight[6]-0.004811252243246881*rho[3]*weight[6]+0.004811252243246881*rho[2]*weight[6]-0.024056261216234404*rho[1]*weight[6]-0.01388888888888889*rho[0]*weight[6]+0.025*weight[5]*rho[6]-0.025*weight[4]*rho[6]-0.004811252243246881*weight[3]*rho[6]+0.004811252243246881*weight[2]*rho[6]-0.024056261216234404*weight[1]*rho[6]-0.01388888888888889*weight[0]*rho[6]-0.058333333333333334*rho[5]*weight[5]-0.025*rho[4]*weight[5]-0.004811252243246881*rho[3]*weight[5]-0.024056261216234404*rho[2]*weight[5]+0.004811252243246881*rho[1]*weight[5]-0.01388888888888889*rho[0]*weight[5]-0.025*weight[4]*rho[5]-0.004811252243246881*weight[3]*rho[5]-0.024056261216234404*weight[2]*rho[5]+0.004811252243246881*weight[1]*rho[5]-0.01388888888888889*weight[0]*rho[5]-0.058333333333333334*rho[4]*weight[4]-0.024056261216234404*rho[3]*weight[4]-0.004811252243246881*rho[2]*weight[4]-0.004811252243246881*rho[1]*weight[4]+0.01388888888888889*rho[0]*weight[4]-0.024056261216234404*weight[3]*rho[4]-0.004811252243246881*weight[2]*rho[4]-0.004811252243246881*weight[1]*rho[4]+0.01388888888888889*weight[0]*rho[4]-0.09166666666666667*rho[3]*weight[3]-0.01388888888888889*rho[2]*weight[3]-0.01388888888888889*rho[1]*weight[3]+0.024056261216234404*rho[0]*weight[3]-0.01388888888888889*weight[2]*rho[3]-0.01388888888888889*weight[1]*rho[3]+0.024056261216234404*weight[0]*rho[3]-0.09166666666666667*rho[2]*weight[2]+0.01388888888888889*rho[1]*weight[2]-0.024056261216234404*rho[0]*weight[2]+0.01388888888888889*weight[1]*rho[2]-0.024056261216234404*weight[0]*rho[2]-0.09166666666666667*rho[1]*weight[1]-0.024056261216234404*rho[0]*weight[1]-0.024056261216234404*weight[0]*rho[1]-0.125*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[8]],0.11904761904761905*rho[19]*weight[19]-0.06873217490352689*rho[16]*weight[19]-0.06873217490352689*rho[15]*weight[19]+0.03849001794597506*rho[12]*weight[19]+0.03849001794597506*rho[11]*weight[19]+0.03968253968253969*rho[9]*weight[19]-0.022222222222222223*rho[8]*weight[19]-0.022222222222222223*rho[7]*weight[19]-0.074535599249993*rho[4]*weight[19]+0.04303314829119352*rho[2]*weight[19]+0.04303314829119352*rho[1]*weight[19]-0.024845199749997667*rho[0]*weight[19]-0.06873217490352689*weight[16]*rho[19]-0.06873217490352689*weight[15]*rho[19]+0.03849001794597506*weight[12]*rho[19]+0.03849001794597506*weight[11]*rho[19]+0.03968253968253969*weight[9]*rho[19]-0.022222222222222223*weight[8]*rho[19]-0.022222222222222223*weight[7]*rho[19]-0.074535599249993*weight[4]*rho[19]+0.04303314829119352*weight[2]*rho[19]+0.04303314829119352*weight[1]*rho[19]-0.024845199749997667*weight[0]*rho[19]+0.1*rho[18]*weight[18]+0.02666666666666667*rho[17]*weight[18]-0.05773502691896258*rho[14]*weight[18]-0.051639777949432225*rho[10]*weight[18]+0.029814239699997195*rho[6]*weight[18]+0.02666666666666667*weight[17]*rho[18]-0.05773502691896258*weight[14]*rho[18]-0.051639777949432225*weight[10]*rho[18]+0.029814239699997195*weight[6]*rho[18]+0.1*rho[17]*weight[17]-0.05773502691896258*rho[13]*weight[17]-0.051639777949432225*rho[10]*weight[17]+0.029814239699997195*rho[5]*weight[17]-0.05773502691896258*weight[13]*rho[17]-0.051639777949432225*weight[10]*rho[17]+0.029814239699997195*weight[5]*rho[17]+0.11904761904761905*rho[16]*weight[16]+0.03968253968253969*rho[15]*weight[16]-0.022222222222222223*rho[12]*weight[16]-0.06873217490352689*rho[9]*weight[16]+0.03849001794597506*rho[8]*weight[16]+0.04303314829119353*rho[4]*weight[16]-0.07453559924999299*rho[2]*weight[16]-0.024845199749997663*rho[1]*weight[16]+0.04303314829119353*rho[0]*weight[16]+0.03968253968253969*weight[15]*rho[16]-0.022222222222222223*weight[12]*rho[16]-0.06873217490352689*weight[9]*rho[16]+0.03849001794597506*weight[8]*rho[16]+0.04303314829119353*weight[4]*rho[16]-0.07453559924999299*weight[2]*rho[16]-0.024845199749997663*weight[1]*rho[16]+0.04303314829119353*weight[0]*rho[16]+0.11904761904761905*rho[15]*weight[15]-0.022222222222222223*rho[11]*weight[15]-0.06873217490352689*rho[9]*weight[15]+0.03849001794597506*rho[7]*weight[15]+0.04303314829119353*rho[4]*weight[15]-0.024845199749997663*rho[2]*weight[15]-0.07453559924999299*rho[1]*weight[15]+0.04303314829119353*rho[0]*weight[15]-0.022222222222222223*weight[11]*rho[15]-0.06873217490352689*weight[9]*rho[15]+0.03849001794597506*weight[7]*rho[15]+0.04303314829119353*weight[4]*rho[15]-0.024845199749997663*weight[2]*rho[15]-0.07453559924999299*weight[1]*rho[15]+0.04303314829119353*weight[0]*rho[15]+0.1*rho[14]*weight[14]+0.029814239699997195*rho[10]*weight[14]-0.05163977794943223*rho[6]*weight[14]+0.029814239699997195*weight[10]*rho[14]-0.05163977794943223*weight[6]*rho[14]+0.1*rho[13]*weight[13]+0.029814239699997195*rho[10]*weight[13]-0.05163977794943223*rho[5]*weight[13]+0.029814239699997195*weight[10]*rho[13]-0.05163977794943223*weight[5]*rho[13]+0.16666666666666669*rho[12]*weight[12]+0.044444444444444446*rho[11]*weight[12]-0.09622504486493764*rho[8]*weight[12]-0.08606629658238706*rho[4]*weight[12]+0.049690399499995326*rho[2]*weight[12]+0.044444444444444446*weight[11]*rho[12]-0.09622504486493764*weight[8]*rho[12]-0.08606629658238706*weight[4]*rho[12]+0.049690399499995326*weight[2]*rho[12]+0.16666666666666669*rho[11]*weight[11]-0.09622504486493764*rho[7]*weight[11]-0.08606629658238706*rho[4]*weight[11]+0.049690399499995326*rho[1]*weight[11]-0.09622504486493764*weight[7]*rho[11]-0.08606629658238706*weight[4]*rho[11]+0.049690399499995326*weight[1]*rho[11]+0.1*rho[10]*weight[10]-0.05773502691896258*rho[6]*weight[10]-0.05773502691896258*rho[5]*weight[10]+0.03333333333333333*rho[3]*weight[10]-0.05773502691896258*weight[6]*rho[10]-0.05773502691896258*weight[5]*rho[10]+0.03333333333333333*weight[3]*rho[10]+0.11904761904761905*rho[9]*weight[9]-0.024845199749997667*rho[4]*weight[9]+0.04303314829119352*rho[2]*weight[9]+0.04303314829119352*rho[1]*weight[9]-0.074535599249993*rho[0]*weight[9]-0.024845199749997667*weight[4]*rho[9]+0.04303314829119352*weight[2]*rho[9]+0.04303314829119352*weight[1]*rho[9]-0.074535599249993*weight[0]*rho[9]+0.16666666666666669*rho[8]*weight[8]+0.04969039949999533*rho[4]*weight[8]-0.08606629658238704*rho[2]*weight[8]+0.04969039949999533*weight[4]*rho[8]-0.08606629658238704*weight[2]*rho[8]+0.16666666666666669*rho[7]*weight[7]+0.04969039949999533*rho[4]*weight[7]-0.08606629658238704*rho[1]*weight[7]+0.04969039949999533*weight[4]*rho[7]-0.08606629658238704*weight[1]*rho[7]+0.1*rho[6]*weight[6]+0.03333333333333333*rho[5]*weight[6]-0.05773502691896258*rho[3]*weight[6]+0.03333333333333333*weight[5]*rho[6]-0.05773502691896258*weight[3]*rho[6]+0.1*rho[5]*weight[5]-0.05773502691896258*rho[3]*weight[5]-0.05773502691896258*weight[3]*rho[5]+0.16666666666666669*rho[4]*weight[4]-0.09622504486493762*rho[2]*weight[4]-0.09622504486493762*rho[1]*weight[4]+0.05555555555555556*rho[0]*weight[4]-0.09622504486493762*weight[2]*rho[4]-0.09622504486493762*weight[1]*rho[4]+0.05555555555555556*weight[0]*rho[4]+0.1*rho[3]*weight[3]+0.16666666666666669*rho[2]*weight[2]+0.05555555555555556*rho[1]*weight[2]-0.09622504486493762*rho[0]*weight[2]+0.05555555555555556*weight[1]*rho[2]-0.09622504486493762*weight[0]*rho[2]+0.16666666666666669*rho[1]*weight[1]-0.09622504486493762*rho[0]*weight[1]-0.09622504486493762*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]); #else - bsrc[nodeOff+globalIdxs[0]] += 0.25*rho[3]*weight[3]-0.14433756729740643*rho[2]*weight[3]-0.14433756729740643*rho[1]*weight[3]+0.08333333333333333*rho[0]*weight[3]-0.14433756729740643*weight[2]*rho[3]-0.14433756729740643*weight[1]*rho[3]+0.08333333333333333*weight[0]*rho[3]+0.25*rho[2]*weight[2]+0.08333333333333333*rho[1]*weight[2]-0.14433756729740643*rho[0]*weight[2]+0.08333333333333333*weight[1]*rho[2]-0.14433756729740643*weight[0]*rho[2]+0.25*rho[1]*weight[1]-0.14433756729740643*rho[0]*weight[1]-0.14433756729740643*weight[0]*rho[1]+0.25*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[8]] += 0.11904761904761905*rho[19]*weight[19]-0.06873217490352689*rho[16]*weight[19]-0.06873217490352689*rho[15]*weight[19]+0.03849001794597506*rho[12]*weight[19]+0.03849001794597506*rho[11]*weight[19]+0.03968253968253969*rho[9]*weight[19]-0.022222222222222223*rho[8]*weight[19]-0.022222222222222223*rho[7]*weight[19]-0.074535599249993*rho[4]*weight[19]+0.04303314829119352*rho[2]*weight[19]+0.04303314829119352*rho[1]*weight[19]-0.024845199749997667*rho[0]*weight[19]-0.06873217490352689*weight[16]*rho[19]-0.06873217490352689*weight[15]*rho[19]+0.03849001794597506*weight[12]*rho[19]+0.03849001794597506*weight[11]*rho[19]+0.03968253968253969*weight[9]*rho[19]-0.022222222222222223*weight[8]*rho[19]-0.022222222222222223*weight[7]*rho[19]-0.074535599249993*weight[4]*rho[19]+0.04303314829119352*weight[2]*rho[19]+0.04303314829119352*weight[1]*rho[19]-0.024845199749997667*weight[0]*rho[19]+0.1*rho[18]*weight[18]+0.02666666666666667*rho[17]*weight[18]-0.05773502691896258*rho[14]*weight[18]-0.051639777949432225*rho[10]*weight[18]+0.029814239699997195*rho[6]*weight[18]+0.02666666666666667*weight[17]*rho[18]-0.05773502691896258*weight[14]*rho[18]-0.051639777949432225*weight[10]*rho[18]+0.029814239699997195*weight[6]*rho[18]+0.1*rho[17]*weight[17]-0.05773502691896258*rho[13]*weight[17]-0.051639777949432225*rho[10]*weight[17]+0.029814239699997195*rho[5]*weight[17]-0.05773502691896258*weight[13]*rho[17]-0.051639777949432225*weight[10]*rho[17]+0.029814239699997195*weight[5]*rho[17]+0.11904761904761905*rho[16]*weight[16]+0.03968253968253969*rho[15]*weight[16]-0.022222222222222223*rho[12]*weight[16]-0.06873217490352689*rho[9]*weight[16]+0.03849001794597506*rho[8]*weight[16]+0.04303314829119353*rho[4]*weight[16]-0.07453559924999299*rho[2]*weight[16]-0.024845199749997663*rho[1]*weight[16]+0.04303314829119353*rho[0]*weight[16]+0.03968253968253969*weight[15]*rho[16]-0.022222222222222223*weight[12]*rho[16]-0.06873217490352689*weight[9]*rho[16]+0.03849001794597506*weight[8]*rho[16]+0.04303314829119353*weight[4]*rho[16]-0.07453559924999299*weight[2]*rho[16]-0.024845199749997663*weight[1]*rho[16]+0.04303314829119353*weight[0]*rho[16]+0.11904761904761905*rho[15]*weight[15]-0.022222222222222223*rho[11]*weight[15]-0.06873217490352689*rho[9]*weight[15]+0.03849001794597506*rho[7]*weight[15]+0.04303314829119353*rho[4]*weight[15]-0.024845199749997663*rho[2]*weight[15]-0.07453559924999299*rho[1]*weight[15]+0.04303314829119353*rho[0]*weight[15]-0.022222222222222223*weight[11]*rho[15]-0.06873217490352689*weight[9]*rho[15]+0.03849001794597506*weight[7]*rho[15]+0.04303314829119353*weight[4]*rho[15]-0.024845199749997663*weight[2]*rho[15]-0.07453559924999299*weight[1]*rho[15]+0.04303314829119353*weight[0]*rho[15]+0.1*rho[14]*weight[14]+0.029814239699997195*rho[10]*weight[14]-0.05163977794943223*rho[6]*weight[14]+0.029814239699997195*weight[10]*rho[14]-0.05163977794943223*weight[6]*rho[14]+0.1*rho[13]*weight[13]+0.029814239699997195*rho[10]*weight[13]-0.05163977794943223*rho[5]*weight[13]+0.029814239699997195*weight[10]*rho[13]-0.05163977794943223*weight[5]*rho[13]+0.16666666666666669*rho[12]*weight[12]+0.044444444444444446*rho[11]*weight[12]-0.09622504486493764*rho[8]*weight[12]-0.08606629658238706*rho[4]*weight[12]+0.049690399499995326*rho[2]*weight[12]+0.044444444444444446*weight[11]*rho[12]-0.09622504486493764*weight[8]*rho[12]-0.08606629658238706*weight[4]*rho[12]+0.049690399499995326*weight[2]*rho[12]+0.16666666666666669*rho[11]*weight[11]-0.09622504486493764*rho[7]*weight[11]-0.08606629658238706*rho[4]*weight[11]+0.049690399499995326*rho[1]*weight[11]-0.09622504486493764*weight[7]*rho[11]-0.08606629658238706*weight[4]*rho[11]+0.049690399499995326*weight[1]*rho[11]+0.1*rho[10]*weight[10]-0.05773502691896258*rho[6]*weight[10]-0.05773502691896258*rho[5]*weight[10]+0.03333333333333333*rho[3]*weight[10]-0.05773502691896258*weight[6]*rho[10]-0.05773502691896258*weight[5]*rho[10]+0.03333333333333333*weight[3]*rho[10]+0.11904761904761905*rho[9]*weight[9]-0.024845199749997667*rho[4]*weight[9]+0.04303314829119352*rho[2]*weight[9]+0.04303314829119352*rho[1]*weight[9]-0.074535599249993*rho[0]*weight[9]-0.024845199749997667*weight[4]*rho[9]+0.04303314829119352*weight[2]*rho[9]+0.04303314829119352*weight[1]*rho[9]-0.074535599249993*weight[0]*rho[9]+0.16666666666666669*rho[8]*weight[8]+0.04969039949999533*rho[4]*weight[8]-0.08606629658238704*rho[2]*weight[8]+0.04969039949999533*weight[4]*rho[8]-0.08606629658238704*weight[2]*rho[8]+0.16666666666666669*rho[7]*weight[7]+0.04969039949999533*rho[4]*weight[7]-0.08606629658238704*rho[1]*weight[7]+0.04969039949999533*weight[4]*rho[7]-0.08606629658238704*weight[1]*rho[7]+0.1*rho[6]*weight[6]+0.03333333333333333*rho[5]*weight[6]-0.05773502691896258*rho[3]*weight[6]+0.03333333333333333*weight[5]*rho[6]-0.05773502691896258*weight[3]*rho[6]+0.1*rho[5]*weight[5]-0.05773502691896258*rho[3]*weight[5]-0.05773502691896258*weight[3]*rho[5]+0.16666666666666669*rho[4]*weight[4]-0.09622504486493762*rho[2]*weight[4]-0.09622504486493762*rho[1]*weight[4]+0.05555555555555556*rho[0]*weight[4]-0.09622504486493762*weight[2]*rho[4]-0.09622504486493762*weight[1]*rho[4]+0.05555555555555556*weight[0]*rho[4]+0.1*rho[3]*weight[3]+0.16666666666666669*rho[2]*weight[2]+0.05555555555555556*rho[1]*weight[2]-0.09622504486493762*rho[0]*weight[2]+0.05555555555555556*weight[1]*rho[2]-0.09622504486493762*weight[0]*rho[2]+0.16666666666666669*rho[1]*weight[1]-0.09622504486493762*rho[0]*weight[1]-0.09622504486493762*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]; #endif #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[1]],0.25*rho[3]*weight[3]+0.14433756729740643*rho[2]*weight[3]-0.14433756729740643*rho[1]*weight[3]-0.08333333333333333*rho[0]*weight[3]+0.14433756729740643*weight[2]*rho[3]-0.14433756729740643*weight[1]*rho[3]-0.08333333333333333*weight[0]*rho[3]+0.25*rho[2]*weight[2]-0.08333333333333333*rho[1]*weight[2]-0.14433756729740643*rho[0]*weight[2]-0.08333333333333333*weight[1]*rho[2]-0.14433756729740643*weight[0]*rho[2]+0.25*rho[1]*weight[1]+0.14433756729740643*rho[0]*weight[1]+0.14433756729740643*weight[0]*rho[1]+0.25*rho[0]*weight[0]); + atomicAdd(&bsrc[nodeOff+globalIdxs[9]],0.11904761904761905*rho[19]*weight[19]+0.06873217490352689*rho[16]*weight[19]-0.06873217490352689*rho[15]*weight[19]+0.03849001794597506*rho[12]*weight[19]-0.03849001794597506*rho[11]*weight[19]-0.03968253968253969*rho[9]*weight[19]+0.022222222222222223*rho[8]*weight[19]+0.022222222222222223*rho[7]*weight[19]-0.074535599249993*rho[4]*weight[19]-0.04303314829119352*rho[2]*weight[19]+0.04303314829119352*rho[1]*weight[19]+0.024845199749997667*rho[0]*weight[19]+0.06873217490352689*weight[16]*rho[19]-0.06873217490352689*weight[15]*rho[19]+0.03849001794597506*weight[12]*rho[19]-0.03849001794597506*weight[11]*rho[19]-0.03968253968253969*weight[9]*rho[19]+0.022222222222222223*weight[8]*rho[19]+0.022222222222222223*weight[7]*rho[19]-0.074535599249993*weight[4]*rho[19]-0.04303314829119352*weight[2]*rho[19]+0.04303314829119352*weight[1]*rho[19]+0.024845199749997667*weight[0]*rho[19]+0.1*rho[18]*weight[18]-0.02666666666666667*rho[17]*weight[18]+0.05773502691896258*rho[14]*weight[18]-0.051639777949432225*rho[10]*weight[18]-0.029814239699997195*rho[6]*weight[18]-0.02666666666666667*weight[17]*rho[18]+0.05773502691896258*weight[14]*rho[18]-0.051639777949432225*weight[10]*rho[18]-0.029814239699997195*weight[6]*rho[18]+0.1*rho[17]*weight[17]-0.05773502691896258*rho[13]*weight[17]+0.051639777949432225*rho[10]*weight[17]-0.029814239699997195*rho[5]*weight[17]-0.05773502691896258*weight[13]*rho[17]+0.051639777949432225*weight[10]*rho[17]-0.029814239699997195*weight[5]*rho[17]+0.11904761904761905*rho[16]*weight[16]-0.03968253968253969*rho[15]*weight[16]+0.022222222222222223*rho[12]*weight[16]-0.06873217490352689*rho[9]*weight[16]+0.03849001794597506*rho[8]*weight[16]-0.04303314829119353*rho[4]*weight[16]-0.07453559924999299*rho[2]*weight[16]+0.024845199749997663*rho[1]*weight[16]+0.04303314829119353*rho[0]*weight[16]-0.03968253968253969*weight[15]*rho[16]+0.022222222222222223*weight[12]*rho[16]-0.06873217490352689*weight[9]*rho[16]+0.03849001794597506*weight[8]*rho[16]-0.04303314829119353*weight[4]*rho[16]-0.07453559924999299*weight[2]*rho[16]+0.024845199749997663*weight[1]*rho[16]+0.04303314829119353*weight[0]*rho[16]+0.11904761904761905*rho[15]*weight[15]+0.022222222222222223*rho[11]*weight[15]+0.06873217490352689*rho[9]*weight[15]-0.03849001794597506*rho[7]*weight[15]+0.04303314829119353*rho[4]*weight[15]+0.024845199749997663*rho[2]*weight[15]-0.07453559924999299*rho[1]*weight[15]-0.04303314829119353*rho[0]*weight[15]+0.022222222222222223*weight[11]*rho[15]+0.06873217490352689*weight[9]*rho[15]-0.03849001794597506*weight[7]*rho[15]+0.04303314829119353*weight[4]*rho[15]+0.024845199749997663*weight[2]*rho[15]-0.07453559924999299*weight[1]*rho[15]-0.04303314829119353*weight[0]*rho[15]+0.1*rho[14]*weight[14]-0.029814239699997195*rho[10]*weight[14]-0.05163977794943223*rho[6]*weight[14]-0.029814239699997195*weight[10]*rho[14]-0.05163977794943223*weight[6]*rho[14]+0.1*rho[13]*weight[13]-0.029814239699997195*rho[10]*weight[13]+0.05163977794943223*rho[5]*weight[13]-0.029814239699997195*weight[10]*rho[13]+0.05163977794943223*weight[5]*rho[13]+0.16666666666666669*rho[12]*weight[12]-0.044444444444444446*rho[11]*weight[12]+0.09622504486493764*rho[8]*weight[12]-0.08606629658238706*rho[4]*weight[12]-0.049690399499995326*rho[2]*weight[12]-0.044444444444444446*weight[11]*rho[12]+0.09622504486493764*weight[8]*rho[12]-0.08606629658238706*weight[4]*rho[12]-0.049690399499995326*weight[2]*rho[12]+0.16666666666666669*rho[11]*weight[11]-0.09622504486493764*rho[7]*weight[11]+0.08606629658238706*rho[4]*weight[11]-0.049690399499995326*rho[1]*weight[11]-0.09622504486493764*weight[7]*rho[11]+0.08606629658238706*weight[4]*rho[11]-0.049690399499995326*weight[1]*rho[11]+0.1*rho[10]*weight[10]+0.05773502691896258*rho[6]*weight[10]-0.05773502691896258*rho[5]*weight[10]-0.03333333333333333*rho[3]*weight[10]+0.05773502691896258*weight[6]*rho[10]-0.05773502691896258*weight[5]*rho[10]-0.03333333333333333*weight[3]*rho[10]+0.11904761904761905*rho[9]*weight[9]+0.024845199749997667*rho[4]*weight[9]+0.04303314829119352*rho[2]*weight[9]-0.04303314829119352*rho[1]*weight[9]-0.074535599249993*rho[0]*weight[9]+0.024845199749997667*weight[4]*rho[9]+0.04303314829119352*weight[2]*rho[9]-0.04303314829119352*weight[1]*rho[9]-0.074535599249993*weight[0]*rho[9]+0.16666666666666669*rho[8]*weight[8]-0.04969039949999533*rho[4]*weight[8]-0.08606629658238704*rho[2]*weight[8]-0.04969039949999533*weight[4]*rho[8]-0.08606629658238704*weight[2]*rho[8]+0.16666666666666669*rho[7]*weight[7]-0.04969039949999533*rho[4]*weight[7]+0.08606629658238704*rho[1]*weight[7]-0.04969039949999533*weight[4]*rho[7]+0.08606629658238704*weight[1]*rho[7]+0.1*rho[6]*weight[6]-0.03333333333333333*rho[5]*weight[6]-0.05773502691896258*rho[3]*weight[6]-0.03333333333333333*weight[5]*rho[6]-0.05773502691896258*weight[3]*rho[6]+0.1*rho[5]*weight[5]+0.05773502691896258*rho[3]*weight[5]+0.05773502691896258*weight[3]*rho[5]+0.16666666666666669*rho[4]*weight[4]+0.09622504486493762*rho[2]*weight[4]-0.09622504486493762*rho[1]*weight[4]-0.05555555555555556*rho[0]*weight[4]+0.09622504486493762*weight[2]*rho[4]-0.09622504486493762*weight[1]*rho[4]-0.05555555555555556*weight[0]*rho[4]+0.1*rho[3]*weight[3]+0.16666666666666669*rho[2]*weight[2]-0.05555555555555556*rho[1]*weight[2]-0.09622504486493762*rho[0]*weight[2]-0.05555555555555556*weight[1]*rho[2]-0.09622504486493762*weight[0]*rho[2]+0.16666666666666669*rho[1]*weight[1]+0.09622504486493762*rho[0]*weight[1]+0.09622504486493762*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]); #else - bsrc[nodeOff+globalIdxs[1]] += 0.25*rho[3]*weight[3]+0.14433756729740643*rho[2]*weight[3]-0.14433756729740643*rho[1]*weight[3]-0.08333333333333333*rho[0]*weight[3]+0.14433756729740643*weight[2]*rho[3]-0.14433756729740643*weight[1]*rho[3]-0.08333333333333333*weight[0]*rho[3]+0.25*rho[2]*weight[2]-0.08333333333333333*rho[1]*weight[2]-0.14433756729740643*rho[0]*weight[2]-0.08333333333333333*weight[1]*rho[2]-0.14433756729740643*weight[0]*rho[2]+0.25*rho[1]*weight[1]+0.14433756729740643*rho[0]*weight[1]+0.14433756729740643*weight[0]*rho[1]+0.25*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[9]] += 0.11904761904761905*rho[19]*weight[19]+0.06873217490352689*rho[16]*weight[19]-0.06873217490352689*rho[15]*weight[19]+0.03849001794597506*rho[12]*weight[19]-0.03849001794597506*rho[11]*weight[19]-0.03968253968253969*rho[9]*weight[19]+0.022222222222222223*rho[8]*weight[19]+0.022222222222222223*rho[7]*weight[19]-0.074535599249993*rho[4]*weight[19]-0.04303314829119352*rho[2]*weight[19]+0.04303314829119352*rho[1]*weight[19]+0.024845199749997667*rho[0]*weight[19]+0.06873217490352689*weight[16]*rho[19]-0.06873217490352689*weight[15]*rho[19]+0.03849001794597506*weight[12]*rho[19]-0.03849001794597506*weight[11]*rho[19]-0.03968253968253969*weight[9]*rho[19]+0.022222222222222223*weight[8]*rho[19]+0.022222222222222223*weight[7]*rho[19]-0.074535599249993*weight[4]*rho[19]-0.04303314829119352*weight[2]*rho[19]+0.04303314829119352*weight[1]*rho[19]+0.024845199749997667*weight[0]*rho[19]+0.1*rho[18]*weight[18]-0.02666666666666667*rho[17]*weight[18]+0.05773502691896258*rho[14]*weight[18]-0.051639777949432225*rho[10]*weight[18]-0.029814239699997195*rho[6]*weight[18]-0.02666666666666667*weight[17]*rho[18]+0.05773502691896258*weight[14]*rho[18]-0.051639777949432225*weight[10]*rho[18]-0.029814239699997195*weight[6]*rho[18]+0.1*rho[17]*weight[17]-0.05773502691896258*rho[13]*weight[17]+0.051639777949432225*rho[10]*weight[17]-0.029814239699997195*rho[5]*weight[17]-0.05773502691896258*weight[13]*rho[17]+0.051639777949432225*weight[10]*rho[17]-0.029814239699997195*weight[5]*rho[17]+0.11904761904761905*rho[16]*weight[16]-0.03968253968253969*rho[15]*weight[16]+0.022222222222222223*rho[12]*weight[16]-0.06873217490352689*rho[9]*weight[16]+0.03849001794597506*rho[8]*weight[16]-0.04303314829119353*rho[4]*weight[16]-0.07453559924999299*rho[2]*weight[16]+0.024845199749997663*rho[1]*weight[16]+0.04303314829119353*rho[0]*weight[16]-0.03968253968253969*weight[15]*rho[16]+0.022222222222222223*weight[12]*rho[16]-0.06873217490352689*weight[9]*rho[16]+0.03849001794597506*weight[8]*rho[16]-0.04303314829119353*weight[4]*rho[16]-0.07453559924999299*weight[2]*rho[16]+0.024845199749997663*weight[1]*rho[16]+0.04303314829119353*weight[0]*rho[16]+0.11904761904761905*rho[15]*weight[15]+0.022222222222222223*rho[11]*weight[15]+0.06873217490352689*rho[9]*weight[15]-0.03849001794597506*rho[7]*weight[15]+0.04303314829119353*rho[4]*weight[15]+0.024845199749997663*rho[2]*weight[15]-0.07453559924999299*rho[1]*weight[15]-0.04303314829119353*rho[0]*weight[15]+0.022222222222222223*weight[11]*rho[15]+0.06873217490352689*weight[9]*rho[15]-0.03849001794597506*weight[7]*rho[15]+0.04303314829119353*weight[4]*rho[15]+0.024845199749997663*weight[2]*rho[15]-0.07453559924999299*weight[1]*rho[15]-0.04303314829119353*weight[0]*rho[15]+0.1*rho[14]*weight[14]-0.029814239699997195*rho[10]*weight[14]-0.05163977794943223*rho[6]*weight[14]-0.029814239699997195*weight[10]*rho[14]-0.05163977794943223*weight[6]*rho[14]+0.1*rho[13]*weight[13]-0.029814239699997195*rho[10]*weight[13]+0.05163977794943223*rho[5]*weight[13]-0.029814239699997195*weight[10]*rho[13]+0.05163977794943223*weight[5]*rho[13]+0.16666666666666669*rho[12]*weight[12]-0.044444444444444446*rho[11]*weight[12]+0.09622504486493764*rho[8]*weight[12]-0.08606629658238706*rho[4]*weight[12]-0.049690399499995326*rho[2]*weight[12]-0.044444444444444446*weight[11]*rho[12]+0.09622504486493764*weight[8]*rho[12]-0.08606629658238706*weight[4]*rho[12]-0.049690399499995326*weight[2]*rho[12]+0.16666666666666669*rho[11]*weight[11]-0.09622504486493764*rho[7]*weight[11]+0.08606629658238706*rho[4]*weight[11]-0.049690399499995326*rho[1]*weight[11]-0.09622504486493764*weight[7]*rho[11]+0.08606629658238706*weight[4]*rho[11]-0.049690399499995326*weight[1]*rho[11]+0.1*rho[10]*weight[10]+0.05773502691896258*rho[6]*weight[10]-0.05773502691896258*rho[5]*weight[10]-0.03333333333333333*rho[3]*weight[10]+0.05773502691896258*weight[6]*rho[10]-0.05773502691896258*weight[5]*rho[10]-0.03333333333333333*weight[3]*rho[10]+0.11904761904761905*rho[9]*weight[9]+0.024845199749997667*rho[4]*weight[9]+0.04303314829119352*rho[2]*weight[9]-0.04303314829119352*rho[1]*weight[9]-0.074535599249993*rho[0]*weight[9]+0.024845199749997667*weight[4]*rho[9]+0.04303314829119352*weight[2]*rho[9]-0.04303314829119352*weight[1]*rho[9]-0.074535599249993*weight[0]*rho[9]+0.16666666666666669*rho[8]*weight[8]-0.04969039949999533*rho[4]*weight[8]-0.08606629658238704*rho[2]*weight[8]-0.04969039949999533*weight[4]*rho[8]-0.08606629658238704*weight[2]*rho[8]+0.16666666666666669*rho[7]*weight[7]-0.04969039949999533*rho[4]*weight[7]+0.08606629658238704*rho[1]*weight[7]-0.04969039949999533*weight[4]*rho[7]+0.08606629658238704*weight[1]*rho[7]+0.1*rho[6]*weight[6]-0.03333333333333333*rho[5]*weight[6]-0.05773502691896258*rho[3]*weight[6]-0.03333333333333333*weight[5]*rho[6]-0.05773502691896258*weight[3]*rho[6]+0.1*rho[5]*weight[5]+0.05773502691896258*rho[3]*weight[5]+0.05773502691896258*weight[3]*rho[5]+0.16666666666666669*rho[4]*weight[4]+0.09622504486493762*rho[2]*weight[4]-0.09622504486493762*rho[1]*weight[4]-0.05555555555555556*rho[0]*weight[4]+0.09622504486493762*weight[2]*rho[4]-0.09622504486493762*weight[1]*rho[4]-0.05555555555555556*weight[0]*rho[4]+0.1*rho[3]*weight[3]+0.16666666666666669*rho[2]*weight[2]-0.05555555555555556*rho[1]*weight[2]-0.09622504486493762*rho[0]*weight[2]-0.05555555555555556*weight[1]*rho[2]-0.09622504486493762*weight[0]*rho[2]+0.16666666666666669*rho[1]*weight[1]+0.09622504486493762*rho[0]*weight[1]+0.09622504486493762*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]; #endif #ifdef __CUDA_ARCH__ - atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[2]],__double_as_longlong(-(1.5*phiBC[3])+0.8660254037844386*phiBC[2]-0.8660254037844386*phiBC[1]+0.5*phiBC[0])); + atomicAdd(&bsrc[nodeOff+globalIdxs[10]],0.11904761904761905*rho[19]*weight[19]-0.06873217490352689*rho[16]*weight[19]+0.06873217490352689*rho[15]*weight[19]-0.03849001794597506*rho[12]*weight[19]+0.03849001794597506*rho[11]*weight[19]-0.03968253968253969*rho[9]*weight[19]+0.022222222222222223*rho[8]*weight[19]+0.022222222222222223*rho[7]*weight[19]-0.074535599249993*rho[4]*weight[19]+0.04303314829119352*rho[2]*weight[19]-0.04303314829119352*rho[1]*weight[19]+0.024845199749997667*rho[0]*weight[19]-0.06873217490352689*weight[16]*rho[19]+0.06873217490352689*weight[15]*rho[19]-0.03849001794597506*weight[12]*rho[19]+0.03849001794597506*weight[11]*rho[19]-0.03968253968253969*weight[9]*rho[19]+0.022222222222222223*weight[8]*rho[19]+0.022222222222222223*weight[7]*rho[19]-0.074535599249993*weight[4]*rho[19]+0.04303314829119352*weight[2]*rho[19]-0.04303314829119352*weight[1]*rho[19]+0.024845199749997667*weight[0]*rho[19]+0.1*rho[18]*weight[18]-0.02666666666666667*rho[17]*weight[18]-0.05773502691896258*rho[14]*weight[18]+0.051639777949432225*rho[10]*weight[18]-0.029814239699997195*rho[6]*weight[18]-0.02666666666666667*weight[17]*rho[18]-0.05773502691896258*weight[14]*rho[18]+0.051639777949432225*weight[10]*rho[18]-0.029814239699997195*weight[6]*rho[18]+0.1*rho[17]*weight[17]+0.05773502691896258*rho[13]*weight[17]-0.051639777949432225*rho[10]*weight[17]-0.029814239699997195*rho[5]*weight[17]+0.05773502691896258*weight[13]*rho[17]-0.051639777949432225*weight[10]*rho[17]-0.029814239699997195*weight[5]*rho[17]+0.11904761904761905*rho[16]*weight[16]-0.03968253968253969*rho[15]*weight[16]+0.022222222222222223*rho[12]*weight[16]+0.06873217490352689*rho[9]*weight[16]-0.03849001794597506*rho[8]*weight[16]+0.04303314829119353*rho[4]*weight[16]-0.07453559924999299*rho[2]*weight[16]+0.024845199749997663*rho[1]*weight[16]-0.04303314829119353*rho[0]*weight[16]-0.03968253968253969*weight[15]*rho[16]+0.022222222222222223*weight[12]*rho[16]+0.06873217490352689*weight[9]*rho[16]-0.03849001794597506*weight[8]*rho[16]+0.04303314829119353*weight[4]*rho[16]-0.07453559924999299*weight[2]*rho[16]+0.024845199749997663*weight[1]*rho[16]-0.04303314829119353*weight[0]*rho[16]+0.11904761904761905*rho[15]*weight[15]+0.022222222222222223*rho[11]*weight[15]-0.06873217490352689*rho[9]*weight[15]+0.03849001794597506*rho[7]*weight[15]-0.04303314829119353*rho[4]*weight[15]+0.024845199749997663*rho[2]*weight[15]-0.07453559924999299*rho[1]*weight[15]+0.04303314829119353*rho[0]*weight[15]+0.022222222222222223*weight[11]*rho[15]-0.06873217490352689*weight[9]*rho[15]+0.03849001794597506*weight[7]*rho[15]-0.04303314829119353*weight[4]*rho[15]+0.024845199749997663*weight[2]*rho[15]-0.07453559924999299*weight[1]*rho[15]+0.04303314829119353*weight[0]*rho[15]+0.1*rho[14]*weight[14]-0.029814239699997195*rho[10]*weight[14]+0.05163977794943223*rho[6]*weight[14]-0.029814239699997195*weight[10]*rho[14]+0.05163977794943223*weight[6]*rho[14]+0.1*rho[13]*weight[13]-0.029814239699997195*rho[10]*weight[13]-0.05163977794943223*rho[5]*weight[13]-0.029814239699997195*weight[10]*rho[13]-0.05163977794943223*weight[5]*rho[13]+0.16666666666666669*rho[12]*weight[12]-0.044444444444444446*rho[11]*weight[12]-0.09622504486493764*rho[8]*weight[12]+0.08606629658238706*rho[4]*weight[12]-0.049690399499995326*rho[2]*weight[12]-0.044444444444444446*weight[11]*rho[12]-0.09622504486493764*weight[8]*rho[12]+0.08606629658238706*weight[4]*rho[12]-0.049690399499995326*weight[2]*rho[12]+0.16666666666666669*rho[11]*weight[11]+0.09622504486493764*rho[7]*weight[11]-0.08606629658238706*rho[4]*weight[11]-0.049690399499995326*rho[1]*weight[11]+0.09622504486493764*weight[7]*rho[11]-0.08606629658238706*weight[4]*rho[11]-0.049690399499995326*weight[1]*rho[11]+0.1*rho[10]*weight[10]-0.05773502691896258*rho[6]*weight[10]+0.05773502691896258*rho[5]*weight[10]-0.03333333333333333*rho[3]*weight[10]-0.05773502691896258*weight[6]*rho[10]+0.05773502691896258*weight[5]*rho[10]-0.03333333333333333*weight[3]*rho[10]+0.11904761904761905*rho[9]*weight[9]+0.024845199749997667*rho[4]*weight[9]-0.04303314829119352*rho[2]*weight[9]+0.04303314829119352*rho[1]*weight[9]-0.074535599249993*rho[0]*weight[9]+0.024845199749997667*weight[4]*rho[9]-0.04303314829119352*weight[2]*rho[9]+0.04303314829119352*weight[1]*rho[9]-0.074535599249993*weight[0]*rho[9]+0.16666666666666669*rho[8]*weight[8]-0.04969039949999533*rho[4]*weight[8]+0.08606629658238704*rho[2]*weight[8]-0.04969039949999533*weight[4]*rho[8]+0.08606629658238704*weight[2]*rho[8]+0.16666666666666669*rho[7]*weight[7]-0.04969039949999533*rho[4]*weight[7]-0.08606629658238704*rho[1]*weight[7]-0.04969039949999533*weight[4]*rho[7]-0.08606629658238704*weight[1]*rho[7]+0.1*rho[6]*weight[6]-0.03333333333333333*rho[5]*weight[6]+0.05773502691896258*rho[3]*weight[6]-0.03333333333333333*weight[5]*rho[6]+0.05773502691896258*weight[3]*rho[6]+0.1*rho[5]*weight[5]-0.05773502691896258*rho[3]*weight[5]-0.05773502691896258*weight[3]*rho[5]+0.16666666666666669*rho[4]*weight[4]-0.09622504486493762*rho[2]*weight[4]+0.09622504486493762*rho[1]*weight[4]-0.05555555555555556*rho[0]*weight[4]-0.09622504486493762*weight[2]*rho[4]+0.09622504486493762*weight[1]*rho[4]-0.05555555555555556*weight[0]*rho[4]+0.1*rho[3]*weight[3]+0.16666666666666669*rho[2]*weight[2]-0.05555555555555556*rho[1]*weight[2]+0.09622504486493762*rho[0]*weight[2]-0.05555555555555556*weight[1]*rho[2]+0.09622504486493762*weight[0]*rho[2]+0.16666666666666669*rho[1]*weight[1]-0.09622504486493762*rho[0]*weight[1]-0.09622504486493762*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]); #else - bsrc[nodeOff+globalIdxs[2]] = -(1.5*phiBC[3])+0.8660254037844386*phiBC[2]-0.8660254037844386*phiBC[1]+0.5*phiBC[0]; + bsrc[nodeOff+globalIdxs[10]] += 0.11904761904761905*rho[19]*weight[19]-0.06873217490352689*rho[16]*weight[19]+0.06873217490352689*rho[15]*weight[19]-0.03849001794597506*rho[12]*weight[19]+0.03849001794597506*rho[11]*weight[19]-0.03968253968253969*rho[9]*weight[19]+0.022222222222222223*rho[8]*weight[19]+0.022222222222222223*rho[7]*weight[19]-0.074535599249993*rho[4]*weight[19]+0.04303314829119352*rho[2]*weight[19]-0.04303314829119352*rho[1]*weight[19]+0.024845199749997667*rho[0]*weight[19]-0.06873217490352689*weight[16]*rho[19]+0.06873217490352689*weight[15]*rho[19]-0.03849001794597506*weight[12]*rho[19]+0.03849001794597506*weight[11]*rho[19]-0.03968253968253969*weight[9]*rho[19]+0.022222222222222223*weight[8]*rho[19]+0.022222222222222223*weight[7]*rho[19]-0.074535599249993*weight[4]*rho[19]+0.04303314829119352*weight[2]*rho[19]-0.04303314829119352*weight[1]*rho[19]+0.024845199749997667*weight[0]*rho[19]+0.1*rho[18]*weight[18]-0.02666666666666667*rho[17]*weight[18]-0.05773502691896258*rho[14]*weight[18]+0.051639777949432225*rho[10]*weight[18]-0.029814239699997195*rho[6]*weight[18]-0.02666666666666667*weight[17]*rho[18]-0.05773502691896258*weight[14]*rho[18]+0.051639777949432225*weight[10]*rho[18]-0.029814239699997195*weight[6]*rho[18]+0.1*rho[17]*weight[17]+0.05773502691896258*rho[13]*weight[17]-0.051639777949432225*rho[10]*weight[17]-0.029814239699997195*rho[5]*weight[17]+0.05773502691896258*weight[13]*rho[17]-0.051639777949432225*weight[10]*rho[17]-0.029814239699997195*weight[5]*rho[17]+0.11904761904761905*rho[16]*weight[16]-0.03968253968253969*rho[15]*weight[16]+0.022222222222222223*rho[12]*weight[16]+0.06873217490352689*rho[9]*weight[16]-0.03849001794597506*rho[8]*weight[16]+0.04303314829119353*rho[4]*weight[16]-0.07453559924999299*rho[2]*weight[16]+0.024845199749997663*rho[1]*weight[16]-0.04303314829119353*rho[0]*weight[16]-0.03968253968253969*weight[15]*rho[16]+0.022222222222222223*weight[12]*rho[16]+0.06873217490352689*weight[9]*rho[16]-0.03849001794597506*weight[8]*rho[16]+0.04303314829119353*weight[4]*rho[16]-0.07453559924999299*weight[2]*rho[16]+0.024845199749997663*weight[1]*rho[16]-0.04303314829119353*weight[0]*rho[16]+0.11904761904761905*rho[15]*weight[15]+0.022222222222222223*rho[11]*weight[15]-0.06873217490352689*rho[9]*weight[15]+0.03849001794597506*rho[7]*weight[15]-0.04303314829119353*rho[4]*weight[15]+0.024845199749997663*rho[2]*weight[15]-0.07453559924999299*rho[1]*weight[15]+0.04303314829119353*rho[0]*weight[15]+0.022222222222222223*weight[11]*rho[15]-0.06873217490352689*weight[9]*rho[15]+0.03849001794597506*weight[7]*rho[15]-0.04303314829119353*weight[4]*rho[15]+0.024845199749997663*weight[2]*rho[15]-0.07453559924999299*weight[1]*rho[15]+0.04303314829119353*weight[0]*rho[15]+0.1*rho[14]*weight[14]-0.029814239699997195*rho[10]*weight[14]+0.05163977794943223*rho[6]*weight[14]-0.029814239699997195*weight[10]*rho[14]+0.05163977794943223*weight[6]*rho[14]+0.1*rho[13]*weight[13]-0.029814239699997195*rho[10]*weight[13]-0.05163977794943223*rho[5]*weight[13]-0.029814239699997195*weight[10]*rho[13]-0.05163977794943223*weight[5]*rho[13]+0.16666666666666669*rho[12]*weight[12]-0.044444444444444446*rho[11]*weight[12]-0.09622504486493764*rho[8]*weight[12]+0.08606629658238706*rho[4]*weight[12]-0.049690399499995326*rho[2]*weight[12]-0.044444444444444446*weight[11]*rho[12]-0.09622504486493764*weight[8]*rho[12]+0.08606629658238706*weight[4]*rho[12]-0.049690399499995326*weight[2]*rho[12]+0.16666666666666669*rho[11]*weight[11]+0.09622504486493764*rho[7]*weight[11]-0.08606629658238706*rho[4]*weight[11]-0.049690399499995326*rho[1]*weight[11]+0.09622504486493764*weight[7]*rho[11]-0.08606629658238706*weight[4]*rho[11]-0.049690399499995326*weight[1]*rho[11]+0.1*rho[10]*weight[10]-0.05773502691896258*rho[6]*weight[10]+0.05773502691896258*rho[5]*weight[10]-0.03333333333333333*rho[3]*weight[10]-0.05773502691896258*weight[6]*rho[10]+0.05773502691896258*weight[5]*rho[10]-0.03333333333333333*weight[3]*rho[10]+0.11904761904761905*rho[9]*weight[9]+0.024845199749997667*rho[4]*weight[9]-0.04303314829119352*rho[2]*weight[9]+0.04303314829119352*rho[1]*weight[9]-0.074535599249993*rho[0]*weight[9]+0.024845199749997667*weight[4]*rho[9]-0.04303314829119352*weight[2]*rho[9]+0.04303314829119352*weight[1]*rho[9]-0.074535599249993*weight[0]*rho[9]+0.16666666666666669*rho[8]*weight[8]-0.04969039949999533*rho[4]*weight[8]+0.08606629658238704*rho[2]*weight[8]-0.04969039949999533*weight[4]*rho[8]+0.08606629658238704*weight[2]*rho[8]+0.16666666666666669*rho[7]*weight[7]-0.04969039949999533*rho[4]*weight[7]-0.08606629658238704*rho[1]*weight[7]-0.04969039949999533*weight[4]*rho[7]-0.08606629658238704*weight[1]*rho[7]+0.1*rho[6]*weight[6]-0.03333333333333333*rho[5]*weight[6]+0.05773502691896258*rho[3]*weight[6]-0.03333333333333333*weight[5]*rho[6]+0.05773502691896258*weight[3]*rho[6]+0.1*rho[5]*weight[5]-0.05773502691896258*rho[3]*weight[5]-0.05773502691896258*weight[3]*rho[5]+0.16666666666666669*rho[4]*weight[4]-0.09622504486493762*rho[2]*weight[4]+0.09622504486493762*rho[1]*weight[4]-0.05555555555555556*rho[0]*weight[4]-0.09622504486493762*weight[2]*rho[4]+0.09622504486493762*weight[1]*rho[4]-0.05555555555555556*weight[0]*rho[4]+0.1*rho[3]*weight[3]+0.16666666666666669*rho[2]*weight[2]-0.05555555555555556*rho[1]*weight[2]+0.09622504486493762*rho[0]*weight[2]-0.05555555555555556*weight[1]*rho[2]+0.09622504486493762*weight[0]*rho[2]+0.16666666666666669*rho[1]*weight[1]-0.09622504486493762*rho[0]*weight[1]-0.09622504486493762*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]; #endif #ifdef __CUDA_ARCH__ - atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[3]],__double_as_longlong(1.5*phiBC[3]+0.8660254037844386*phiBC[2]+0.8660254037844386*phiBC[1]+0.5*phiBC[0])); + atomicAdd(&bsrc[nodeOff+globalIdxs[11]],0.11904761904761905*rho[19]*weight[19]+0.06873217490352689*rho[16]*weight[19]+0.06873217490352689*rho[15]*weight[19]-0.03849001794597506*rho[12]*weight[19]-0.03849001794597506*rho[11]*weight[19]+0.03968253968253969*rho[9]*weight[19]-0.022222222222222223*rho[8]*weight[19]-0.022222222222222223*rho[7]*weight[19]-0.074535599249993*rho[4]*weight[19]-0.04303314829119352*rho[2]*weight[19]-0.04303314829119352*rho[1]*weight[19]-0.024845199749997667*rho[0]*weight[19]+0.06873217490352689*weight[16]*rho[19]+0.06873217490352689*weight[15]*rho[19]-0.03849001794597506*weight[12]*rho[19]-0.03849001794597506*weight[11]*rho[19]+0.03968253968253969*weight[9]*rho[19]-0.022222222222222223*weight[8]*rho[19]-0.022222222222222223*weight[7]*rho[19]-0.074535599249993*weight[4]*rho[19]-0.04303314829119352*weight[2]*rho[19]-0.04303314829119352*weight[1]*rho[19]-0.024845199749997667*weight[0]*rho[19]+0.1*rho[18]*weight[18]+0.02666666666666667*rho[17]*weight[18]+0.05773502691896258*rho[14]*weight[18]+0.051639777949432225*rho[10]*weight[18]+0.029814239699997195*rho[6]*weight[18]+0.02666666666666667*weight[17]*rho[18]+0.05773502691896258*weight[14]*rho[18]+0.051639777949432225*weight[10]*rho[18]+0.029814239699997195*weight[6]*rho[18]+0.1*rho[17]*weight[17]+0.05773502691896258*rho[13]*weight[17]+0.051639777949432225*rho[10]*weight[17]+0.029814239699997195*rho[5]*weight[17]+0.05773502691896258*weight[13]*rho[17]+0.051639777949432225*weight[10]*rho[17]+0.029814239699997195*weight[5]*rho[17]+0.11904761904761905*rho[16]*weight[16]+0.03968253968253969*rho[15]*weight[16]-0.022222222222222223*rho[12]*weight[16]+0.06873217490352689*rho[9]*weight[16]-0.03849001794597506*rho[8]*weight[16]-0.04303314829119353*rho[4]*weight[16]-0.07453559924999299*rho[2]*weight[16]-0.024845199749997663*rho[1]*weight[16]-0.04303314829119353*rho[0]*weight[16]+0.03968253968253969*weight[15]*rho[16]-0.022222222222222223*weight[12]*rho[16]+0.06873217490352689*weight[9]*rho[16]-0.03849001794597506*weight[8]*rho[16]-0.04303314829119353*weight[4]*rho[16]-0.07453559924999299*weight[2]*rho[16]-0.024845199749997663*weight[1]*rho[16]-0.04303314829119353*weight[0]*rho[16]+0.11904761904761905*rho[15]*weight[15]-0.022222222222222223*rho[11]*weight[15]+0.06873217490352689*rho[9]*weight[15]-0.03849001794597506*rho[7]*weight[15]-0.04303314829119353*rho[4]*weight[15]-0.024845199749997663*rho[2]*weight[15]-0.07453559924999299*rho[1]*weight[15]-0.04303314829119353*rho[0]*weight[15]-0.022222222222222223*weight[11]*rho[15]+0.06873217490352689*weight[9]*rho[15]-0.03849001794597506*weight[7]*rho[15]-0.04303314829119353*weight[4]*rho[15]-0.024845199749997663*weight[2]*rho[15]-0.07453559924999299*weight[1]*rho[15]-0.04303314829119353*weight[0]*rho[15]+0.1*rho[14]*weight[14]+0.029814239699997195*rho[10]*weight[14]+0.05163977794943223*rho[6]*weight[14]+0.029814239699997195*weight[10]*rho[14]+0.05163977794943223*weight[6]*rho[14]+0.1*rho[13]*weight[13]+0.029814239699997195*rho[10]*weight[13]+0.05163977794943223*rho[5]*weight[13]+0.029814239699997195*weight[10]*rho[13]+0.05163977794943223*weight[5]*rho[13]+0.16666666666666669*rho[12]*weight[12]+0.044444444444444446*rho[11]*weight[12]+0.09622504486493764*rho[8]*weight[12]+0.08606629658238706*rho[4]*weight[12]+0.049690399499995326*rho[2]*weight[12]+0.044444444444444446*weight[11]*rho[12]+0.09622504486493764*weight[8]*rho[12]+0.08606629658238706*weight[4]*rho[12]+0.049690399499995326*weight[2]*rho[12]+0.16666666666666669*rho[11]*weight[11]+0.09622504486493764*rho[7]*weight[11]+0.08606629658238706*rho[4]*weight[11]+0.049690399499995326*rho[1]*weight[11]+0.09622504486493764*weight[7]*rho[11]+0.08606629658238706*weight[4]*rho[11]+0.049690399499995326*weight[1]*rho[11]+0.1*rho[10]*weight[10]+0.05773502691896258*rho[6]*weight[10]+0.05773502691896258*rho[5]*weight[10]+0.03333333333333333*rho[3]*weight[10]+0.05773502691896258*weight[6]*rho[10]+0.05773502691896258*weight[5]*rho[10]+0.03333333333333333*weight[3]*rho[10]+0.11904761904761905*rho[9]*weight[9]-0.024845199749997667*rho[4]*weight[9]-0.04303314829119352*rho[2]*weight[9]-0.04303314829119352*rho[1]*weight[9]-0.074535599249993*rho[0]*weight[9]-0.024845199749997667*weight[4]*rho[9]-0.04303314829119352*weight[2]*rho[9]-0.04303314829119352*weight[1]*rho[9]-0.074535599249993*weight[0]*rho[9]+0.16666666666666669*rho[8]*weight[8]+0.04969039949999533*rho[4]*weight[8]+0.08606629658238704*rho[2]*weight[8]+0.04969039949999533*weight[4]*rho[8]+0.08606629658238704*weight[2]*rho[8]+0.16666666666666669*rho[7]*weight[7]+0.04969039949999533*rho[4]*weight[7]+0.08606629658238704*rho[1]*weight[7]+0.04969039949999533*weight[4]*rho[7]+0.08606629658238704*weight[1]*rho[7]+0.1*rho[6]*weight[6]+0.03333333333333333*rho[5]*weight[6]+0.05773502691896258*rho[3]*weight[6]+0.03333333333333333*weight[5]*rho[6]+0.05773502691896258*weight[3]*rho[6]+0.1*rho[5]*weight[5]+0.05773502691896258*rho[3]*weight[5]+0.05773502691896258*weight[3]*rho[5]+0.16666666666666669*rho[4]*weight[4]+0.09622504486493762*rho[2]*weight[4]+0.09622504486493762*rho[1]*weight[4]+0.05555555555555556*rho[0]*weight[4]+0.09622504486493762*weight[2]*rho[4]+0.09622504486493762*weight[1]*rho[4]+0.05555555555555556*weight[0]*rho[4]+0.1*rho[3]*weight[3]+0.16666666666666669*rho[2]*weight[2]+0.05555555555555556*rho[1]*weight[2]+0.09622504486493762*rho[0]*weight[2]+0.05555555555555556*weight[1]*rho[2]+0.09622504486493762*weight[0]*rho[2]+0.16666666666666669*rho[1]*weight[1]+0.09622504486493762*rho[0]*weight[1]+0.09622504486493762*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]); #else - bsrc[nodeOff+globalIdxs[3]] = 1.5*phiBC[3]+0.8660254037844386*phiBC[2]+0.8660254037844386*phiBC[1]+0.5*phiBC[0]; + bsrc[nodeOff+globalIdxs[11]] += 0.11904761904761905*rho[19]*weight[19]+0.06873217490352689*rho[16]*weight[19]+0.06873217490352689*rho[15]*weight[19]-0.03849001794597506*rho[12]*weight[19]-0.03849001794597506*rho[11]*weight[19]+0.03968253968253969*rho[9]*weight[19]-0.022222222222222223*rho[8]*weight[19]-0.022222222222222223*rho[7]*weight[19]-0.074535599249993*rho[4]*weight[19]-0.04303314829119352*rho[2]*weight[19]-0.04303314829119352*rho[1]*weight[19]-0.024845199749997667*rho[0]*weight[19]+0.06873217490352689*weight[16]*rho[19]+0.06873217490352689*weight[15]*rho[19]-0.03849001794597506*weight[12]*rho[19]-0.03849001794597506*weight[11]*rho[19]+0.03968253968253969*weight[9]*rho[19]-0.022222222222222223*weight[8]*rho[19]-0.022222222222222223*weight[7]*rho[19]-0.074535599249993*weight[4]*rho[19]-0.04303314829119352*weight[2]*rho[19]-0.04303314829119352*weight[1]*rho[19]-0.024845199749997667*weight[0]*rho[19]+0.1*rho[18]*weight[18]+0.02666666666666667*rho[17]*weight[18]+0.05773502691896258*rho[14]*weight[18]+0.051639777949432225*rho[10]*weight[18]+0.029814239699997195*rho[6]*weight[18]+0.02666666666666667*weight[17]*rho[18]+0.05773502691896258*weight[14]*rho[18]+0.051639777949432225*weight[10]*rho[18]+0.029814239699997195*weight[6]*rho[18]+0.1*rho[17]*weight[17]+0.05773502691896258*rho[13]*weight[17]+0.051639777949432225*rho[10]*weight[17]+0.029814239699997195*rho[5]*weight[17]+0.05773502691896258*weight[13]*rho[17]+0.051639777949432225*weight[10]*rho[17]+0.029814239699997195*weight[5]*rho[17]+0.11904761904761905*rho[16]*weight[16]+0.03968253968253969*rho[15]*weight[16]-0.022222222222222223*rho[12]*weight[16]+0.06873217490352689*rho[9]*weight[16]-0.03849001794597506*rho[8]*weight[16]-0.04303314829119353*rho[4]*weight[16]-0.07453559924999299*rho[2]*weight[16]-0.024845199749997663*rho[1]*weight[16]-0.04303314829119353*rho[0]*weight[16]+0.03968253968253969*weight[15]*rho[16]-0.022222222222222223*weight[12]*rho[16]+0.06873217490352689*weight[9]*rho[16]-0.03849001794597506*weight[8]*rho[16]-0.04303314829119353*weight[4]*rho[16]-0.07453559924999299*weight[2]*rho[16]-0.024845199749997663*weight[1]*rho[16]-0.04303314829119353*weight[0]*rho[16]+0.11904761904761905*rho[15]*weight[15]-0.022222222222222223*rho[11]*weight[15]+0.06873217490352689*rho[9]*weight[15]-0.03849001794597506*rho[7]*weight[15]-0.04303314829119353*rho[4]*weight[15]-0.024845199749997663*rho[2]*weight[15]-0.07453559924999299*rho[1]*weight[15]-0.04303314829119353*rho[0]*weight[15]-0.022222222222222223*weight[11]*rho[15]+0.06873217490352689*weight[9]*rho[15]-0.03849001794597506*weight[7]*rho[15]-0.04303314829119353*weight[4]*rho[15]-0.024845199749997663*weight[2]*rho[15]-0.07453559924999299*weight[1]*rho[15]-0.04303314829119353*weight[0]*rho[15]+0.1*rho[14]*weight[14]+0.029814239699997195*rho[10]*weight[14]+0.05163977794943223*rho[6]*weight[14]+0.029814239699997195*weight[10]*rho[14]+0.05163977794943223*weight[6]*rho[14]+0.1*rho[13]*weight[13]+0.029814239699997195*rho[10]*weight[13]+0.05163977794943223*rho[5]*weight[13]+0.029814239699997195*weight[10]*rho[13]+0.05163977794943223*weight[5]*rho[13]+0.16666666666666669*rho[12]*weight[12]+0.044444444444444446*rho[11]*weight[12]+0.09622504486493764*rho[8]*weight[12]+0.08606629658238706*rho[4]*weight[12]+0.049690399499995326*rho[2]*weight[12]+0.044444444444444446*weight[11]*rho[12]+0.09622504486493764*weight[8]*rho[12]+0.08606629658238706*weight[4]*rho[12]+0.049690399499995326*weight[2]*rho[12]+0.16666666666666669*rho[11]*weight[11]+0.09622504486493764*rho[7]*weight[11]+0.08606629658238706*rho[4]*weight[11]+0.049690399499995326*rho[1]*weight[11]+0.09622504486493764*weight[7]*rho[11]+0.08606629658238706*weight[4]*rho[11]+0.049690399499995326*weight[1]*rho[11]+0.1*rho[10]*weight[10]+0.05773502691896258*rho[6]*weight[10]+0.05773502691896258*rho[5]*weight[10]+0.03333333333333333*rho[3]*weight[10]+0.05773502691896258*weight[6]*rho[10]+0.05773502691896258*weight[5]*rho[10]+0.03333333333333333*weight[3]*rho[10]+0.11904761904761905*rho[9]*weight[9]-0.024845199749997667*rho[4]*weight[9]-0.04303314829119352*rho[2]*weight[9]-0.04303314829119352*rho[1]*weight[9]-0.074535599249993*rho[0]*weight[9]-0.024845199749997667*weight[4]*rho[9]-0.04303314829119352*weight[2]*rho[9]-0.04303314829119352*weight[1]*rho[9]-0.074535599249993*weight[0]*rho[9]+0.16666666666666669*rho[8]*weight[8]+0.04969039949999533*rho[4]*weight[8]+0.08606629658238704*rho[2]*weight[8]+0.04969039949999533*weight[4]*rho[8]+0.08606629658238704*weight[2]*rho[8]+0.16666666666666669*rho[7]*weight[7]+0.04969039949999533*rho[4]*weight[7]+0.08606629658238704*rho[1]*weight[7]+0.04969039949999533*weight[4]*rho[7]+0.08606629658238704*weight[1]*rho[7]+0.1*rho[6]*weight[6]+0.03333333333333333*rho[5]*weight[6]+0.05773502691896258*rho[3]*weight[6]+0.03333333333333333*weight[5]*rho[6]+0.05773502691896258*weight[3]*rho[6]+0.1*rho[5]*weight[5]+0.05773502691896258*rho[3]*weight[5]+0.05773502691896258*weight[3]*rho[5]+0.16666666666666669*rho[4]*weight[4]+0.09622504486493762*rho[2]*weight[4]+0.09622504486493762*rho[1]*weight[4]+0.05555555555555556*rho[0]*weight[4]+0.09622504486493762*weight[2]*rho[4]+0.09622504486493762*weight[1]*rho[4]+0.05555555555555556*weight[0]*rho[4]+0.1*rho[3]*weight[3]+0.16666666666666669*rho[2]*weight[2]+0.05555555555555556*rho[1]*weight[2]+0.09622504486493762*rho[0]*weight[2]+0.05555555555555556*weight[1]*rho[2]+0.09622504486493762*weight[0]*rho[2]+0.16666666666666669*rho[1]*weight[1]+0.09622504486493762*rho[0]*weight[1]+0.09622504486493762*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]; #endif - -} - -GKYL_CU_DH void fem_parproj_src_stencil_weighted_2x_ser_p2_upy_dirichlety(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) -{ - // rho: right side source. - // weight: Weight in the projection operation. - // phiBC: Dirichlet boundary potential, given as a DG expansion in the ghost cell (volume). - // nodeOff: node offset (prob idx * global number of nodes). - // globalIdxs: global linear index of each basis function/node in current cell. - // bsrc: global right side source vector. - #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[0]],0.030952380952380953*rho[7]*weight[7]+0.06666666666666667*rho[6]*weight[7]-0.07560539239387958*rho[5]*weight[7]-0.03849001794597506*rho[4]*weight[7]-0.07745966692414834*rho[3]*weight[7]+0.07453559924999299*rho[2]*weight[7]+0.07453559924999299*rho[1]*weight[7]-0.04303314829119352*rho[0]*weight[7]+0.06666666666666667*weight[6]*rho[7]-0.07560539239387958*weight[5]*rho[7]-0.03849001794597506*weight[4]*rho[7]-0.07745966692414834*weight[3]*rho[7]+0.07453559924999299*weight[2]*rho[7]+0.07453559924999299*weight[1]*rho[7]-0.04303314829119352*weight[0]*rho[7]+0.030952380952380953*rho[6]*weight[6]-0.03849001794597506*rho[5]*weight[6]-0.07560539239387958*rho[4]*weight[6]-0.07745966692414834*rho[3]*weight[6]+0.07453559924999299*rho[2]*weight[6]+0.07453559924999299*rho[1]*weight[6]-0.04303314829119352*rho[0]*weight[6]-0.03849001794597506*weight[5]*rho[6]-0.07560539239387958*weight[4]*rho[6]-0.07745966692414834*weight[3]*rho[6]+0.07453559924999299*weight[2]*rho[6]+0.07453559924999299*weight[1]*rho[6]-0.04303314829119352*weight[0]*rho[6]-0.03571428571428571*rho[5]*weight[5]+0.074535599249993*rho[3]*weight[5]-0.04303314829119353*rho[2]*weight[5]-0.04303314829119353*rho[1]*weight[5]+0.074535599249993*rho[0]*weight[5]+0.074535599249993*weight[3]*rho[5]-0.04303314829119353*weight[2]*rho[5]-0.04303314829119353*weight[1]*rho[5]+0.074535599249993*weight[0]*rho[5]-0.03571428571428571*rho[4]*weight[4]+0.074535599249993*rho[3]*weight[4]-0.04303314829119353*rho[2]*weight[4]-0.04303314829119353*rho[1]*weight[4]+0.074535599249993*rho[0]*weight[4]+0.074535599249993*weight[3]*rho[4]-0.04303314829119353*weight[2]*rho[4]-0.04303314829119353*weight[1]*rho[4]+0.074535599249993*weight[0]*rho[4]+0.05*rho[3]*weight[3]-0.08660254037844384*rho[2]*weight[3]-0.08660254037844384*rho[1]*weight[3]+0.08333333333333333*rho[0]*weight[3]-0.08660254037844384*weight[2]*rho[3]-0.08660254037844384*weight[1]*rho[3]+0.08333333333333333*weight[0]*rho[3]-0.016666666666666666*rho[2]*weight[2]+0.08333333333333333*rho[1]*weight[2]-0.04811252243246881*rho[0]*weight[2]+0.08333333333333333*weight[1]*rho[2]-0.04811252243246881*weight[0]*rho[2]-0.016666666666666666*rho[1]*weight[1]-0.04811252243246881*rho[0]*weight[1]-0.04811252243246881*weight[0]*rho[1]-0.08333333333333333*rho[0]*weight[0]); + atomicAdd(&bsrc[nodeOff+globalIdxs[12]],-(0.034523809523809526*rho[19]*weight[19])-0.02*rho[18]*weight[19]-0.02*rho[17]*weight[19]-0.008935182737458497*rho[16]*weight[19]-0.008935182737458497*rho[15]*weight[19]+0.01924500897298753*rho[14]*weight[19]+0.01924500897298753*rho[13]*weight[19]-0.01924500897298753*rho[12]*weight[19]-0.01924500897298753*rho[11]*weight[19]+0.012909944487358056*rho[10]*weight[19]+0.021825396825396828*rho[9]*weight[19]+0.011111111111111112*rho[8]*weight[19]+0.011111111111111112*rho[7]*weight[19]-0.022360679774997897*rho[6]*weight[19]-0.022360679774997897*rho[5]*weight[19]+0.0372677996249965*rho[4]*weight[19]+0.02151657414559676*rho[3]*weight[19]-0.02151657414559676*rho[2]*weight[19]-0.02151657414559676*rho[1]*weight[19]+0.012422599874998833*rho[0]*weight[19]-0.02*weight[18]*rho[19]-0.02*weight[17]*rho[19]-0.008935182737458497*weight[16]*rho[19]-0.008935182737458497*weight[15]*rho[19]+0.01924500897298753*weight[14]*rho[19]+0.01924500897298753*weight[13]*rho[19]-0.01924500897298753*weight[12]*rho[19]-0.01924500897298753*weight[11]*rho[19]+0.012909944487358056*weight[10]*rho[19]+0.021825396825396828*weight[9]*rho[19]+0.011111111111111112*weight[8]*rho[19]+0.011111111111111112*weight[7]*rho[19]-0.022360679774997897*weight[6]*rho[19]-0.022360679774997897*weight[5]*rho[19]+0.0372677996249965*weight[4]*rho[19]+0.02151657414559676*weight[3]*rho[19]-0.02151657414559676*weight[2]*rho[19]-0.02151657414559676*weight[1]*rho[19]+0.012422599874998833*weight[0]*rho[19]-0.034523809523809526*rho[18]*weight[18]+0.02*rho[17]*weight[18]+0.01924500897298753*rho[16]*weight[18]+0.01924500897298753*rho[15]*weight[18]-0.008935182737458497*rho[14]*weight[18]-0.01924500897298753*rho[13]*weight[18]+0.008935182737458497*rho[12]*weight[18]+0.01924500897298753*rho[11]*weight[18]-0.012909944487358056*rho[10]*weight[18]-0.011111111111111112*rho[9]*weight[18]-0.021825396825396828*rho[8]*weight[18]-0.011111111111111112*rho[7]*weight[18]+0.022360679774997897*rho[6]*weight[18]+0.0372677996249965*rho[5]*weight[18]-0.022360679774997897*rho[4]*weight[18]-0.02151657414559676*rho[3]*weight[18]+0.02151657414559676*rho[2]*weight[18]+0.02151657414559676*rho[1]*weight[18]-0.012422599874998833*rho[0]*weight[18]+0.02*weight[17]*rho[18]+0.01924500897298753*weight[16]*rho[18]+0.01924500897298753*weight[15]*rho[18]-0.008935182737458497*weight[14]*rho[18]-0.01924500897298753*weight[13]*rho[18]+0.008935182737458497*weight[12]*rho[18]+0.01924500897298753*weight[11]*rho[18]-0.012909944487358056*weight[10]*rho[18]-0.011111111111111112*weight[9]*rho[18]-0.021825396825396828*weight[8]*rho[18]-0.011111111111111112*weight[7]*rho[18]+0.022360679774997897*weight[6]*rho[18]+0.0372677996249965*weight[5]*rho[18]-0.022360679774997897*weight[4]*rho[18]-0.02151657414559676*weight[3]*rho[18]+0.02151657414559676*weight[2]*rho[18]+0.02151657414559676*weight[1]*rho[18]-0.012422599874998833*weight[0]*rho[18]-0.034523809523809526*rho[17]*weight[17]+0.01924500897298753*rho[16]*weight[17]+0.01924500897298753*rho[15]*weight[17]-0.01924500897298753*rho[14]*weight[17]-0.008935182737458497*rho[13]*weight[17]+0.01924500897298753*rho[12]*weight[17]+0.008935182737458497*rho[11]*weight[17]-0.012909944487358056*rho[10]*weight[17]-0.011111111111111112*rho[9]*weight[17]-0.011111111111111112*rho[8]*weight[17]-0.021825396825396828*rho[7]*weight[17]+0.0372677996249965*rho[6]*weight[17]+0.022360679774997897*rho[5]*weight[17]-0.022360679774997897*rho[4]*weight[17]-0.02151657414559676*rho[3]*weight[17]+0.02151657414559676*rho[2]*weight[17]+0.02151657414559676*rho[1]*weight[17]-0.012422599874998833*rho[0]*weight[17]+0.01924500897298753*weight[16]*rho[17]+0.01924500897298753*weight[15]*rho[17]-0.01924500897298753*weight[14]*rho[17]-0.008935182737458497*weight[13]*rho[17]+0.01924500897298753*weight[12]*rho[17]+0.008935182737458497*weight[11]*rho[17]-0.012909944487358056*weight[10]*rho[17]-0.011111111111111112*weight[9]*rho[17]-0.011111111111111112*weight[8]*rho[17]-0.021825396825396828*weight[7]*rho[17]+0.0372677996249965*weight[6]*rho[17]+0.022360679774997897*weight[5]*rho[17]-0.022360679774997897*weight[4]*rho[17]-0.02151657414559676*weight[3]*rho[17]+0.02151657414559676*weight[2]*rho[17]+0.02151657414559676*weight[1]*rho[17]-0.012422599874998833*weight[0]*rho[17]-0.06785714285714287*rho[16]*weight[16]+0.021825396825396828*rho[15]*weight[16]-0.011111111111111112*rho[14]*weight[16]-0.011111111111111112*rho[13]*weight[16]+0.011111111111111112*rho[12]*weight[16]-0.022360679774997897*rho[10]*weight[16]+0.010309826235529031*rho[9]*weight[16]-0.01924500897298753*rho[8]*weight[16]-0.004303314829119352*rho[6]*weight[16]+0.021516574145596764*rho[5]*weight[16]-0.021516574145596764*rho[4]*weight[16]-0.012422599874998832*rho[3]*weight[16]+0.037267799624996496*rho[2]*weight[16]+0.012422599874998832*rho[1]*weight[16]-0.021516574145596764*rho[0]*weight[16]+0.021825396825396828*weight[15]*rho[16]-0.011111111111111112*weight[14]*rho[16]-0.011111111111111112*weight[13]*rho[16]+0.011111111111111112*weight[12]*rho[16]-0.022360679774997897*weight[10]*rho[16]+0.010309826235529031*weight[9]*rho[16]-0.01924500897298753*weight[8]*rho[16]-0.004303314829119352*weight[6]*rho[16]+0.021516574145596764*weight[5]*rho[16]-0.021516574145596764*weight[4]*rho[16]-0.012422599874998832*weight[3]*rho[16]+0.037267799624996496*weight[2]*rho[16]+0.012422599874998832*weight[1]*rho[16]-0.021516574145596764*weight[0]*rho[16]-0.06785714285714287*rho[15]*weight[15]-0.011111111111111112*rho[14]*weight[15]-0.011111111111111112*rho[13]*weight[15]+0.011111111111111112*rho[11]*weight[15]-0.022360679774997897*rho[10]*weight[15]+0.010309826235529031*rho[9]*weight[15]-0.01924500897298753*rho[7]*weight[15]+0.021516574145596764*rho[6]*weight[15]-0.004303314829119352*rho[5]*weight[15]-0.021516574145596764*rho[4]*weight[15]-0.012422599874998832*rho[3]*weight[15]+0.012422599874998832*rho[2]*weight[15]+0.037267799624996496*rho[1]*weight[15]-0.021516574145596764*rho[0]*weight[15]-0.011111111111111112*weight[14]*rho[15]-0.011111111111111112*weight[13]*rho[15]+0.011111111111111112*weight[11]*rho[15]-0.022360679774997897*weight[10]*rho[15]+0.010309826235529031*weight[9]*rho[15]-0.01924500897298753*weight[7]*rho[15]+0.021516574145596764*weight[6]*rho[15]-0.004303314829119352*weight[5]*rho[15]-0.021516574145596764*weight[4]*rho[15]-0.012422599874998832*weight[3]*rho[15]+0.012422599874998832*weight[2]*rho[15]+0.037267799624996496*weight[1]*rho[15]-0.021516574145596764*weight[0]*rho[15]-0.06785714285714287*rho[14]*weight[14]-0.021825396825396828*rho[12]*weight[14]-0.011111111111111112*rho[11]*weight[14]+0.022360679774997897*rho[10]*weight[14]+0.01924500897298753*rho[9]*weight[14]-0.010309826235529031*rho[8]*weight[14]+0.004303314829119352*rho[6]*weight[14]-0.021516574145596764*rho[5]*weight[14]+0.021516574145596764*rho[4]*weight[14]+0.037267799624996496*rho[3]*weight[14]-0.012422599874998832*rho[2]*weight[14]-0.012422599874998832*rho[1]*weight[14]+0.021516574145596764*rho[0]*weight[14]-0.021825396825396828*weight[12]*rho[14]-0.011111111111111112*weight[11]*rho[14]+0.022360679774997897*weight[10]*rho[14]+0.01924500897298753*weight[9]*rho[14]-0.010309826235529031*weight[8]*rho[14]+0.004303314829119352*weight[6]*rho[14]-0.021516574145596764*weight[5]*rho[14]+0.021516574145596764*weight[4]*rho[14]+0.037267799624996496*weight[3]*rho[14]-0.012422599874998832*weight[2]*rho[14]-0.012422599874998832*weight[1]*rho[14]+0.021516574145596764*weight[0]*rho[14]-0.06785714285714287*rho[13]*weight[13]-0.011111111111111112*rho[12]*weight[13]-0.021825396825396828*rho[11]*weight[13]+0.022360679774997897*rho[10]*weight[13]+0.01924500897298753*rho[9]*weight[13]-0.010309826235529031*rho[7]*weight[13]-0.021516574145596764*rho[6]*weight[13]+0.004303314829119352*rho[5]*weight[13]+0.021516574145596764*rho[4]*weight[13]+0.037267799624996496*rho[3]*weight[13]-0.012422599874998832*rho[2]*weight[13]-0.012422599874998832*rho[1]*weight[13]+0.021516574145596764*rho[0]*weight[13]-0.011111111111111112*weight[12]*rho[13]-0.021825396825396828*weight[11]*rho[13]+0.022360679774997897*weight[10]*rho[13]+0.01924500897298753*weight[9]*rho[13]-0.010309826235529031*weight[7]*rho[13]-0.021516574145596764*weight[6]*rho[13]+0.004303314829119352*weight[5]*rho[13]+0.021516574145596764*weight[4]*rho[13]+0.037267799624996496*weight[3]*rho[13]-0.012422599874998832*weight[2]*rho[13]-0.012422599874998832*weight[1]*rho[13]+0.021516574145596764*weight[0]*rho[13]-0.06785714285714287*rho[12]*weight[12]+0.011111111111111112*rho[11]*weight[12]-0.022360679774997897*rho[10]*weight[12]+0.010309826235529031*rho[8]*weight[12]-0.01924500897298753*rho[7]*weight[12]+0.021516574145596764*rho[6]*weight[12]+0.021516574145596764*rho[5]*weight[12]+0.004303314829119352*rho[4]*weight[12]-0.012422599874998832*rho[3]*weight[12]+0.012422599874998832*rho[2]*weight[12]+0.037267799624996496*rho[1]*weight[12]-0.021516574145596764*rho[0]*weight[12]+0.011111111111111112*weight[11]*rho[12]-0.022360679774997897*weight[10]*rho[12]+0.010309826235529031*weight[8]*rho[12]-0.01924500897298753*weight[7]*rho[12]+0.021516574145596764*weight[6]*rho[12]+0.021516574145596764*weight[5]*rho[12]+0.004303314829119352*weight[4]*rho[12]-0.012422599874998832*weight[3]*rho[12]+0.012422599874998832*weight[2]*rho[12]+0.037267799624996496*weight[1]*rho[12]-0.021516574145596764*weight[0]*rho[12]-0.06785714285714287*rho[11]*weight[11]-0.022360679774997897*rho[10]*weight[11]-0.01924500897298753*rho[8]*weight[11]+0.010309826235529031*rho[7]*weight[11]+0.021516574145596764*rho[6]*weight[11]+0.021516574145596764*rho[5]*weight[11]+0.004303314829119352*rho[4]*weight[11]-0.012422599874998832*rho[3]*weight[11]+0.037267799624996496*rho[2]*weight[11]+0.012422599874998832*rho[1]*weight[11]-0.021516574145596764*rho[0]*weight[11]-0.022360679774997897*weight[10]*rho[11]-0.01924500897298753*weight[8]*rho[11]+0.010309826235529031*weight[7]*rho[11]+0.021516574145596764*weight[6]*rho[11]+0.021516574145596764*weight[5]*rho[11]+0.004303314829119352*weight[4]*rho[11]-0.012422599874998832*weight[3]*rho[11]+0.037267799624996496*weight[2]*rho[11]+0.012422599874998832*weight[1]*rho[11]-0.021516574145596764*weight[0]*rho[11]-0.025*rho[10]*weight[10]+0.02151657414559676*rho[9]*weight[10]+0.02151657414559676*rho[8]*weight[10]+0.02151657414559676*rho[7]*weight[10]-0.014433756729740645*rho[6]*weight[10]-0.014433756729740645*rho[5]*weight[10]+0.014433756729740645*rho[4]*weight[10]+0.025*rho[3]*weight[10]-0.025*rho[2]*weight[10]-0.025*rho[1]*weight[10]+0.024056261216234404*rho[0]*weight[10]+0.02151657414559676*weight[9]*rho[10]+0.02151657414559676*weight[8]*rho[10]+0.02151657414559676*weight[7]*rho[10]-0.014433756729740645*weight[6]*rho[10]-0.014433756729740645*weight[5]*rho[10]+0.014433756729740645*weight[4]*rho[10]+0.025*weight[3]*rho[10]-0.025*weight[2]*rho[10]-0.025*weight[1]*rho[10]+0.024056261216234404*weight[0]*rho[10]-0.10119047619047619*rho[9]*weight[9]-0.012422599874998833*rho[6]*weight[9]-0.012422599874998833*rho[5]*weight[9]+0.012422599874998833*rho[4]*weight[9]-0.02151657414559676*rho[3]*weight[9]-0.02151657414559676*rho[2]*weight[9]-0.02151657414559676*rho[1]*weight[9]+0.0372677996249965*rho[0]*weight[9]-0.012422599874998833*weight[6]*rho[9]-0.012422599874998833*weight[5]*rho[9]+0.012422599874998833*weight[4]*rho[9]-0.02151657414559676*weight[3]*rho[9]-0.02151657414559676*weight[2]*rho[9]-0.02151657414559676*weight[1]*rho[9]+0.0372677996249965*weight[0]*rho[9]-0.10119047619047619*rho[8]*weight[8]-0.012422599874998833*rho[6]*weight[8]-0.012422599874998833*rho[5]*weight[8]+0.012422599874998833*rho[4]*weight[8]+0.02151657414559676*rho[3]*weight[8]+0.02151657414559676*rho[2]*weight[8]-0.02151657414559676*rho[1]*weight[8]+0.0372677996249965*rho[0]*weight[8]-0.012422599874998833*weight[6]*rho[8]-0.012422599874998833*weight[5]*rho[8]+0.012422599874998833*weight[4]*rho[8]+0.02151657414559676*weight[3]*rho[8]+0.02151657414559676*weight[2]*rho[8]-0.02151657414559676*weight[1]*rho[8]+0.0372677996249965*weight[0]*rho[8]-0.10119047619047619*rho[7]*weight[7]-0.012422599874998833*rho[6]*weight[7]-0.012422599874998833*rho[5]*weight[7]+0.012422599874998833*rho[4]*weight[7]+0.02151657414559676*rho[3]*weight[7]-0.02151657414559676*rho[2]*weight[7]+0.02151657414559676*rho[1]*weight[7]+0.0372677996249965*rho[0]*weight[7]-0.012422599874998833*weight[6]*rho[7]-0.012422599874998833*weight[5]*rho[7]+0.012422599874998833*weight[4]*rho[7]+0.02151657414559676*weight[3]*rho[7]-0.02151657414559676*weight[2]*rho[7]+0.02151657414559676*weight[1]*rho[7]+0.0372677996249965*weight[0]*rho[7]-0.058333333333333334*rho[6]*weight[6]+0.025*rho[5]*weight[6]-0.025*rho[4]*weight[6]+0.004811252243246881*rho[3]*weight[6]-0.004811252243246881*rho[2]*weight[6]+0.024056261216234404*rho[1]*weight[6]-0.01388888888888889*rho[0]*weight[6]+0.025*weight[5]*rho[6]-0.025*weight[4]*rho[6]+0.004811252243246881*weight[3]*rho[6]-0.004811252243246881*weight[2]*rho[6]+0.024056261216234404*weight[1]*rho[6]-0.01388888888888889*weight[0]*rho[6]-0.058333333333333334*rho[5]*weight[5]-0.025*rho[4]*weight[5]+0.004811252243246881*rho[3]*weight[5]+0.024056261216234404*rho[2]*weight[5]-0.004811252243246881*rho[1]*weight[5]-0.01388888888888889*rho[0]*weight[5]-0.025*weight[4]*rho[5]+0.004811252243246881*weight[3]*rho[5]+0.024056261216234404*weight[2]*rho[5]-0.004811252243246881*weight[1]*rho[5]-0.01388888888888889*weight[0]*rho[5]-0.058333333333333334*rho[4]*weight[4]+0.024056261216234404*rho[3]*weight[4]+0.004811252243246881*rho[2]*weight[4]+0.004811252243246881*rho[1]*weight[4]+0.01388888888888889*rho[0]*weight[4]+0.024056261216234404*weight[3]*rho[4]+0.004811252243246881*weight[2]*rho[4]+0.004811252243246881*weight[1]*rho[4]+0.01388888888888889*weight[0]*rho[4]-0.09166666666666667*rho[3]*weight[3]-0.01388888888888889*rho[2]*weight[3]-0.01388888888888889*rho[1]*weight[3]-0.024056261216234404*rho[0]*weight[3]-0.01388888888888889*weight[2]*rho[3]-0.01388888888888889*weight[1]*rho[3]-0.024056261216234404*weight[0]*rho[3]-0.09166666666666667*rho[2]*weight[2]+0.01388888888888889*rho[1]*weight[2]+0.024056261216234404*rho[0]*weight[2]+0.01388888888888889*weight[1]*rho[2]+0.024056261216234404*weight[0]*rho[2]-0.09166666666666667*rho[1]*weight[1]+0.024056261216234404*rho[0]*weight[1]+0.024056261216234404*weight[0]*rho[1]-0.125*rho[0]*weight[0]); #else - bsrc[nodeOff+globalIdxs[0]] += 0.030952380952380953*rho[7]*weight[7]+0.06666666666666667*rho[6]*weight[7]-0.07560539239387958*rho[5]*weight[7]-0.03849001794597506*rho[4]*weight[7]-0.07745966692414834*rho[3]*weight[7]+0.07453559924999299*rho[2]*weight[7]+0.07453559924999299*rho[1]*weight[7]-0.04303314829119352*rho[0]*weight[7]+0.06666666666666667*weight[6]*rho[7]-0.07560539239387958*weight[5]*rho[7]-0.03849001794597506*weight[4]*rho[7]-0.07745966692414834*weight[3]*rho[7]+0.07453559924999299*weight[2]*rho[7]+0.07453559924999299*weight[1]*rho[7]-0.04303314829119352*weight[0]*rho[7]+0.030952380952380953*rho[6]*weight[6]-0.03849001794597506*rho[5]*weight[6]-0.07560539239387958*rho[4]*weight[6]-0.07745966692414834*rho[3]*weight[6]+0.07453559924999299*rho[2]*weight[6]+0.07453559924999299*rho[1]*weight[6]-0.04303314829119352*rho[0]*weight[6]-0.03849001794597506*weight[5]*rho[6]-0.07560539239387958*weight[4]*rho[6]-0.07745966692414834*weight[3]*rho[6]+0.07453559924999299*weight[2]*rho[6]+0.07453559924999299*weight[1]*rho[6]-0.04303314829119352*weight[0]*rho[6]-0.03571428571428571*rho[5]*weight[5]+0.074535599249993*rho[3]*weight[5]-0.04303314829119353*rho[2]*weight[5]-0.04303314829119353*rho[1]*weight[5]+0.074535599249993*rho[0]*weight[5]+0.074535599249993*weight[3]*rho[5]-0.04303314829119353*weight[2]*rho[5]-0.04303314829119353*weight[1]*rho[5]+0.074535599249993*weight[0]*rho[5]-0.03571428571428571*rho[4]*weight[4]+0.074535599249993*rho[3]*weight[4]-0.04303314829119353*rho[2]*weight[4]-0.04303314829119353*rho[1]*weight[4]+0.074535599249993*rho[0]*weight[4]+0.074535599249993*weight[3]*rho[4]-0.04303314829119353*weight[2]*rho[4]-0.04303314829119353*weight[1]*rho[4]+0.074535599249993*weight[0]*rho[4]+0.05*rho[3]*weight[3]-0.08660254037844384*rho[2]*weight[3]-0.08660254037844384*rho[1]*weight[3]+0.08333333333333333*rho[0]*weight[3]-0.08660254037844384*weight[2]*rho[3]-0.08660254037844384*weight[1]*rho[3]+0.08333333333333333*weight[0]*rho[3]-0.016666666666666666*rho[2]*weight[2]+0.08333333333333333*rho[1]*weight[2]-0.04811252243246881*rho[0]*weight[2]+0.08333333333333333*weight[1]*rho[2]-0.04811252243246881*weight[0]*rho[2]-0.016666666666666666*rho[1]*weight[1]-0.04811252243246881*rho[0]*weight[1]-0.04811252243246881*weight[0]*rho[1]-0.08333333333333333*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[12]] += -(0.034523809523809526*rho[19]*weight[19])-0.02*rho[18]*weight[19]-0.02*rho[17]*weight[19]-0.008935182737458497*rho[16]*weight[19]-0.008935182737458497*rho[15]*weight[19]+0.01924500897298753*rho[14]*weight[19]+0.01924500897298753*rho[13]*weight[19]-0.01924500897298753*rho[12]*weight[19]-0.01924500897298753*rho[11]*weight[19]+0.012909944487358056*rho[10]*weight[19]+0.021825396825396828*rho[9]*weight[19]+0.011111111111111112*rho[8]*weight[19]+0.011111111111111112*rho[7]*weight[19]-0.022360679774997897*rho[6]*weight[19]-0.022360679774997897*rho[5]*weight[19]+0.0372677996249965*rho[4]*weight[19]+0.02151657414559676*rho[3]*weight[19]-0.02151657414559676*rho[2]*weight[19]-0.02151657414559676*rho[1]*weight[19]+0.012422599874998833*rho[0]*weight[19]-0.02*weight[18]*rho[19]-0.02*weight[17]*rho[19]-0.008935182737458497*weight[16]*rho[19]-0.008935182737458497*weight[15]*rho[19]+0.01924500897298753*weight[14]*rho[19]+0.01924500897298753*weight[13]*rho[19]-0.01924500897298753*weight[12]*rho[19]-0.01924500897298753*weight[11]*rho[19]+0.012909944487358056*weight[10]*rho[19]+0.021825396825396828*weight[9]*rho[19]+0.011111111111111112*weight[8]*rho[19]+0.011111111111111112*weight[7]*rho[19]-0.022360679774997897*weight[6]*rho[19]-0.022360679774997897*weight[5]*rho[19]+0.0372677996249965*weight[4]*rho[19]+0.02151657414559676*weight[3]*rho[19]-0.02151657414559676*weight[2]*rho[19]-0.02151657414559676*weight[1]*rho[19]+0.012422599874998833*weight[0]*rho[19]-0.034523809523809526*rho[18]*weight[18]+0.02*rho[17]*weight[18]+0.01924500897298753*rho[16]*weight[18]+0.01924500897298753*rho[15]*weight[18]-0.008935182737458497*rho[14]*weight[18]-0.01924500897298753*rho[13]*weight[18]+0.008935182737458497*rho[12]*weight[18]+0.01924500897298753*rho[11]*weight[18]-0.012909944487358056*rho[10]*weight[18]-0.011111111111111112*rho[9]*weight[18]-0.021825396825396828*rho[8]*weight[18]-0.011111111111111112*rho[7]*weight[18]+0.022360679774997897*rho[6]*weight[18]+0.0372677996249965*rho[5]*weight[18]-0.022360679774997897*rho[4]*weight[18]-0.02151657414559676*rho[3]*weight[18]+0.02151657414559676*rho[2]*weight[18]+0.02151657414559676*rho[1]*weight[18]-0.012422599874998833*rho[0]*weight[18]+0.02*weight[17]*rho[18]+0.01924500897298753*weight[16]*rho[18]+0.01924500897298753*weight[15]*rho[18]-0.008935182737458497*weight[14]*rho[18]-0.01924500897298753*weight[13]*rho[18]+0.008935182737458497*weight[12]*rho[18]+0.01924500897298753*weight[11]*rho[18]-0.012909944487358056*weight[10]*rho[18]-0.011111111111111112*weight[9]*rho[18]-0.021825396825396828*weight[8]*rho[18]-0.011111111111111112*weight[7]*rho[18]+0.022360679774997897*weight[6]*rho[18]+0.0372677996249965*weight[5]*rho[18]-0.022360679774997897*weight[4]*rho[18]-0.02151657414559676*weight[3]*rho[18]+0.02151657414559676*weight[2]*rho[18]+0.02151657414559676*weight[1]*rho[18]-0.012422599874998833*weight[0]*rho[18]-0.034523809523809526*rho[17]*weight[17]+0.01924500897298753*rho[16]*weight[17]+0.01924500897298753*rho[15]*weight[17]-0.01924500897298753*rho[14]*weight[17]-0.008935182737458497*rho[13]*weight[17]+0.01924500897298753*rho[12]*weight[17]+0.008935182737458497*rho[11]*weight[17]-0.012909944487358056*rho[10]*weight[17]-0.011111111111111112*rho[9]*weight[17]-0.011111111111111112*rho[8]*weight[17]-0.021825396825396828*rho[7]*weight[17]+0.0372677996249965*rho[6]*weight[17]+0.022360679774997897*rho[5]*weight[17]-0.022360679774997897*rho[4]*weight[17]-0.02151657414559676*rho[3]*weight[17]+0.02151657414559676*rho[2]*weight[17]+0.02151657414559676*rho[1]*weight[17]-0.012422599874998833*rho[0]*weight[17]+0.01924500897298753*weight[16]*rho[17]+0.01924500897298753*weight[15]*rho[17]-0.01924500897298753*weight[14]*rho[17]-0.008935182737458497*weight[13]*rho[17]+0.01924500897298753*weight[12]*rho[17]+0.008935182737458497*weight[11]*rho[17]-0.012909944487358056*weight[10]*rho[17]-0.011111111111111112*weight[9]*rho[17]-0.011111111111111112*weight[8]*rho[17]-0.021825396825396828*weight[7]*rho[17]+0.0372677996249965*weight[6]*rho[17]+0.022360679774997897*weight[5]*rho[17]-0.022360679774997897*weight[4]*rho[17]-0.02151657414559676*weight[3]*rho[17]+0.02151657414559676*weight[2]*rho[17]+0.02151657414559676*weight[1]*rho[17]-0.012422599874998833*weight[0]*rho[17]-0.06785714285714287*rho[16]*weight[16]+0.021825396825396828*rho[15]*weight[16]-0.011111111111111112*rho[14]*weight[16]-0.011111111111111112*rho[13]*weight[16]+0.011111111111111112*rho[12]*weight[16]-0.022360679774997897*rho[10]*weight[16]+0.010309826235529031*rho[9]*weight[16]-0.01924500897298753*rho[8]*weight[16]-0.004303314829119352*rho[6]*weight[16]+0.021516574145596764*rho[5]*weight[16]-0.021516574145596764*rho[4]*weight[16]-0.012422599874998832*rho[3]*weight[16]+0.037267799624996496*rho[2]*weight[16]+0.012422599874998832*rho[1]*weight[16]-0.021516574145596764*rho[0]*weight[16]+0.021825396825396828*weight[15]*rho[16]-0.011111111111111112*weight[14]*rho[16]-0.011111111111111112*weight[13]*rho[16]+0.011111111111111112*weight[12]*rho[16]-0.022360679774997897*weight[10]*rho[16]+0.010309826235529031*weight[9]*rho[16]-0.01924500897298753*weight[8]*rho[16]-0.004303314829119352*weight[6]*rho[16]+0.021516574145596764*weight[5]*rho[16]-0.021516574145596764*weight[4]*rho[16]-0.012422599874998832*weight[3]*rho[16]+0.037267799624996496*weight[2]*rho[16]+0.012422599874998832*weight[1]*rho[16]-0.021516574145596764*weight[0]*rho[16]-0.06785714285714287*rho[15]*weight[15]-0.011111111111111112*rho[14]*weight[15]-0.011111111111111112*rho[13]*weight[15]+0.011111111111111112*rho[11]*weight[15]-0.022360679774997897*rho[10]*weight[15]+0.010309826235529031*rho[9]*weight[15]-0.01924500897298753*rho[7]*weight[15]+0.021516574145596764*rho[6]*weight[15]-0.004303314829119352*rho[5]*weight[15]-0.021516574145596764*rho[4]*weight[15]-0.012422599874998832*rho[3]*weight[15]+0.012422599874998832*rho[2]*weight[15]+0.037267799624996496*rho[1]*weight[15]-0.021516574145596764*rho[0]*weight[15]-0.011111111111111112*weight[14]*rho[15]-0.011111111111111112*weight[13]*rho[15]+0.011111111111111112*weight[11]*rho[15]-0.022360679774997897*weight[10]*rho[15]+0.010309826235529031*weight[9]*rho[15]-0.01924500897298753*weight[7]*rho[15]+0.021516574145596764*weight[6]*rho[15]-0.004303314829119352*weight[5]*rho[15]-0.021516574145596764*weight[4]*rho[15]-0.012422599874998832*weight[3]*rho[15]+0.012422599874998832*weight[2]*rho[15]+0.037267799624996496*weight[1]*rho[15]-0.021516574145596764*weight[0]*rho[15]-0.06785714285714287*rho[14]*weight[14]-0.021825396825396828*rho[12]*weight[14]-0.011111111111111112*rho[11]*weight[14]+0.022360679774997897*rho[10]*weight[14]+0.01924500897298753*rho[9]*weight[14]-0.010309826235529031*rho[8]*weight[14]+0.004303314829119352*rho[6]*weight[14]-0.021516574145596764*rho[5]*weight[14]+0.021516574145596764*rho[4]*weight[14]+0.037267799624996496*rho[3]*weight[14]-0.012422599874998832*rho[2]*weight[14]-0.012422599874998832*rho[1]*weight[14]+0.021516574145596764*rho[0]*weight[14]-0.021825396825396828*weight[12]*rho[14]-0.011111111111111112*weight[11]*rho[14]+0.022360679774997897*weight[10]*rho[14]+0.01924500897298753*weight[9]*rho[14]-0.010309826235529031*weight[8]*rho[14]+0.004303314829119352*weight[6]*rho[14]-0.021516574145596764*weight[5]*rho[14]+0.021516574145596764*weight[4]*rho[14]+0.037267799624996496*weight[3]*rho[14]-0.012422599874998832*weight[2]*rho[14]-0.012422599874998832*weight[1]*rho[14]+0.021516574145596764*weight[0]*rho[14]-0.06785714285714287*rho[13]*weight[13]-0.011111111111111112*rho[12]*weight[13]-0.021825396825396828*rho[11]*weight[13]+0.022360679774997897*rho[10]*weight[13]+0.01924500897298753*rho[9]*weight[13]-0.010309826235529031*rho[7]*weight[13]-0.021516574145596764*rho[6]*weight[13]+0.004303314829119352*rho[5]*weight[13]+0.021516574145596764*rho[4]*weight[13]+0.037267799624996496*rho[3]*weight[13]-0.012422599874998832*rho[2]*weight[13]-0.012422599874998832*rho[1]*weight[13]+0.021516574145596764*rho[0]*weight[13]-0.011111111111111112*weight[12]*rho[13]-0.021825396825396828*weight[11]*rho[13]+0.022360679774997897*weight[10]*rho[13]+0.01924500897298753*weight[9]*rho[13]-0.010309826235529031*weight[7]*rho[13]-0.021516574145596764*weight[6]*rho[13]+0.004303314829119352*weight[5]*rho[13]+0.021516574145596764*weight[4]*rho[13]+0.037267799624996496*weight[3]*rho[13]-0.012422599874998832*weight[2]*rho[13]-0.012422599874998832*weight[1]*rho[13]+0.021516574145596764*weight[0]*rho[13]-0.06785714285714287*rho[12]*weight[12]+0.011111111111111112*rho[11]*weight[12]-0.022360679774997897*rho[10]*weight[12]+0.010309826235529031*rho[8]*weight[12]-0.01924500897298753*rho[7]*weight[12]+0.021516574145596764*rho[6]*weight[12]+0.021516574145596764*rho[5]*weight[12]+0.004303314829119352*rho[4]*weight[12]-0.012422599874998832*rho[3]*weight[12]+0.012422599874998832*rho[2]*weight[12]+0.037267799624996496*rho[1]*weight[12]-0.021516574145596764*rho[0]*weight[12]+0.011111111111111112*weight[11]*rho[12]-0.022360679774997897*weight[10]*rho[12]+0.010309826235529031*weight[8]*rho[12]-0.01924500897298753*weight[7]*rho[12]+0.021516574145596764*weight[6]*rho[12]+0.021516574145596764*weight[5]*rho[12]+0.004303314829119352*weight[4]*rho[12]-0.012422599874998832*weight[3]*rho[12]+0.012422599874998832*weight[2]*rho[12]+0.037267799624996496*weight[1]*rho[12]-0.021516574145596764*weight[0]*rho[12]-0.06785714285714287*rho[11]*weight[11]-0.022360679774997897*rho[10]*weight[11]-0.01924500897298753*rho[8]*weight[11]+0.010309826235529031*rho[7]*weight[11]+0.021516574145596764*rho[6]*weight[11]+0.021516574145596764*rho[5]*weight[11]+0.004303314829119352*rho[4]*weight[11]-0.012422599874998832*rho[3]*weight[11]+0.037267799624996496*rho[2]*weight[11]+0.012422599874998832*rho[1]*weight[11]-0.021516574145596764*rho[0]*weight[11]-0.022360679774997897*weight[10]*rho[11]-0.01924500897298753*weight[8]*rho[11]+0.010309826235529031*weight[7]*rho[11]+0.021516574145596764*weight[6]*rho[11]+0.021516574145596764*weight[5]*rho[11]+0.004303314829119352*weight[4]*rho[11]-0.012422599874998832*weight[3]*rho[11]+0.037267799624996496*weight[2]*rho[11]+0.012422599874998832*weight[1]*rho[11]-0.021516574145596764*weight[0]*rho[11]-0.025*rho[10]*weight[10]+0.02151657414559676*rho[9]*weight[10]+0.02151657414559676*rho[8]*weight[10]+0.02151657414559676*rho[7]*weight[10]-0.014433756729740645*rho[6]*weight[10]-0.014433756729740645*rho[5]*weight[10]+0.014433756729740645*rho[4]*weight[10]+0.025*rho[3]*weight[10]-0.025*rho[2]*weight[10]-0.025*rho[1]*weight[10]+0.024056261216234404*rho[0]*weight[10]+0.02151657414559676*weight[9]*rho[10]+0.02151657414559676*weight[8]*rho[10]+0.02151657414559676*weight[7]*rho[10]-0.014433756729740645*weight[6]*rho[10]-0.014433756729740645*weight[5]*rho[10]+0.014433756729740645*weight[4]*rho[10]+0.025*weight[3]*rho[10]-0.025*weight[2]*rho[10]-0.025*weight[1]*rho[10]+0.024056261216234404*weight[0]*rho[10]-0.10119047619047619*rho[9]*weight[9]-0.012422599874998833*rho[6]*weight[9]-0.012422599874998833*rho[5]*weight[9]+0.012422599874998833*rho[4]*weight[9]-0.02151657414559676*rho[3]*weight[9]-0.02151657414559676*rho[2]*weight[9]-0.02151657414559676*rho[1]*weight[9]+0.0372677996249965*rho[0]*weight[9]-0.012422599874998833*weight[6]*rho[9]-0.012422599874998833*weight[5]*rho[9]+0.012422599874998833*weight[4]*rho[9]-0.02151657414559676*weight[3]*rho[9]-0.02151657414559676*weight[2]*rho[9]-0.02151657414559676*weight[1]*rho[9]+0.0372677996249965*weight[0]*rho[9]-0.10119047619047619*rho[8]*weight[8]-0.012422599874998833*rho[6]*weight[8]-0.012422599874998833*rho[5]*weight[8]+0.012422599874998833*rho[4]*weight[8]+0.02151657414559676*rho[3]*weight[8]+0.02151657414559676*rho[2]*weight[8]-0.02151657414559676*rho[1]*weight[8]+0.0372677996249965*rho[0]*weight[8]-0.012422599874998833*weight[6]*rho[8]-0.012422599874998833*weight[5]*rho[8]+0.012422599874998833*weight[4]*rho[8]+0.02151657414559676*weight[3]*rho[8]+0.02151657414559676*weight[2]*rho[8]-0.02151657414559676*weight[1]*rho[8]+0.0372677996249965*weight[0]*rho[8]-0.10119047619047619*rho[7]*weight[7]-0.012422599874998833*rho[6]*weight[7]-0.012422599874998833*rho[5]*weight[7]+0.012422599874998833*rho[4]*weight[7]+0.02151657414559676*rho[3]*weight[7]-0.02151657414559676*rho[2]*weight[7]+0.02151657414559676*rho[1]*weight[7]+0.0372677996249965*rho[0]*weight[7]-0.012422599874998833*weight[6]*rho[7]-0.012422599874998833*weight[5]*rho[7]+0.012422599874998833*weight[4]*rho[7]+0.02151657414559676*weight[3]*rho[7]-0.02151657414559676*weight[2]*rho[7]+0.02151657414559676*weight[1]*rho[7]+0.0372677996249965*weight[0]*rho[7]-0.058333333333333334*rho[6]*weight[6]+0.025*rho[5]*weight[6]-0.025*rho[4]*weight[6]+0.004811252243246881*rho[3]*weight[6]-0.004811252243246881*rho[2]*weight[6]+0.024056261216234404*rho[1]*weight[6]-0.01388888888888889*rho[0]*weight[6]+0.025*weight[5]*rho[6]-0.025*weight[4]*rho[6]+0.004811252243246881*weight[3]*rho[6]-0.004811252243246881*weight[2]*rho[6]+0.024056261216234404*weight[1]*rho[6]-0.01388888888888889*weight[0]*rho[6]-0.058333333333333334*rho[5]*weight[5]-0.025*rho[4]*weight[5]+0.004811252243246881*rho[3]*weight[5]+0.024056261216234404*rho[2]*weight[5]-0.004811252243246881*rho[1]*weight[5]-0.01388888888888889*rho[0]*weight[5]-0.025*weight[4]*rho[5]+0.004811252243246881*weight[3]*rho[5]+0.024056261216234404*weight[2]*rho[5]-0.004811252243246881*weight[1]*rho[5]-0.01388888888888889*weight[0]*rho[5]-0.058333333333333334*rho[4]*weight[4]+0.024056261216234404*rho[3]*weight[4]+0.004811252243246881*rho[2]*weight[4]+0.004811252243246881*rho[1]*weight[4]+0.01388888888888889*rho[0]*weight[4]+0.024056261216234404*weight[3]*rho[4]+0.004811252243246881*weight[2]*rho[4]+0.004811252243246881*weight[1]*rho[4]+0.01388888888888889*weight[0]*rho[4]-0.09166666666666667*rho[3]*weight[3]-0.01388888888888889*rho[2]*weight[3]-0.01388888888888889*rho[1]*weight[3]-0.024056261216234404*rho[0]*weight[3]-0.01388888888888889*weight[2]*rho[3]-0.01388888888888889*weight[1]*rho[3]-0.024056261216234404*weight[0]*rho[3]-0.09166666666666667*rho[2]*weight[2]+0.01388888888888889*rho[1]*weight[2]+0.024056261216234404*rho[0]*weight[2]+0.01388888888888889*weight[1]*rho[2]+0.024056261216234404*weight[0]*rho[2]-0.09166666666666667*rho[1]*weight[1]+0.024056261216234404*rho[0]*weight[1]+0.024056261216234404*weight[0]*rho[1]-0.125*rho[0]*weight[0]; #endif #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[1]],0.2*rho[7]*weight[7]-0.10327955589886445*rho[3]*weight[7]-0.10327955589886445*weight[3]*rho[7]+0.23809523809523808*rho[6]*weight[6]+0.07698003589195011*rho[5]*weight[6]-0.1374643498070538*rho[4]*weight[6]-0.14907119849998599*rho[2]*weight[6]+0.08606629658238704*rho[0]*weight[6]+0.07698003589195011*weight[5]*rho[6]-0.1374643498070538*weight[4]*rho[6]-0.14907119849998599*weight[2]*rho[6]+0.08606629658238704*weight[0]*rho[6]+0.3333333333333333*rho[5]*weight[5]-0.1721325931647741*rho[2]*weight[5]-0.1721325931647741*weight[2]*rho[5]+0.23809523809523808*rho[4]*weight[4]+0.08606629658238706*rho[2]*weight[4]-0.149071198499986*rho[0]*weight[4]+0.08606629658238706*weight[2]*rho[4]-0.149071198499986*weight[0]*rho[4]+0.2*rho[3]*weight[3]-0.11547005383792514*rho[1]*weight[3]-0.11547005383792514*weight[1]*rho[3]+0.3333333333333333*rho[2]*weight[2]-0.19245008972987523*rho[0]*weight[2]-0.19245008972987523*weight[0]*rho[2]+0.2*rho[1]*weight[1]+0.3333333333333333*rho[0]*weight[0]); + atomicAdd(&bsrc[nodeOff+globalIdxs[13]],0.1*rho[19]*weight[19]-0.02666666666666667*rho[18]*weight[19]-0.05773502691896258*rho[15]*weight[19]+0.051639777949432225*rho[10]*weight[19]-0.029814239699997195*rho[5]*weight[19]-0.02666666666666667*weight[18]*rho[19]-0.05773502691896258*weight[15]*rho[19]+0.051639777949432225*weight[10]*rho[19]-0.029814239699997195*weight[5]*rho[19]+0.1*rho[18]*weight[18]+0.05773502691896258*rho[12]*weight[18]-0.051639777949432225*rho[10]*weight[18]-0.029814239699997195*rho[4]*weight[18]+0.05773502691896258*weight[12]*rho[18]-0.051639777949432225*weight[10]*rho[18]-0.029814239699997195*weight[4]*rho[18]+0.11904761904761905*rho[17]*weight[17]-0.03849001794597506*rho[16]*weight[17]+0.03849001794597506*rho[14]*weight[17]-0.06873217490352689*rho[13]*weight[17]+0.06873217490352689*rho[11]*weight[17]+0.022222222222222223*rho[9]*weight[17]+0.022222222222222223*rho[8]*weight[17]-0.03968253968253969*rho[7]*weight[17]-0.074535599249993*rho[6]*weight[17]+0.04303314829119352*rho[3]*weight[17]-0.04303314829119352*rho[2]*weight[17]+0.024845199749997667*rho[0]*weight[17]-0.03849001794597506*weight[16]*rho[17]+0.03849001794597506*weight[14]*rho[17]-0.06873217490352689*weight[13]*rho[17]+0.06873217490352689*weight[11]*rho[17]+0.022222222222222223*weight[9]*rho[17]+0.022222222222222223*weight[8]*rho[17]-0.03968253968253969*weight[7]*rho[17]-0.074535599249993*weight[6]*rho[17]+0.04303314829119352*weight[3]*rho[17]-0.04303314829119352*weight[2]*rho[17]+0.024845199749997667*weight[0]*rho[17]+0.16666666666666669*rho[16]*weight[16]-0.044444444444444446*rho[14]*weight[16]+0.022222222222222223*rho[13]*weight[16]-0.09622504486493764*rho[9]*weight[16]+0.08606629658238706*rho[6]*weight[16]-0.049690399499995326*rho[3]*weight[16]-0.044444444444444446*weight[14]*rho[16]+0.022222222222222223*weight[13]*rho[16]-0.09622504486493764*weight[9]*rho[16]+0.08606629658238706*weight[6]*rho[16]-0.049690399499995326*weight[3]*rho[16]+0.1*rho[15]*weight[15]-0.029814239699997195*rho[10]*weight[15]+0.05163977794943223*rho[5]*weight[15]-0.029814239699997195*weight[10]*rho[15]+0.05163977794943223*weight[5]*rho[15]+0.16666666666666669*rho[14]*weight[14]+0.022222222222222223*rho[11]*weight[14]+0.09622504486493764*rho[8]*weight[14]-0.08606629658238706*rho[6]*weight[14]-0.049690399499995326*rho[2]*weight[14]+0.022222222222222223*weight[11]*rho[14]+0.09622504486493764*weight[8]*rho[14]-0.08606629658238706*weight[6]*rho[14]-0.049690399499995326*weight[2]*rho[14]+0.11904761904761905*rho[13]*weight[13]-0.03968253968253969*rho[11]*weight[13]-0.03849001794597506*rho[9]*weight[13]+0.06873217490352689*rho[7]*weight[13]+0.04303314829119353*rho[6]*weight[13]-0.07453559924999299*rho[3]*weight[13]+0.024845199749997663*rho[2]*weight[13]-0.04303314829119353*rho[0]*weight[13]-0.03968253968253969*weight[11]*rho[13]-0.03849001794597506*weight[9]*rho[13]+0.06873217490352689*weight[7]*rho[13]+0.04303314829119353*weight[6]*rho[13]-0.07453559924999299*weight[3]*rho[13]+0.024845199749997663*weight[2]*rho[13]-0.04303314829119353*weight[0]*rho[13]+0.1*rho[12]*weight[12]-0.029814239699997195*rho[10]*weight[12]-0.05163977794943223*rho[4]*weight[12]-0.029814239699997195*weight[10]*rho[12]-0.05163977794943223*weight[4]*rho[12]+0.11904761904761905*rho[11]*weight[11]+0.03849001794597506*rho[8]*weight[11]-0.06873217490352689*rho[7]*weight[11]-0.04303314829119353*rho[6]*weight[11]+0.024845199749997663*rho[3]*weight[11]-0.07453559924999299*rho[2]*weight[11]+0.04303314829119353*rho[0]*weight[11]+0.03849001794597506*weight[8]*rho[11]-0.06873217490352689*weight[7]*rho[11]-0.04303314829119353*weight[6]*rho[11]+0.024845199749997663*weight[3]*rho[11]-0.07453559924999299*weight[2]*rho[11]+0.04303314829119353*weight[0]*rho[11]+0.1*rho[10]*weight[10]-0.05773502691896258*rho[5]*weight[10]+0.05773502691896258*rho[4]*weight[10]-0.03333333333333333*rho[1]*weight[10]-0.05773502691896258*weight[5]*rho[10]+0.05773502691896258*weight[4]*rho[10]-0.03333333333333333*weight[1]*rho[10]+0.16666666666666669*rho[9]*weight[9]-0.04969039949999533*rho[6]*weight[9]+0.08606629658238704*rho[3]*weight[9]-0.04969039949999533*weight[6]*rho[9]+0.08606629658238704*weight[3]*rho[9]+0.16666666666666669*rho[8]*weight[8]-0.04969039949999533*rho[6]*weight[8]-0.08606629658238704*rho[2]*weight[8]-0.04969039949999533*weight[6]*rho[8]-0.08606629658238704*weight[2]*rho[8]+0.11904761904761905*rho[7]*weight[7]+0.024845199749997667*rho[6]*weight[7]-0.04303314829119352*rho[3]*weight[7]+0.04303314829119352*rho[2]*weight[7]-0.074535599249993*rho[0]*weight[7]+0.024845199749997667*weight[6]*rho[7]-0.04303314829119352*weight[3]*rho[7]+0.04303314829119352*weight[2]*rho[7]-0.074535599249993*weight[0]*rho[7]+0.16666666666666669*rho[6]*weight[6]-0.09622504486493762*rho[3]*weight[6]+0.09622504486493762*rho[2]*weight[6]-0.05555555555555556*rho[0]*weight[6]-0.09622504486493762*weight[3]*rho[6]+0.09622504486493762*weight[2]*rho[6]-0.05555555555555556*weight[0]*rho[6]+0.1*rho[5]*weight[5]-0.03333333333333333*rho[4]*weight[5]+0.05773502691896258*rho[1]*weight[5]-0.03333333333333333*weight[4]*rho[5]+0.05773502691896258*weight[1]*rho[5]+0.1*rho[4]*weight[4]-0.05773502691896258*rho[1]*weight[4]-0.05773502691896258*weight[1]*rho[4]+0.16666666666666669*rho[3]*weight[3]-0.05555555555555556*rho[2]*weight[3]+0.09622504486493762*rho[0]*weight[3]-0.05555555555555556*weight[2]*rho[3]+0.09622504486493762*weight[0]*rho[3]+0.16666666666666669*rho[2]*weight[2]-0.09622504486493762*rho[0]*weight[2]-0.09622504486493762*weight[0]*rho[2]+0.1*rho[1]*weight[1]+0.16666666666666669*rho[0]*weight[0]); #else - bsrc[nodeOff+globalIdxs[1]] += 0.2*rho[7]*weight[7]-0.10327955589886445*rho[3]*weight[7]-0.10327955589886445*weight[3]*rho[7]+0.23809523809523808*rho[6]*weight[6]+0.07698003589195011*rho[5]*weight[6]-0.1374643498070538*rho[4]*weight[6]-0.14907119849998599*rho[2]*weight[6]+0.08606629658238704*rho[0]*weight[6]+0.07698003589195011*weight[5]*rho[6]-0.1374643498070538*weight[4]*rho[6]-0.14907119849998599*weight[2]*rho[6]+0.08606629658238704*weight[0]*rho[6]+0.3333333333333333*rho[5]*weight[5]-0.1721325931647741*rho[2]*weight[5]-0.1721325931647741*weight[2]*rho[5]+0.23809523809523808*rho[4]*weight[4]+0.08606629658238706*rho[2]*weight[4]-0.149071198499986*rho[0]*weight[4]+0.08606629658238706*weight[2]*rho[4]-0.149071198499986*weight[0]*rho[4]+0.2*rho[3]*weight[3]-0.11547005383792514*rho[1]*weight[3]-0.11547005383792514*weight[1]*rho[3]+0.3333333333333333*rho[2]*weight[2]-0.19245008972987523*rho[0]*weight[2]-0.19245008972987523*weight[0]*rho[2]+0.2*rho[1]*weight[1]+0.3333333333333333*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[13]] += 0.1*rho[19]*weight[19]-0.02666666666666667*rho[18]*weight[19]-0.05773502691896258*rho[15]*weight[19]+0.051639777949432225*rho[10]*weight[19]-0.029814239699997195*rho[5]*weight[19]-0.02666666666666667*weight[18]*rho[19]-0.05773502691896258*weight[15]*rho[19]+0.051639777949432225*weight[10]*rho[19]-0.029814239699997195*weight[5]*rho[19]+0.1*rho[18]*weight[18]+0.05773502691896258*rho[12]*weight[18]-0.051639777949432225*rho[10]*weight[18]-0.029814239699997195*rho[4]*weight[18]+0.05773502691896258*weight[12]*rho[18]-0.051639777949432225*weight[10]*rho[18]-0.029814239699997195*weight[4]*rho[18]+0.11904761904761905*rho[17]*weight[17]-0.03849001794597506*rho[16]*weight[17]+0.03849001794597506*rho[14]*weight[17]-0.06873217490352689*rho[13]*weight[17]+0.06873217490352689*rho[11]*weight[17]+0.022222222222222223*rho[9]*weight[17]+0.022222222222222223*rho[8]*weight[17]-0.03968253968253969*rho[7]*weight[17]-0.074535599249993*rho[6]*weight[17]+0.04303314829119352*rho[3]*weight[17]-0.04303314829119352*rho[2]*weight[17]+0.024845199749997667*rho[0]*weight[17]-0.03849001794597506*weight[16]*rho[17]+0.03849001794597506*weight[14]*rho[17]-0.06873217490352689*weight[13]*rho[17]+0.06873217490352689*weight[11]*rho[17]+0.022222222222222223*weight[9]*rho[17]+0.022222222222222223*weight[8]*rho[17]-0.03968253968253969*weight[7]*rho[17]-0.074535599249993*weight[6]*rho[17]+0.04303314829119352*weight[3]*rho[17]-0.04303314829119352*weight[2]*rho[17]+0.024845199749997667*weight[0]*rho[17]+0.16666666666666669*rho[16]*weight[16]-0.044444444444444446*rho[14]*weight[16]+0.022222222222222223*rho[13]*weight[16]-0.09622504486493764*rho[9]*weight[16]+0.08606629658238706*rho[6]*weight[16]-0.049690399499995326*rho[3]*weight[16]-0.044444444444444446*weight[14]*rho[16]+0.022222222222222223*weight[13]*rho[16]-0.09622504486493764*weight[9]*rho[16]+0.08606629658238706*weight[6]*rho[16]-0.049690399499995326*weight[3]*rho[16]+0.1*rho[15]*weight[15]-0.029814239699997195*rho[10]*weight[15]+0.05163977794943223*rho[5]*weight[15]-0.029814239699997195*weight[10]*rho[15]+0.05163977794943223*weight[5]*rho[15]+0.16666666666666669*rho[14]*weight[14]+0.022222222222222223*rho[11]*weight[14]+0.09622504486493764*rho[8]*weight[14]-0.08606629658238706*rho[6]*weight[14]-0.049690399499995326*rho[2]*weight[14]+0.022222222222222223*weight[11]*rho[14]+0.09622504486493764*weight[8]*rho[14]-0.08606629658238706*weight[6]*rho[14]-0.049690399499995326*weight[2]*rho[14]+0.11904761904761905*rho[13]*weight[13]-0.03968253968253969*rho[11]*weight[13]-0.03849001794597506*rho[9]*weight[13]+0.06873217490352689*rho[7]*weight[13]+0.04303314829119353*rho[6]*weight[13]-0.07453559924999299*rho[3]*weight[13]+0.024845199749997663*rho[2]*weight[13]-0.04303314829119353*rho[0]*weight[13]-0.03968253968253969*weight[11]*rho[13]-0.03849001794597506*weight[9]*rho[13]+0.06873217490352689*weight[7]*rho[13]+0.04303314829119353*weight[6]*rho[13]-0.07453559924999299*weight[3]*rho[13]+0.024845199749997663*weight[2]*rho[13]-0.04303314829119353*weight[0]*rho[13]+0.1*rho[12]*weight[12]-0.029814239699997195*rho[10]*weight[12]-0.05163977794943223*rho[4]*weight[12]-0.029814239699997195*weight[10]*rho[12]-0.05163977794943223*weight[4]*rho[12]+0.11904761904761905*rho[11]*weight[11]+0.03849001794597506*rho[8]*weight[11]-0.06873217490352689*rho[7]*weight[11]-0.04303314829119353*rho[6]*weight[11]+0.024845199749997663*rho[3]*weight[11]-0.07453559924999299*rho[2]*weight[11]+0.04303314829119353*rho[0]*weight[11]+0.03849001794597506*weight[8]*rho[11]-0.06873217490352689*weight[7]*rho[11]-0.04303314829119353*weight[6]*rho[11]+0.024845199749997663*weight[3]*rho[11]-0.07453559924999299*weight[2]*rho[11]+0.04303314829119353*weight[0]*rho[11]+0.1*rho[10]*weight[10]-0.05773502691896258*rho[5]*weight[10]+0.05773502691896258*rho[4]*weight[10]-0.03333333333333333*rho[1]*weight[10]-0.05773502691896258*weight[5]*rho[10]+0.05773502691896258*weight[4]*rho[10]-0.03333333333333333*weight[1]*rho[10]+0.16666666666666669*rho[9]*weight[9]-0.04969039949999533*rho[6]*weight[9]+0.08606629658238704*rho[3]*weight[9]-0.04969039949999533*weight[6]*rho[9]+0.08606629658238704*weight[3]*rho[9]+0.16666666666666669*rho[8]*weight[8]-0.04969039949999533*rho[6]*weight[8]-0.08606629658238704*rho[2]*weight[8]-0.04969039949999533*weight[6]*rho[8]-0.08606629658238704*weight[2]*rho[8]+0.11904761904761905*rho[7]*weight[7]+0.024845199749997667*rho[6]*weight[7]-0.04303314829119352*rho[3]*weight[7]+0.04303314829119352*rho[2]*weight[7]-0.074535599249993*rho[0]*weight[7]+0.024845199749997667*weight[6]*rho[7]-0.04303314829119352*weight[3]*rho[7]+0.04303314829119352*weight[2]*rho[7]-0.074535599249993*weight[0]*rho[7]+0.16666666666666669*rho[6]*weight[6]-0.09622504486493762*rho[3]*weight[6]+0.09622504486493762*rho[2]*weight[6]-0.05555555555555556*rho[0]*weight[6]-0.09622504486493762*weight[3]*rho[6]+0.09622504486493762*weight[2]*rho[6]-0.05555555555555556*weight[0]*rho[6]+0.1*rho[5]*weight[5]-0.03333333333333333*rho[4]*weight[5]+0.05773502691896258*rho[1]*weight[5]-0.03333333333333333*weight[4]*rho[5]+0.05773502691896258*weight[1]*rho[5]+0.1*rho[4]*weight[4]-0.05773502691896258*rho[1]*weight[4]-0.05773502691896258*weight[1]*rho[4]+0.16666666666666669*rho[3]*weight[3]-0.05555555555555556*rho[2]*weight[3]+0.09622504486493762*rho[0]*weight[3]-0.05555555555555556*weight[2]*rho[3]+0.09622504486493762*weight[0]*rho[3]+0.16666666666666669*rho[2]*weight[2]-0.09622504486493762*rho[0]*weight[2]-0.09622504486493762*weight[0]*rho[2]+0.1*rho[1]*weight[1]+0.16666666666666669*rho[0]*weight[0]; #endif #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[2]],0.030952380952380953*rho[7]*weight[7]-0.06666666666666667*rho[6]*weight[7]+0.07560539239387958*rho[5]*weight[7]+0.03849001794597506*rho[4]*weight[7]-0.07745966692414834*rho[3]*weight[7]-0.07453559924999299*rho[2]*weight[7]+0.07453559924999299*rho[1]*weight[7]+0.04303314829119352*rho[0]*weight[7]-0.06666666666666667*weight[6]*rho[7]+0.07560539239387958*weight[5]*rho[7]+0.03849001794597506*weight[4]*rho[7]-0.07745966692414834*weight[3]*rho[7]-0.07453559924999299*weight[2]*rho[7]+0.07453559924999299*weight[1]*rho[7]+0.04303314829119352*weight[0]*rho[7]+0.030952380952380953*rho[6]*weight[6]-0.03849001794597506*rho[5]*weight[6]-0.07560539239387958*rho[4]*weight[6]+0.07745966692414834*rho[3]*weight[6]+0.07453559924999299*rho[2]*weight[6]-0.07453559924999299*rho[1]*weight[6]-0.04303314829119352*rho[0]*weight[6]-0.03849001794597506*weight[5]*rho[6]-0.07560539239387958*weight[4]*rho[6]+0.07745966692414834*weight[3]*rho[6]+0.07453559924999299*weight[2]*rho[6]-0.07453559924999299*weight[1]*rho[6]-0.04303314829119352*weight[0]*rho[6]-0.03571428571428571*rho[5]*weight[5]-0.074535599249993*rho[3]*weight[5]-0.04303314829119353*rho[2]*weight[5]+0.04303314829119353*rho[1]*weight[5]+0.074535599249993*rho[0]*weight[5]-0.074535599249993*weight[3]*rho[5]-0.04303314829119353*weight[2]*rho[5]+0.04303314829119353*weight[1]*rho[5]+0.074535599249993*weight[0]*rho[5]-0.03571428571428571*rho[4]*weight[4]-0.074535599249993*rho[3]*weight[4]-0.04303314829119353*rho[2]*weight[4]+0.04303314829119353*rho[1]*weight[4]+0.074535599249993*rho[0]*weight[4]-0.074535599249993*weight[3]*rho[4]-0.04303314829119353*weight[2]*rho[4]+0.04303314829119353*weight[1]*rho[4]+0.074535599249993*weight[0]*rho[4]+0.05*rho[3]*weight[3]+0.08660254037844384*rho[2]*weight[3]-0.08660254037844384*rho[1]*weight[3]-0.08333333333333333*rho[0]*weight[3]+0.08660254037844384*weight[2]*rho[3]-0.08660254037844384*weight[1]*rho[3]-0.08333333333333333*weight[0]*rho[3]-0.016666666666666666*rho[2]*weight[2]-0.08333333333333333*rho[1]*weight[2]-0.04811252243246881*rho[0]*weight[2]-0.08333333333333333*weight[1]*rho[2]-0.04811252243246881*weight[0]*rho[2]-0.016666666666666666*rho[1]*weight[1]+0.04811252243246881*rho[0]*weight[1]+0.04811252243246881*weight[0]*rho[1]-0.08333333333333333*rho[0]*weight[0]); + atomicAdd(&bsrc[nodeOff+globalIdxs[14]],-(0.034523809523809526*rho[19]*weight[19])-0.02*rho[18]*weight[19]+0.02*rho[17]*weight[19]+0.008935182737458497*rho[16]*weight[19]-0.008935182737458497*rho[15]*weight[19]-0.01924500897298753*rho[14]*weight[19]-0.01924500897298753*rho[13]*weight[19]-0.01924500897298753*rho[12]*weight[19]+0.01924500897298753*rho[11]*weight[19]+0.012909944487358056*rho[10]*weight[19]-0.021825396825396828*rho[9]*weight[19]-0.011111111111111112*rho[8]*weight[19]-0.011111111111111112*rho[7]*weight[19]+0.022360679774997897*rho[6]*weight[19]-0.022360679774997897*rho[5]*weight[19]+0.0372677996249965*rho[4]*weight[19]-0.02151657414559676*rho[3]*weight[19]+0.02151657414559676*rho[2]*weight[19]-0.02151657414559676*rho[1]*weight[19]-0.012422599874998833*rho[0]*weight[19]-0.02*weight[18]*rho[19]+0.02*weight[17]*rho[19]+0.008935182737458497*weight[16]*rho[19]-0.008935182737458497*weight[15]*rho[19]-0.01924500897298753*weight[14]*rho[19]-0.01924500897298753*weight[13]*rho[19]-0.01924500897298753*weight[12]*rho[19]+0.01924500897298753*weight[11]*rho[19]+0.012909944487358056*weight[10]*rho[19]-0.021825396825396828*weight[9]*rho[19]-0.011111111111111112*weight[8]*rho[19]-0.011111111111111112*weight[7]*rho[19]+0.022360679774997897*weight[6]*rho[19]-0.022360679774997897*weight[5]*rho[19]+0.0372677996249965*weight[4]*rho[19]-0.02151657414559676*weight[3]*rho[19]+0.02151657414559676*weight[2]*rho[19]-0.02151657414559676*weight[1]*rho[19]-0.012422599874998833*weight[0]*rho[19]-0.034523809523809526*rho[18]*weight[18]-0.02*rho[17]*weight[18]-0.01924500897298753*rho[16]*weight[18]+0.01924500897298753*rho[15]*weight[18]+0.008935182737458497*rho[14]*weight[18]+0.01924500897298753*rho[13]*weight[18]+0.008935182737458497*rho[12]*weight[18]-0.01924500897298753*rho[11]*weight[18]-0.012909944487358056*rho[10]*weight[18]+0.011111111111111112*rho[9]*weight[18]+0.021825396825396828*rho[8]*weight[18]+0.011111111111111112*rho[7]*weight[18]-0.022360679774997897*rho[6]*weight[18]+0.0372677996249965*rho[5]*weight[18]-0.022360679774997897*rho[4]*weight[18]+0.02151657414559676*rho[3]*weight[18]-0.02151657414559676*rho[2]*weight[18]+0.02151657414559676*rho[1]*weight[18]+0.012422599874998833*rho[0]*weight[18]-0.02*weight[17]*rho[18]-0.01924500897298753*weight[16]*rho[18]+0.01924500897298753*weight[15]*rho[18]+0.008935182737458497*weight[14]*rho[18]+0.01924500897298753*weight[13]*rho[18]+0.008935182737458497*weight[12]*rho[18]-0.01924500897298753*weight[11]*rho[18]-0.012909944487358056*weight[10]*rho[18]+0.011111111111111112*weight[9]*rho[18]+0.021825396825396828*weight[8]*rho[18]+0.011111111111111112*weight[7]*rho[18]-0.022360679774997897*weight[6]*rho[18]+0.0372677996249965*weight[5]*rho[18]-0.022360679774997897*weight[4]*rho[18]+0.02151657414559676*weight[3]*rho[18]-0.02151657414559676*weight[2]*rho[18]+0.02151657414559676*weight[1]*rho[18]+0.012422599874998833*weight[0]*rho[18]-0.034523809523809526*rho[17]*weight[17]+0.01924500897298753*rho[16]*weight[17]-0.01924500897298753*rho[15]*weight[17]-0.01924500897298753*rho[14]*weight[17]-0.008935182737458497*rho[13]*weight[17]-0.01924500897298753*rho[12]*weight[17]+0.008935182737458497*rho[11]*weight[17]+0.012909944487358056*rho[10]*weight[17]-0.011111111111111112*rho[9]*weight[17]-0.011111111111111112*rho[8]*weight[17]-0.021825396825396828*rho[7]*weight[17]+0.0372677996249965*rho[6]*weight[17]-0.022360679774997897*rho[5]*weight[17]+0.022360679774997897*rho[4]*weight[17]-0.02151657414559676*rho[3]*weight[17]+0.02151657414559676*rho[2]*weight[17]-0.02151657414559676*rho[1]*weight[17]-0.012422599874998833*rho[0]*weight[17]+0.01924500897298753*weight[16]*rho[17]-0.01924500897298753*weight[15]*rho[17]-0.01924500897298753*weight[14]*rho[17]-0.008935182737458497*weight[13]*rho[17]-0.01924500897298753*weight[12]*rho[17]+0.008935182737458497*weight[11]*rho[17]+0.012909944487358056*weight[10]*rho[17]-0.011111111111111112*weight[9]*rho[17]-0.011111111111111112*weight[8]*rho[17]-0.021825396825396828*weight[7]*rho[17]+0.0372677996249965*weight[6]*rho[17]-0.022360679774997897*weight[5]*rho[17]+0.022360679774997897*weight[4]*rho[17]-0.02151657414559676*weight[3]*rho[17]+0.02151657414559676*weight[2]*rho[17]-0.02151657414559676*weight[1]*rho[17]-0.012422599874998833*weight[0]*rho[17]-0.06785714285714287*rho[16]*weight[16]-0.021825396825396828*rho[15]*weight[16]-0.011111111111111112*rho[14]*weight[16]-0.011111111111111112*rho[13]*weight[16]-0.011111111111111112*rho[12]*weight[16]+0.022360679774997897*rho[10]*weight[16]+0.010309826235529031*rho[9]*weight[16]-0.01924500897298753*rho[8]*weight[16]-0.004303314829119352*rho[6]*weight[16]-0.021516574145596764*rho[5]*weight[16]+0.021516574145596764*rho[4]*weight[16]-0.012422599874998832*rho[3]*weight[16]+0.037267799624996496*rho[2]*weight[16]-0.012422599874998832*rho[1]*weight[16]-0.021516574145596764*rho[0]*weight[16]-0.021825396825396828*weight[15]*rho[16]-0.011111111111111112*weight[14]*rho[16]-0.011111111111111112*weight[13]*rho[16]-0.011111111111111112*weight[12]*rho[16]+0.022360679774997897*weight[10]*rho[16]+0.010309826235529031*weight[9]*rho[16]-0.01924500897298753*weight[8]*rho[16]-0.004303314829119352*weight[6]*rho[16]-0.021516574145596764*weight[5]*rho[16]+0.021516574145596764*weight[4]*rho[16]-0.012422599874998832*weight[3]*rho[16]+0.037267799624996496*weight[2]*rho[16]-0.012422599874998832*weight[1]*rho[16]-0.021516574145596764*weight[0]*rho[16]-0.06785714285714287*rho[15]*weight[15]+0.011111111111111112*rho[14]*weight[15]+0.011111111111111112*rho[13]*weight[15]-0.011111111111111112*rho[11]*weight[15]-0.022360679774997897*rho[10]*weight[15]-0.010309826235529031*rho[9]*weight[15]+0.01924500897298753*rho[7]*weight[15]-0.021516574145596764*rho[6]*weight[15]-0.004303314829119352*rho[5]*weight[15]-0.021516574145596764*rho[4]*weight[15]+0.012422599874998832*rho[3]*weight[15]-0.012422599874998832*rho[2]*weight[15]+0.037267799624996496*rho[1]*weight[15]+0.021516574145596764*rho[0]*weight[15]+0.011111111111111112*weight[14]*rho[15]+0.011111111111111112*weight[13]*rho[15]-0.011111111111111112*weight[11]*rho[15]-0.022360679774997897*weight[10]*rho[15]-0.010309826235529031*weight[9]*rho[15]+0.01924500897298753*weight[7]*rho[15]-0.021516574145596764*weight[6]*rho[15]-0.004303314829119352*weight[5]*rho[15]-0.021516574145596764*weight[4]*rho[15]+0.012422599874998832*weight[3]*rho[15]-0.012422599874998832*weight[2]*rho[15]+0.037267799624996496*weight[1]*rho[15]+0.021516574145596764*weight[0]*rho[15]-0.06785714285714287*rho[14]*weight[14]+0.021825396825396828*rho[12]*weight[14]-0.011111111111111112*rho[11]*weight[14]-0.022360679774997897*rho[10]*weight[14]+0.01924500897298753*rho[9]*weight[14]-0.010309826235529031*rho[8]*weight[14]+0.004303314829119352*rho[6]*weight[14]+0.021516574145596764*rho[5]*weight[14]-0.021516574145596764*rho[4]*weight[14]+0.037267799624996496*rho[3]*weight[14]-0.012422599874998832*rho[2]*weight[14]+0.012422599874998832*rho[1]*weight[14]+0.021516574145596764*rho[0]*weight[14]+0.021825396825396828*weight[12]*rho[14]-0.011111111111111112*weight[11]*rho[14]-0.022360679774997897*weight[10]*rho[14]+0.01924500897298753*weight[9]*rho[14]-0.010309826235529031*weight[8]*rho[14]+0.004303314829119352*weight[6]*rho[14]+0.021516574145596764*weight[5]*rho[14]-0.021516574145596764*weight[4]*rho[14]+0.037267799624996496*weight[3]*rho[14]-0.012422599874998832*weight[2]*rho[14]+0.012422599874998832*weight[1]*rho[14]+0.021516574145596764*weight[0]*rho[14]-0.06785714285714287*rho[13]*weight[13]+0.011111111111111112*rho[12]*weight[13]-0.021825396825396828*rho[11]*weight[13]-0.022360679774997897*rho[10]*weight[13]+0.01924500897298753*rho[9]*weight[13]-0.010309826235529031*rho[7]*weight[13]-0.021516574145596764*rho[6]*weight[13]-0.004303314829119352*rho[5]*weight[13]-0.021516574145596764*rho[4]*weight[13]+0.037267799624996496*rho[3]*weight[13]-0.012422599874998832*rho[2]*weight[13]+0.012422599874998832*rho[1]*weight[13]+0.021516574145596764*rho[0]*weight[13]+0.011111111111111112*weight[12]*rho[13]-0.021825396825396828*weight[11]*rho[13]-0.022360679774997897*weight[10]*rho[13]+0.01924500897298753*weight[9]*rho[13]-0.010309826235529031*weight[7]*rho[13]-0.021516574145596764*weight[6]*rho[13]-0.004303314829119352*weight[5]*rho[13]-0.021516574145596764*weight[4]*rho[13]+0.037267799624996496*weight[3]*rho[13]-0.012422599874998832*weight[2]*rho[13]+0.012422599874998832*weight[1]*rho[13]+0.021516574145596764*weight[0]*rho[13]-0.06785714285714287*rho[12]*weight[12]-0.011111111111111112*rho[11]*weight[12]-0.022360679774997897*rho[10]*weight[12]-0.010309826235529031*rho[8]*weight[12]+0.01924500897298753*rho[7]*weight[12]-0.021516574145596764*rho[6]*weight[12]+0.021516574145596764*rho[5]*weight[12]+0.004303314829119352*rho[4]*weight[12]+0.012422599874998832*rho[3]*weight[12]-0.012422599874998832*rho[2]*weight[12]+0.037267799624996496*rho[1]*weight[12]+0.021516574145596764*rho[0]*weight[12]-0.011111111111111112*weight[11]*rho[12]-0.022360679774997897*weight[10]*rho[12]-0.010309826235529031*weight[8]*rho[12]+0.01924500897298753*weight[7]*rho[12]-0.021516574145596764*weight[6]*rho[12]+0.021516574145596764*weight[5]*rho[12]+0.004303314829119352*weight[4]*rho[12]+0.012422599874998832*weight[3]*rho[12]-0.012422599874998832*weight[2]*rho[12]+0.037267799624996496*weight[1]*rho[12]+0.021516574145596764*weight[0]*rho[12]-0.06785714285714287*rho[11]*weight[11]+0.022360679774997897*rho[10]*weight[11]-0.01924500897298753*rho[8]*weight[11]+0.010309826235529031*rho[7]*weight[11]+0.021516574145596764*rho[6]*weight[11]-0.021516574145596764*rho[5]*weight[11]-0.004303314829119352*rho[4]*weight[11]-0.012422599874998832*rho[3]*weight[11]+0.037267799624996496*rho[2]*weight[11]-0.012422599874998832*rho[1]*weight[11]-0.021516574145596764*rho[0]*weight[11]+0.022360679774997897*weight[10]*rho[11]-0.01924500897298753*weight[8]*rho[11]+0.010309826235529031*weight[7]*rho[11]+0.021516574145596764*weight[6]*rho[11]-0.021516574145596764*weight[5]*rho[11]-0.004303314829119352*weight[4]*rho[11]-0.012422599874998832*weight[3]*rho[11]+0.037267799624996496*weight[2]*rho[11]-0.012422599874998832*weight[1]*rho[11]-0.021516574145596764*weight[0]*rho[11]-0.025*rho[10]*weight[10]-0.02151657414559676*rho[9]*weight[10]-0.02151657414559676*rho[8]*weight[10]-0.02151657414559676*rho[7]*weight[10]+0.014433756729740645*rho[6]*weight[10]-0.014433756729740645*rho[5]*weight[10]+0.014433756729740645*rho[4]*weight[10]-0.025*rho[3]*weight[10]+0.025*rho[2]*weight[10]-0.025*rho[1]*weight[10]-0.024056261216234404*rho[0]*weight[10]-0.02151657414559676*weight[9]*rho[10]-0.02151657414559676*weight[8]*rho[10]-0.02151657414559676*weight[7]*rho[10]+0.014433756729740645*weight[6]*rho[10]-0.014433756729740645*weight[5]*rho[10]+0.014433756729740645*weight[4]*rho[10]-0.025*weight[3]*rho[10]+0.025*weight[2]*rho[10]-0.025*weight[1]*rho[10]-0.024056261216234404*weight[0]*rho[10]-0.10119047619047619*rho[9]*weight[9]-0.012422599874998833*rho[6]*weight[9]+0.012422599874998833*rho[5]*weight[9]-0.012422599874998833*rho[4]*weight[9]-0.02151657414559676*rho[3]*weight[9]-0.02151657414559676*rho[2]*weight[9]+0.02151657414559676*rho[1]*weight[9]+0.0372677996249965*rho[0]*weight[9]-0.012422599874998833*weight[6]*rho[9]+0.012422599874998833*weight[5]*rho[9]-0.012422599874998833*weight[4]*rho[9]-0.02151657414559676*weight[3]*rho[9]-0.02151657414559676*weight[2]*rho[9]+0.02151657414559676*weight[1]*rho[9]+0.0372677996249965*weight[0]*rho[9]-0.10119047619047619*rho[8]*weight[8]-0.012422599874998833*rho[6]*weight[8]+0.012422599874998833*rho[5]*weight[8]-0.012422599874998833*rho[4]*weight[8]+0.02151657414559676*rho[3]*weight[8]+0.02151657414559676*rho[2]*weight[8]+0.02151657414559676*rho[1]*weight[8]+0.0372677996249965*rho[0]*weight[8]-0.012422599874998833*weight[6]*rho[8]+0.012422599874998833*weight[5]*rho[8]-0.012422599874998833*weight[4]*rho[8]+0.02151657414559676*weight[3]*rho[8]+0.02151657414559676*weight[2]*rho[8]+0.02151657414559676*weight[1]*rho[8]+0.0372677996249965*weight[0]*rho[8]-0.10119047619047619*rho[7]*weight[7]-0.012422599874998833*rho[6]*weight[7]+0.012422599874998833*rho[5]*weight[7]-0.012422599874998833*rho[4]*weight[7]+0.02151657414559676*rho[3]*weight[7]-0.02151657414559676*rho[2]*weight[7]-0.02151657414559676*rho[1]*weight[7]+0.0372677996249965*rho[0]*weight[7]-0.012422599874998833*weight[6]*rho[7]+0.012422599874998833*weight[5]*rho[7]-0.012422599874998833*weight[4]*rho[7]+0.02151657414559676*weight[3]*rho[7]-0.02151657414559676*weight[2]*rho[7]-0.02151657414559676*weight[1]*rho[7]+0.0372677996249965*weight[0]*rho[7]-0.058333333333333334*rho[6]*weight[6]-0.025*rho[5]*weight[6]+0.025*rho[4]*weight[6]+0.004811252243246881*rho[3]*weight[6]-0.004811252243246881*rho[2]*weight[6]-0.024056261216234404*rho[1]*weight[6]-0.01388888888888889*rho[0]*weight[6]-0.025*weight[5]*rho[6]+0.025*weight[4]*rho[6]+0.004811252243246881*weight[3]*rho[6]-0.004811252243246881*weight[2]*rho[6]-0.024056261216234404*weight[1]*rho[6]-0.01388888888888889*weight[0]*rho[6]-0.058333333333333334*rho[5]*weight[5]-0.025*rho[4]*weight[5]-0.004811252243246881*rho[3]*weight[5]-0.024056261216234404*rho[2]*weight[5]-0.004811252243246881*rho[1]*weight[5]+0.01388888888888889*rho[0]*weight[5]-0.025*weight[4]*rho[5]-0.004811252243246881*weight[3]*rho[5]-0.024056261216234404*weight[2]*rho[5]-0.004811252243246881*weight[1]*rho[5]+0.01388888888888889*weight[0]*rho[5]-0.058333333333333334*rho[4]*weight[4]-0.024056261216234404*rho[3]*weight[4]-0.004811252243246881*rho[2]*weight[4]+0.004811252243246881*rho[1]*weight[4]-0.01388888888888889*rho[0]*weight[4]-0.024056261216234404*weight[3]*rho[4]-0.004811252243246881*weight[2]*rho[4]+0.004811252243246881*weight[1]*rho[4]-0.01388888888888889*weight[0]*rho[4]-0.09166666666666667*rho[3]*weight[3]-0.01388888888888889*rho[2]*weight[3]+0.01388888888888889*rho[1]*weight[3]-0.024056261216234404*rho[0]*weight[3]-0.01388888888888889*weight[2]*rho[3]+0.01388888888888889*weight[1]*rho[3]-0.024056261216234404*weight[0]*rho[3]-0.09166666666666667*rho[2]*weight[2]-0.01388888888888889*rho[1]*weight[2]+0.024056261216234404*rho[0]*weight[2]-0.01388888888888889*weight[1]*rho[2]+0.024056261216234404*weight[0]*rho[2]-0.09166666666666667*rho[1]*weight[1]-0.024056261216234404*rho[0]*weight[1]-0.024056261216234404*weight[0]*rho[1]-0.125*rho[0]*weight[0]); #else - bsrc[nodeOff+globalIdxs[2]] += 0.030952380952380953*rho[7]*weight[7]-0.06666666666666667*rho[6]*weight[7]+0.07560539239387958*rho[5]*weight[7]+0.03849001794597506*rho[4]*weight[7]-0.07745966692414834*rho[3]*weight[7]-0.07453559924999299*rho[2]*weight[7]+0.07453559924999299*rho[1]*weight[7]+0.04303314829119352*rho[0]*weight[7]-0.06666666666666667*weight[6]*rho[7]+0.07560539239387958*weight[5]*rho[7]+0.03849001794597506*weight[4]*rho[7]-0.07745966692414834*weight[3]*rho[7]-0.07453559924999299*weight[2]*rho[7]+0.07453559924999299*weight[1]*rho[7]+0.04303314829119352*weight[0]*rho[7]+0.030952380952380953*rho[6]*weight[6]-0.03849001794597506*rho[5]*weight[6]-0.07560539239387958*rho[4]*weight[6]+0.07745966692414834*rho[3]*weight[6]+0.07453559924999299*rho[2]*weight[6]-0.07453559924999299*rho[1]*weight[6]-0.04303314829119352*rho[0]*weight[6]-0.03849001794597506*weight[5]*rho[6]-0.07560539239387958*weight[4]*rho[6]+0.07745966692414834*weight[3]*rho[6]+0.07453559924999299*weight[2]*rho[6]-0.07453559924999299*weight[1]*rho[6]-0.04303314829119352*weight[0]*rho[6]-0.03571428571428571*rho[5]*weight[5]-0.074535599249993*rho[3]*weight[5]-0.04303314829119353*rho[2]*weight[5]+0.04303314829119353*rho[1]*weight[5]+0.074535599249993*rho[0]*weight[5]-0.074535599249993*weight[3]*rho[5]-0.04303314829119353*weight[2]*rho[5]+0.04303314829119353*weight[1]*rho[5]+0.074535599249993*weight[0]*rho[5]-0.03571428571428571*rho[4]*weight[4]-0.074535599249993*rho[3]*weight[4]-0.04303314829119353*rho[2]*weight[4]+0.04303314829119353*rho[1]*weight[4]+0.074535599249993*rho[0]*weight[4]-0.074535599249993*weight[3]*rho[4]-0.04303314829119353*weight[2]*rho[4]+0.04303314829119353*weight[1]*rho[4]+0.074535599249993*weight[0]*rho[4]+0.05*rho[3]*weight[3]+0.08660254037844384*rho[2]*weight[3]-0.08660254037844384*rho[1]*weight[3]-0.08333333333333333*rho[0]*weight[3]+0.08660254037844384*weight[2]*rho[3]-0.08660254037844384*weight[1]*rho[3]-0.08333333333333333*weight[0]*rho[3]-0.016666666666666666*rho[2]*weight[2]-0.08333333333333333*rho[1]*weight[2]-0.04811252243246881*rho[0]*weight[2]-0.08333333333333333*weight[1]*rho[2]-0.04811252243246881*weight[0]*rho[2]-0.016666666666666666*rho[1]*weight[1]+0.04811252243246881*rho[0]*weight[1]+0.04811252243246881*weight[0]*rho[1]-0.08333333333333333*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[14]] += -(0.034523809523809526*rho[19]*weight[19])-0.02*rho[18]*weight[19]+0.02*rho[17]*weight[19]+0.008935182737458497*rho[16]*weight[19]-0.008935182737458497*rho[15]*weight[19]-0.01924500897298753*rho[14]*weight[19]-0.01924500897298753*rho[13]*weight[19]-0.01924500897298753*rho[12]*weight[19]+0.01924500897298753*rho[11]*weight[19]+0.012909944487358056*rho[10]*weight[19]-0.021825396825396828*rho[9]*weight[19]-0.011111111111111112*rho[8]*weight[19]-0.011111111111111112*rho[7]*weight[19]+0.022360679774997897*rho[6]*weight[19]-0.022360679774997897*rho[5]*weight[19]+0.0372677996249965*rho[4]*weight[19]-0.02151657414559676*rho[3]*weight[19]+0.02151657414559676*rho[2]*weight[19]-0.02151657414559676*rho[1]*weight[19]-0.012422599874998833*rho[0]*weight[19]-0.02*weight[18]*rho[19]+0.02*weight[17]*rho[19]+0.008935182737458497*weight[16]*rho[19]-0.008935182737458497*weight[15]*rho[19]-0.01924500897298753*weight[14]*rho[19]-0.01924500897298753*weight[13]*rho[19]-0.01924500897298753*weight[12]*rho[19]+0.01924500897298753*weight[11]*rho[19]+0.012909944487358056*weight[10]*rho[19]-0.021825396825396828*weight[9]*rho[19]-0.011111111111111112*weight[8]*rho[19]-0.011111111111111112*weight[7]*rho[19]+0.022360679774997897*weight[6]*rho[19]-0.022360679774997897*weight[5]*rho[19]+0.0372677996249965*weight[4]*rho[19]-0.02151657414559676*weight[3]*rho[19]+0.02151657414559676*weight[2]*rho[19]-0.02151657414559676*weight[1]*rho[19]-0.012422599874998833*weight[0]*rho[19]-0.034523809523809526*rho[18]*weight[18]-0.02*rho[17]*weight[18]-0.01924500897298753*rho[16]*weight[18]+0.01924500897298753*rho[15]*weight[18]+0.008935182737458497*rho[14]*weight[18]+0.01924500897298753*rho[13]*weight[18]+0.008935182737458497*rho[12]*weight[18]-0.01924500897298753*rho[11]*weight[18]-0.012909944487358056*rho[10]*weight[18]+0.011111111111111112*rho[9]*weight[18]+0.021825396825396828*rho[8]*weight[18]+0.011111111111111112*rho[7]*weight[18]-0.022360679774997897*rho[6]*weight[18]+0.0372677996249965*rho[5]*weight[18]-0.022360679774997897*rho[4]*weight[18]+0.02151657414559676*rho[3]*weight[18]-0.02151657414559676*rho[2]*weight[18]+0.02151657414559676*rho[1]*weight[18]+0.012422599874998833*rho[0]*weight[18]-0.02*weight[17]*rho[18]-0.01924500897298753*weight[16]*rho[18]+0.01924500897298753*weight[15]*rho[18]+0.008935182737458497*weight[14]*rho[18]+0.01924500897298753*weight[13]*rho[18]+0.008935182737458497*weight[12]*rho[18]-0.01924500897298753*weight[11]*rho[18]-0.012909944487358056*weight[10]*rho[18]+0.011111111111111112*weight[9]*rho[18]+0.021825396825396828*weight[8]*rho[18]+0.011111111111111112*weight[7]*rho[18]-0.022360679774997897*weight[6]*rho[18]+0.0372677996249965*weight[5]*rho[18]-0.022360679774997897*weight[4]*rho[18]+0.02151657414559676*weight[3]*rho[18]-0.02151657414559676*weight[2]*rho[18]+0.02151657414559676*weight[1]*rho[18]+0.012422599874998833*weight[0]*rho[18]-0.034523809523809526*rho[17]*weight[17]+0.01924500897298753*rho[16]*weight[17]-0.01924500897298753*rho[15]*weight[17]-0.01924500897298753*rho[14]*weight[17]-0.008935182737458497*rho[13]*weight[17]-0.01924500897298753*rho[12]*weight[17]+0.008935182737458497*rho[11]*weight[17]+0.012909944487358056*rho[10]*weight[17]-0.011111111111111112*rho[9]*weight[17]-0.011111111111111112*rho[8]*weight[17]-0.021825396825396828*rho[7]*weight[17]+0.0372677996249965*rho[6]*weight[17]-0.022360679774997897*rho[5]*weight[17]+0.022360679774997897*rho[4]*weight[17]-0.02151657414559676*rho[3]*weight[17]+0.02151657414559676*rho[2]*weight[17]-0.02151657414559676*rho[1]*weight[17]-0.012422599874998833*rho[0]*weight[17]+0.01924500897298753*weight[16]*rho[17]-0.01924500897298753*weight[15]*rho[17]-0.01924500897298753*weight[14]*rho[17]-0.008935182737458497*weight[13]*rho[17]-0.01924500897298753*weight[12]*rho[17]+0.008935182737458497*weight[11]*rho[17]+0.012909944487358056*weight[10]*rho[17]-0.011111111111111112*weight[9]*rho[17]-0.011111111111111112*weight[8]*rho[17]-0.021825396825396828*weight[7]*rho[17]+0.0372677996249965*weight[6]*rho[17]-0.022360679774997897*weight[5]*rho[17]+0.022360679774997897*weight[4]*rho[17]-0.02151657414559676*weight[3]*rho[17]+0.02151657414559676*weight[2]*rho[17]-0.02151657414559676*weight[1]*rho[17]-0.012422599874998833*weight[0]*rho[17]-0.06785714285714287*rho[16]*weight[16]-0.021825396825396828*rho[15]*weight[16]-0.011111111111111112*rho[14]*weight[16]-0.011111111111111112*rho[13]*weight[16]-0.011111111111111112*rho[12]*weight[16]+0.022360679774997897*rho[10]*weight[16]+0.010309826235529031*rho[9]*weight[16]-0.01924500897298753*rho[8]*weight[16]-0.004303314829119352*rho[6]*weight[16]-0.021516574145596764*rho[5]*weight[16]+0.021516574145596764*rho[4]*weight[16]-0.012422599874998832*rho[3]*weight[16]+0.037267799624996496*rho[2]*weight[16]-0.012422599874998832*rho[1]*weight[16]-0.021516574145596764*rho[0]*weight[16]-0.021825396825396828*weight[15]*rho[16]-0.011111111111111112*weight[14]*rho[16]-0.011111111111111112*weight[13]*rho[16]-0.011111111111111112*weight[12]*rho[16]+0.022360679774997897*weight[10]*rho[16]+0.010309826235529031*weight[9]*rho[16]-0.01924500897298753*weight[8]*rho[16]-0.004303314829119352*weight[6]*rho[16]-0.021516574145596764*weight[5]*rho[16]+0.021516574145596764*weight[4]*rho[16]-0.012422599874998832*weight[3]*rho[16]+0.037267799624996496*weight[2]*rho[16]-0.012422599874998832*weight[1]*rho[16]-0.021516574145596764*weight[0]*rho[16]-0.06785714285714287*rho[15]*weight[15]+0.011111111111111112*rho[14]*weight[15]+0.011111111111111112*rho[13]*weight[15]-0.011111111111111112*rho[11]*weight[15]-0.022360679774997897*rho[10]*weight[15]-0.010309826235529031*rho[9]*weight[15]+0.01924500897298753*rho[7]*weight[15]-0.021516574145596764*rho[6]*weight[15]-0.004303314829119352*rho[5]*weight[15]-0.021516574145596764*rho[4]*weight[15]+0.012422599874998832*rho[3]*weight[15]-0.012422599874998832*rho[2]*weight[15]+0.037267799624996496*rho[1]*weight[15]+0.021516574145596764*rho[0]*weight[15]+0.011111111111111112*weight[14]*rho[15]+0.011111111111111112*weight[13]*rho[15]-0.011111111111111112*weight[11]*rho[15]-0.022360679774997897*weight[10]*rho[15]-0.010309826235529031*weight[9]*rho[15]+0.01924500897298753*weight[7]*rho[15]-0.021516574145596764*weight[6]*rho[15]-0.004303314829119352*weight[5]*rho[15]-0.021516574145596764*weight[4]*rho[15]+0.012422599874998832*weight[3]*rho[15]-0.012422599874998832*weight[2]*rho[15]+0.037267799624996496*weight[1]*rho[15]+0.021516574145596764*weight[0]*rho[15]-0.06785714285714287*rho[14]*weight[14]+0.021825396825396828*rho[12]*weight[14]-0.011111111111111112*rho[11]*weight[14]-0.022360679774997897*rho[10]*weight[14]+0.01924500897298753*rho[9]*weight[14]-0.010309826235529031*rho[8]*weight[14]+0.004303314829119352*rho[6]*weight[14]+0.021516574145596764*rho[5]*weight[14]-0.021516574145596764*rho[4]*weight[14]+0.037267799624996496*rho[3]*weight[14]-0.012422599874998832*rho[2]*weight[14]+0.012422599874998832*rho[1]*weight[14]+0.021516574145596764*rho[0]*weight[14]+0.021825396825396828*weight[12]*rho[14]-0.011111111111111112*weight[11]*rho[14]-0.022360679774997897*weight[10]*rho[14]+0.01924500897298753*weight[9]*rho[14]-0.010309826235529031*weight[8]*rho[14]+0.004303314829119352*weight[6]*rho[14]+0.021516574145596764*weight[5]*rho[14]-0.021516574145596764*weight[4]*rho[14]+0.037267799624996496*weight[3]*rho[14]-0.012422599874998832*weight[2]*rho[14]+0.012422599874998832*weight[1]*rho[14]+0.021516574145596764*weight[0]*rho[14]-0.06785714285714287*rho[13]*weight[13]+0.011111111111111112*rho[12]*weight[13]-0.021825396825396828*rho[11]*weight[13]-0.022360679774997897*rho[10]*weight[13]+0.01924500897298753*rho[9]*weight[13]-0.010309826235529031*rho[7]*weight[13]-0.021516574145596764*rho[6]*weight[13]-0.004303314829119352*rho[5]*weight[13]-0.021516574145596764*rho[4]*weight[13]+0.037267799624996496*rho[3]*weight[13]-0.012422599874998832*rho[2]*weight[13]+0.012422599874998832*rho[1]*weight[13]+0.021516574145596764*rho[0]*weight[13]+0.011111111111111112*weight[12]*rho[13]-0.021825396825396828*weight[11]*rho[13]-0.022360679774997897*weight[10]*rho[13]+0.01924500897298753*weight[9]*rho[13]-0.010309826235529031*weight[7]*rho[13]-0.021516574145596764*weight[6]*rho[13]-0.004303314829119352*weight[5]*rho[13]-0.021516574145596764*weight[4]*rho[13]+0.037267799624996496*weight[3]*rho[13]-0.012422599874998832*weight[2]*rho[13]+0.012422599874998832*weight[1]*rho[13]+0.021516574145596764*weight[0]*rho[13]-0.06785714285714287*rho[12]*weight[12]-0.011111111111111112*rho[11]*weight[12]-0.022360679774997897*rho[10]*weight[12]-0.010309826235529031*rho[8]*weight[12]+0.01924500897298753*rho[7]*weight[12]-0.021516574145596764*rho[6]*weight[12]+0.021516574145596764*rho[5]*weight[12]+0.004303314829119352*rho[4]*weight[12]+0.012422599874998832*rho[3]*weight[12]-0.012422599874998832*rho[2]*weight[12]+0.037267799624996496*rho[1]*weight[12]+0.021516574145596764*rho[0]*weight[12]-0.011111111111111112*weight[11]*rho[12]-0.022360679774997897*weight[10]*rho[12]-0.010309826235529031*weight[8]*rho[12]+0.01924500897298753*weight[7]*rho[12]-0.021516574145596764*weight[6]*rho[12]+0.021516574145596764*weight[5]*rho[12]+0.004303314829119352*weight[4]*rho[12]+0.012422599874998832*weight[3]*rho[12]-0.012422599874998832*weight[2]*rho[12]+0.037267799624996496*weight[1]*rho[12]+0.021516574145596764*weight[0]*rho[12]-0.06785714285714287*rho[11]*weight[11]+0.022360679774997897*rho[10]*weight[11]-0.01924500897298753*rho[8]*weight[11]+0.010309826235529031*rho[7]*weight[11]+0.021516574145596764*rho[6]*weight[11]-0.021516574145596764*rho[5]*weight[11]-0.004303314829119352*rho[4]*weight[11]-0.012422599874998832*rho[3]*weight[11]+0.037267799624996496*rho[2]*weight[11]-0.012422599874998832*rho[1]*weight[11]-0.021516574145596764*rho[0]*weight[11]+0.022360679774997897*weight[10]*rho[11]-0.01924500897298753*weight[8]*rho[11]+0.010309826235529031*weight[7]*rho[11]+0.021516574145596764*weight[6]*rho[11]-0.021516574145596764*weight[5]*rho[11]-0.004303314829119352*weight[4]*rho[11]-0.012422599874998832*weight[3]*rho[11]+0.037267799624996496*weight[2]*rho[11]-0.012422599874998832*weight[1]*rho[11]-0.021516574145596764*weight[0]*rho[11]-0.025*rho[10]*weight[10]-0.02151657414559676*rho[9]*weight[10]-0.02151657414559676*rho[8]*weight[10]-0.02151657414559676*rho[7]*weight[10]+0.014433756729740645*rho[6]*weight[10]-0.014433756729740645*rho[5]*weight[10]+0.014433756729740645*rho[4]*weight[10]-0.025*rho[3]*weight[10]+0.025*rho[2]*weight[10]-0.025*rho[1]*weight[10]-0.024056261216234404*rho[0]*weight[10]-0.02151657414559676*weight[9]*rho[10]-0.02151657414559676*weight[8]*rho[10]-0.02151657414559676*weight[7]*rho[10]+0.014433756729740645*weight[6]*rho[10]-0.014433756729740645*weight[5]*rho[10]+0.014433756729740645*weight[4]*rho[10]-0.025*weight[3]*rho[10]+0.025*weight[2]*rho[10]-0.025*weight[1]*rho[10]-0.024056261216234404*weight[0]*rho[10]-0.10119047619047619*rho[9]*weight[9]-0.012422599874998833*rho[6]*weight[9]+0.012422599874998833*rho[5]*weight[9]-0.012422599874998833*rho[4]*weight[9]-0.02151657414559676*rho[3]*weight[9]-0.02151657414559676*rho[2]*weight[9]+0.02151657414559676*rho[1]*weight[9]+0.0372677996249965*rho[0]*weight[9]-0.012422599874998833*weight[6]*rho[9]+0.012422599874998833*weight[5]*rho[9]-0.012422599874998833*weight[4]*rho[9]-0.02151657414559676*weight[3]*rho[9]-0.02151657414559676*weight[2]*rho[9]+0.02151657414559676*weight[1]*rho[9]+0.0372677996249965*weight[0]*rho[9]-0.10119047619047619*rho[8]*weight[8]-0.012422599874998833*rho[6]*weight[8]+0.012422599874998833*rho[5]*weight[8]-0.012422599874998833*rho[4]*weight[8]+0.02151657414559676*rho[3]*weight[8]+0.02151657414559676*rho[2]*weight[8]+0.02151657414559676*rho[1]*weight[8]+0.0372677996249965*rho[0]*weight[8]-0.012422599874998833*weight[6]*rho[8]+0.012422599874998833*weight[5]*rho[8]-0.012422599874998833*weight[4]*rho[8]+0.02151657414559676*weight[3]*rho[8]+0.02151657414559676*weight[2]*rho[8]+0.02151657414559676*weight[1]*rho[8]+0.0372677996249965*weight[0]*rho[8]-0.10119047619047619*rho[7]*weight[7]-0.012422599874998833*rho[6]*weight[7]+0.012422599874998833*rho[5]*weight[7]-0.012422599874998833*rho[4]*weight[7]+0.02151657414559676*rho[3]*weight[7]-0.02151657414559676*rho[2]*weight[7]-0.02151657414559676*rho[1]*weight[7]+0.0372677996249965*rho[0]*weight[7]-0.012422599874998833*weight[6]*rho[7]+0.012422599874998833*weight[5]*rho[7]-0.012422599874998833*weight[4]*rho[7]+0.02151657414559676*weight[3]*rho[7]-0.02151657414559676*weight[2]*rho[7]-0.02151657414559676*weight[1]*rho[7]+0.0372677996249965*weight[0]*rho[7]-0.058333333333333334*rho[6]*weight[6]-0.025*rho[5]*weight[6]+0.025*rho[4]*weight[6]+0.004811252243246881*rho[3]*weight[6]-0.004811252243246881*rho[2]*weight[6]-0.024056261216234404*rho[1]*weight[6]-0.01388888888888889*rho[0]*weight[6]-0.025*weight[5]*rho[6]+0.025*weight[4]*rho[6]+0.004811252243246881*weight[3]*rho[6]-0.004811252243246881*weight[2]*rho[6]-0.024056261216234404*weight[1]*rho[6]-0.01388888888888889*weight[0]*rho[6]-0.058333333333333334*rho[5]*weight[5]-0.025*rho[4]*weight[5]-0.004811252243246881*rho[3]*weight[5]-0.024056261216234404*rho[2]*weight[5]-0.004811252243246881*rho[1]*weight[5]+0.01388888888888889*rho[0]*weight[5]-0.025*weight[4]*rho[5]-0.004811252243246881*weight[3]*rho[5]-0.024056261216234404*weight[2]*rho[5]-0.004811252243246881*weight[1]*rho[5]+0.01388888888888889*weight[0]*rho[5]-0.058333333333333334*rho[4]*weight[4]-0.024056261216234404*rho[3]*weight[4]-0.004811252243246881*rho[2]*weight[4]+0.004811252243246881*rho[1]*weight[4]-0.01388888888888889*rho[0]*weight[4]-0.024056261216234404*weight[3]*rho[4]-0.004811252243246881*weight[2]*rho[4]+0.004811252243246881*weight[1]*rho[4]-0.01388888888888889*weight[0]*rho[4]-0.09166666666666667*rho[3]*weight[3]-0.01388888888888889*rho[2]*weight[3]+0.01388888888888889*rho[1]*weight[3]-0.024056261216234404*rho[0]*weight[3]-0.01388888888888889*weight[2]*rho[3]+0.01388888888888889*weight[1]*rho[3]-0.024056261216234404*weight[0]*rho[3]-0.09166666666666667*rho[2]*weight[2]-0.01388888888888889*rho[1]*weight[2]+0.024056261216234404*rho[0]*weight[2]-0.01388888888888889*weight[1]*rho[2]+0.024056261216234404*weight[0]*rho[2]-0.09166666666666667*rho[1]*weight[1]-0.024056261216234404*rho[0]*weight[1]-0.024056261216234404*weight[0]*rho[1]-0.125*rho[0]*weight[0]; #endif #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[3]],0.23809523809523808*rho[7]*weight[7]-0.1374643498070538*rho[5]*weight[7]+0.07698003589195011*rho[4]*weight[7]-0.14907119849998599*rho[1]*weight[7]+0.08606629658238704*rho[0]*weight[7]-0.1374643498070538*weight[5]*rho[7]+0.07698003589195011*weight[4]*rho[7]-0.14907119849998599*weight[1]*rho[7]+0.08606629658238704*weight[0]*rho[7]+0.2*rho[6]*weight[6]-0.10327955589886445*rho[3]*weight[6]-0.10327955589886445*weight[3]*rho[6]+0.23809523809523808*rho[5]*weight[5]+0.08606629658238706*rho[1]*weight[5]-0.149071198499986*rho[0]*weight[5]+0.08606629658238706*weight[1]*rho[5]-0.149071198499986*weight[0]*rho[5]+0.3333333333333333*rho[4]*weight[4]-0.1721325931647741*rho[1]*weight[4]-0.1721325931647741*weight[1]*rho[4]+0.2*rho[3]*weight[3]-0.11547005383792514*rho[2]*weight[3]-0.11547005383792514*weight[2]*rho[3]+0.2*rho[2]*weight[2]+0.3333333333333333*rho[1]*weight[1]-0.19245008972987523*rho[0]*weight[1]-0.19245008972987523*weight[0]*rho[1]+0.3333333333333333*rho[0]*weight[0]); + atomicAdd(&bsrc[nodeOff+globalIdxs[15]],0.1*rho[19]*weight[19]-0.02666666666666667*rho[17]*weight[19]-0.05773502691896258*rho[16]*weight[19]+0.051639777949432225*rho[10]*weight[19]-0.029814239699997195*rho[6]*weight[19]-0.02666666666666667*weight[17]*rho[19]-0.05773502691896258*weight[16]*rho[19]+0.051639777949432225*weight[10]*rho[19]-0.029814239699997195*weight[6]*rho[19]+0.11904761904761905*rho[18]*weight[18]-0.03849001794597506*rho[15]*weight[18]-0.06873217490352689*rho[14]*weight[18]+0.03849001794597506*rho[13]*weight[18]+0.06873217490352689*rho[12]*weight[18]+0.022222222222222223*rho[9]*weight[18]-0.03968253968253969*rho[8]*weight[18]+0.022222222222222223*rho[7]*weight[18]-0.074535599249993*rho[5]*weight[18]+0.04303314829119352*rho[3]*weight[18]-0.04303314829119352*rho[1]*weight[18]+0.024845199749997667*rho[0]*weight[18]-0.03849001794597506*weight[15]*rho[18]-0.06873217490352689*weight[14]*rho[18]+0.03849001794597506*weight[13]*rho[18]+0.06873217490352689*weight[12]*rho[18]+0.022222222222222223*weight[9]*rho[18]-0.03968253968253969*weight[8]*rho[18]+0.022222222222222223*weight[7]*rho[18]-0.074535599249993*weight[5]*rho[18]+0.04303314829119352*weight[3]*rho[18]-0.04303314829119352*weight[1]*rho[18]+0.024845199749997667*weight[0]*rho[18]+0.1*rho[17]*weight[17]+0.05773502691896258*rho[11]*weight[17]-0.051639777949432225*rho[10]*weight[17]-0.029814239699997195*rho[4]*weight[17]+0.05773502691896258*weight[11]*rho[17]-0.051639777949432225*weight[10]*rho[17]-0.029814239699997195*weight[4]*rho[17]+0.1*rho[16]*weight[16]-0.029814239699997195*rho[10]*weight[16]+0.05163977794943223*rho[6]*weight[16]-0.029814239699997195*weight[10]*rho[16]+0.05163977794943223*weight[6]*rho[16]+0.16666666666666669*rho[15]*weight[15]+0.022222222222222223*rho[14]*weight[15]-0.044444444444444446*rho[13]*weight[15]-0.09622504486493764*rho[9]*weight[15]+0.08606629658238706*rho[5]*weight[15]-0.049690399499995326*rho[3]*weight[15]+0.022222222222222223*weight[14]*rho[15]-0.044444444444444446*weight[13]*rho[15]-0.09622504486493764*weight[9]*rho[15]+0.08606629658238706*weight[5]*rho[15]-0.049690399499995326*weight[3]*rho[15]+0.11904761904761905*rho[14]*weight[14]-0.03968253968253969*rho[12]*weight[14]-0.03849001794597506*rho[9]*weight[14]+0.06873217490352689*rho[8]*weight[14]+0.04303314829119353*rho[5]*weight[14]-0.07453559924999299*rho[3]*weight[14]+0.024845199749997663*rho[1]*weight[14]-0.04303314829119353*rho[0]*weight[14]-0.03968253968253969*weight[12]*rho[14]-0.03849001794597506*weight[9]*rho[14]+0.06873217490352689*weight[8]*rho[14]+0.04303314829119353*weight[5]*rho[14]-0.07453559924999299*weight[3]*rho[14]+0.024845199749997663*weight[1]*rho[14]-0.04303314829119353*weight[0]*rho[14]+0.16666666666666669*rho[13]*weight[13]+0.022222222222222223*rho[12]*weight[13]+0.09622504486493764*rho[7]*weight[13]-0.08606629658238706*rho[5]*weight[13]-0.049690399499995326*rho[1]*weight[13]+0.022222222222222223*weight[12]*rho[13]+0.09622504486493764*weight[7]*rho[13]-0.08606629658238706*weight[5]*rho[13]-0.049690399499995326*weight[1]*rho[13]+0.11904761904761905*rho[12]*weight[12]-0.06873217490352689*rho[8]*weight[12]+0.03849001794597506*rho[7]*weight[12]-0.04303314829119353*rho[5]*weight[12]+0.024845199749997663*rho[3]*weight[12]-0.07453559924999299*rho[1]*weight[12]+0.04303314829119353*rho[0]*weight[12]-0.06873217490352689*weight[8]*rho[12]+0.03849001794597506*weight[7]*rho[12]-0.04303314829119353*weight[5]*rho[12]+0.024845199749997663*weight[3]*rho[12]-0.07453559924999299*weight[1]*rho[12]+0.04303314829119353*weight[0]*rho[12]+0.1*rho[11]*weight[11]-0.029814239699997195*rho[10]*weight[11]-0.05163977794943223*rho[4]*weight[11]-0.029814239699997195*weight[10]*rho[11]-0.05163977794943223*weight[4]*rho[11]+0.1*rho[10]*weight[10]-0.05773502691896258*rho[6]*weight[10]+0.05773502691896258*rho[4]*weight[10]-0.03333333333333333*rho[2]*weight[10]-0.05773502691896258*weight[6]*rho[10]+0.05773502691896258*weight[4]*rho[10]-0.03333333333333333*weight[2]*rho[10]+0.16666666666666669*rho[9]*weight[9]-0.04969039949999533*rho[5]*weight[9]+0.08606629658238704*rho[3]*weight[9]-0.04969039949999533*weight[5]*rho[9]+0.08606629658238704*weight[3]*rho[9]+0.11904761904761905*rho[8]*weight[8]+0.024845199749997667*rho[5]*weight[8]-0.04303314829119352*rho[3]*weight[8]+0.04303314829119352*rho[1]*weight[8]-0.074535599249993*rho[0]*weight[8]+0.024845199749997667*weight[5]*rho[8]-0.04303314829119352*weight[3]*rho[8]+0.04303314829119352*weight[1]*rho[8]-0.074535599249993*weight[0]*rho[8]+0.16666666666666669*rho[7]*weight[7]-0.04969039949999533*rho[5]*weight[7]-0.08606629658238704*rho[1]*weight[7]-0.04969039949999533*weight[5]*rho[7]-0.08606629658238704*weight[1]*rho[7]+0.1*rho[6]*weight[6]-0.03333333333333333*rho[4]*weight[6]+0.05773502691896258*rho[2]*weight[6]-0.03333333333333333*weight[4]*rho[6]+0.05773502691896258*weight[2]*rho[6]+0.16666666666666669*rho[5]*weight[5]-0.09622504486493762*rho[3]*weight[5]+0.09622504486493762*rho[1]*weight[5]-0.05555555555555556*rho[0]*weight[5]-0.09622504486493762*weight[3]*rho[5]+0.09622504486493762*weight[1]*rho[5]-0.05555555555555556*weight[0]*rho[5]+0.1*rho[4]*weight[4]-0.05773502691896258*rho[2]*weight[4]-0.05773502691896258*weight[2]*rho[4]+0.16666666666666669*rho[3]*weight[3]-0.05555555555555556*rho[1]*weight[3]+0.09622504486493762*rho[0]*weight[3]-0.05555555555555556*weight[1]*rho[3]+0.09622504486493762*weight[0]*rho[3]+0.1*rho[2]*weight[2]+0.16666666666666669*rho[1]*weight[1]-0.09622504486493762*rho[0]*weight[1]-0.09622504486493762*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]); #else - bsrc[nodeOff+globalIdxs[3]] += 0.23809523809523808*rho[7]*weight[7]-0.1374643498070538*rho[5]*weight[7]+0.07698003589195011*rho[4]*weight[7]-0.14907119849998599*rho[1]*weight[7]+0.08606629658238704*rho[0]*weight[7]-0.1374643498070538*weight[5]*rho[7]+0.07698003589195011*weight[4]*rho[7]-0.14907119849998599*weight[1]*rho[7]+0.08606629658238704*weight[0]*rho[7]+0.2*rho[6]*weight[6]-0.10327955589886445*rho[3]*weight[6]-0.10327955589886445*weight[3]*rho[6]+0.23809523809523808*rho[5]*weight[5]+0.08606629658238706*rho[1]*weight[5]-0.149071198499986*rho[0]*weight[5]+0.08606629658238706*weight[1]*rho[5]-0.149071198499986*weight[0]*rho[5]+0.3333333333333333*rho[4]*weight[4]-0.1721325931647741*rho[1]*weight[4]-0.1721325931647741*weight[1]*rho[4]+0.2*rho[3]*weight[3]-0.11547005383792514*rho[2]*weight[3]-0.11547005383792514*weight[2]*rho[3]+0.2*rho[2]*weight[2]+0.3333333333333333*rho[1]*weight[1]-0.19245008972987523*rho[0]*weight[1]-0.19245008972987523*weight[0]*rho[1]+0.3333333333333333*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[15]] += 0.1*rho[19]*weight[19]-0.02666666666666667*rho[17]*weight[19]-0.05773502691896258*rho[16]*weight[19]+0.051639777949432225*rho[10]*weight[19]-0.029814239699997195*rho[6]*weight[19]-0.02666666666666667*weight[17]*rho[19]-0.05773502691896258*weight[16]*rho[19]+0.051639777949432225*weight[10]*rho[19]-0.029814239699997195*weight[6]*rho[19]+0.11904761904761905*rho[18]*weight[18]-0.03849001794597506*rho[15]*weight[18]-0.06873217490352689*rho[14]*weight[18]+0.03849001794597506*rho[13]*weight[18]+0.06873217490352689*rho[12]*weight[18]+0.022222222222222223*rho[9]*weight[18]-0.03968253968253969*rho[8]*weight[18]+0.022222222222222223*rho[7]*weight[18]-0.074535599249993*rho[5]*weight[18]+0.04303314829119352*rho[3]*weight[18]-0.04303314829119352*rho[1]*weight[18]+0.024845199749997667*rho[0]*weight[18]-0.03849001794597506*weight[15]*rho[18]-0.06873217490352689*weight[14]*rho[18]+0.03849001794597506*weight[13]*rho[18]+0.06873217490352689*weight[12]*rho[18]+0.022222222222222223*weight[9]*rho[18]-0.03968253968253969*weight[8]*rho[18]+0.022222222222222223*weight[7]*rho[18]-0.074535599249993*weight[5]*rho[18]+0.04303314829119352*weight[3]*rho[18]-0.04303314829119352*weight[1]*rho[18]+0.024845199749997667*weight[0]*rho[18]+0.1*rho[17]*weight[17]+0.05773502691896258*rho[11]*weight[17]-0.051639777949432225*rho[10]*weight[17]-0.029814239699997195*rho[4]*weight[17]+0.05773502691896258*weight[11]*rho[17]-0.051639777949432225*weight[10]*rho[17]-0.029814239699997195*weight[4]*rho[17]+0.1*rho[16]*weight[16]-0.029814239699997195*rho[10]*weight[16]+0.05163977794943223*rho[6]*weight[16]-0.029814239699997195*weight[10]*rho[16]+0.05163977794943223*weight[6]*rho[16]+0.16666666666666669*rho[15]*weight[15]+0.022222222222222223*rho[14]*weight[15]-0.044444444444444446*rho[13]*weight[15]-0.09622504486493764*rho[9]*weight[15]+0.08606629658238706*rho[5]*weight[15]-0.049690399499995326*rho[3]*weight[15]+0.022222222222222223*weight[14]*rho[15]-0.044444444444444446*weight[13]*rho[15]-0.09622504486493764*weight[9]*rho[15]+0.08606629658238706*weight[5]*rho[15]-0.049690399499995326*weight[3]*rho[15]+0.11904761904761905*rho[14]*weight[14]-0.03968253968253969*rho[12]*weight[14]-0.03849001794597506*rho[9]*weight[14]+0.06873217490352689*rho[8]*weight[14]+0.04303314829119353*rho[5]*weight[14]-0.07453559924999299*rho[3]*weight[14]+0.024845199749997663*rho[1]*weight[14]-0.04303314829119353*rho[0]*weight[14]-0.03968253968253969*weight[12]*rho[14]-0.03849001794597506*weight[9]*rho[14]+0.06873217490352689*weight[8]*rho[14]+0.04303314829119353*weight[5]*rho[14]-0.07453559924999299*weight[3]*rho[14]+0.024845199749997663*weight[1]*rho[14]-0.04303314829119353*weight[0]*rho[14]+0.16666666666666669*rho[13]*weight[13]+0.022222222222222223*rho[12]*weight[13]+0.09622504486493764*rho[7]*weight[13]-0.08606629658238706*rho[5]*weight[13]-0.049690399499995326*rho[1]*weight[13]+0.022222222222222223*weight[12]*rho[13]+0.09622504486493764*weight[7]*rho[13]-0.08606629658238706*weight[5]*rho[13]-0.049690399499995326*weight[1]*rho[13]+0.11904761904761905*rho[12]*weight[12]-0.06873217490352689*rho[8]*weight[12]+0.03849001794597506*rho[7]*weight[12]-0.04303314829119353*rho[5]*weight[12]+0.024845199749997663*rho[3]*weight[12]-0.07453559924999299*rho[1]*weight[12]+0.04303314829119353*rho[0]*weight[12]-0.06873217490352689*weight[8]*rho[12]+0.03849001794597506*weight[7]*rho[12]-0.04303314829119353*weight[5]*rho[12]+0.024845199749997663*weight[3]*rho[12]-0.07453559924999299*weight[1]*rho[12]+0.04303314829119353*weight[0]*rho[12]+0.1*rho[11]*weight[11]-0.029814239699997195*rho[10]*weight[11]-0.05163977794943223*rho[4]*weight[11]-0.029814239699997195*weight[10]*rho[11]-0.05163977794943223*weight[4]*rho[11]+0.1*rho[10]*weight[10]-0.05773502691896258*rho[6]*weight[10]+0.05773502691896258*rho[4]*weight[10]-0.03333333333333333*rho[2]*weight[10]-0.05773502691896258*weight[6]*rho[10]+0.05773502691896258*weight[4]*rho[10]-0.03333333333333333*weight[2]*rho[10]+0.16666666666666669*rho[9]*weight[9]-0.04969039949999533*rho[5]*weight[9]+0.08606629658238704*rho[3]*weight[9]-0.04969039949999533*weight[5]*rho[9]+0.08606629658238704*weight[3]*rho[9]+0.11904761904761905*rho[8]*weight[8]+0.024845199749997667*rho[5]*weight[8]-0.04303314829119352*rho[3]*weight[8]+0.04303314829119352*rho[1]*weight[8]-0.074535599249993*rho[0]*weight[8]+0.024845199749997667*weight[5]*rho[8]-0.04303314829119352*weight[3]*rho[8]+0.04303314829119352*weight[1]*rho[8]-0.074535599249993*weight[0]*rho[8]+0.16666666666666669*rho[7]*weight[7]-0.04969039949999533*rho[5]*weight[7]-0.08606629658238704*rho[1]*weight[7]-0.04969039949999533*weight[5]*rho[7]-0.08606629658238704*weight[1]*rho[7]+0.1*rho[6]*weight[6]-0.03333333333333333*rho[4]*weight[6]+0.05773502691896258*rho[2]*weight[6]-0.03333333333333333*weight[4]*rho[6]+0.05773502691896258*weight[2]*rho[6]+0.16666666666666669*rho[5]*weight[5]-0.09622504486493762*rho[3]*weight[5]+0.09622504486493762*rho[1]*weight[5]-0.05555555555555556*rho[0]*weight[5]-0.09622504486493762*weight[3]*rho[5]+0.09622504486493762*weight[1]*rho[5]-0.05555555555555556*weight[0]*rho[5]+0.1*rho[4]*weight[4]-0.05773502691896258*rho[2]*weight[4]-0.05773502691896258*weight[2]*rho[4]+0.16666666666666669*rho[3]*weight[3]-0.05555555555555556*rho[1]*weight[3]+0.09622504486493762*rho[0]*weight[3]-0.05555555555555556*weight[1]*rho[3]+0.09622504486493762*weight[0]*rho[3]+0.1*rho[2]*weight[2]+0.16666666666666669*rho[1]*weight[1]-0.09622504486493762*rho[0]*weight[1]-0.09622504486493762*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]; #endif #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[4]],0.23809523809523808*rho[7]*weight[7]+0.1374643498070538*rho[5]*weight[7]-0.07698003589195011*rho[4]*weight[7]-0.14907119849998599*rho[1]*weight[7]-0.08606629658238704*rho[0]*weight[7]+0.1374643498070538*weight[5]*rho[7]-0.07698003589195011*weight[4]*rho[7]-0.14907119849998599*weight[1]*rho[7]-0.08606629658238704*weight[0]*rho[7]+0.2*rho[6]*weight[6]+0.10327955589886445*rho[3]*weight[6]+0.10327955589886445*weight[3]*rho[6]+0.23809523809523808*rho[5]*weight[5]-0.08606629658238706*rho[1]*weight[5]-0.149071198499986*rho[0]*weight[5]-0.08606629658238706*weight[1]*rho[5]-0.149071198499986*weight[0]*rho[5]+0.3333333333333333*rho[4]*weight[4]+0.1721325931647741*rho[1]*weight[4]+0.1721325931647741*weight[1]*rho[4]+0.2*rho[3]*weight[3]+0.11547005383792514*rho[2]*weight[3]+0.11547005383792514*weight[2]*rho[3]+0.2*rho[2]*weight[2]+0.3333333333333333*rho[1]*weight[1]+0.19245008972987523*rho[0]*weight[1]+0.19245008972987523*weight[0]*rho[1]+0.3333333333333333*rho[0]*weight[0]); + atomicAdd(&bsrc[nodeOff+globalIdxs[16]],0.1*rho[19]*weight[19]+0.02666666666666667*rho[17]*weight[19]+0.05773502691896258*rho[16]*weight[19]+0.051639777949432225*rho[10]*weight[19]+0.029814239699997195*rho[6]*weight[19]+0.02666666666666667*weight[17]*rho[19]+0.05773502691896258*weight[16]*rho[19]+0.051639777949432225*weight[10]*rho[19]+0.029814239699997195*weight[6]*rho[19]+0.11904761904761905*rho[18]*weight[18]-0.03849001794597506*rho[15]*weight[18]+0.06873217490352689*rho[14]*weight[18]-0.03849001794597506*rho[13]*weight[18]+0.06873217490352689*rho[12]*weight[18]-0.022222222222222223*rho[9]*weight[18]+0.03968253968253969*rho[8]*weight[18]-0.022222222222222223*rho[7]*weight[18]-0.074535599249993*rho[5]*weight[18]-0.04303314829119352*rho[3]*weight[18]-0.04303314829119352*rho[1]*weight[18]-0.024845199749997667*rho[0]*weight[18]-0.03849001794597506*weight[15]*rho[18]+0.06873217490352689*weight[14]*rho[18]-0.03849001794597506*weight[13]*rho[18]+0.06873217490352689*weight[12]*rho[18]-0.022222222222222223*weight[9]*rho[18]+0.03968253968253969*weight[8]*rho[18]-0.022222222222222223*weight[7]*rho[18]-0.074535599249993*weight[5]*rho[18]-0.04303314829119352*weight[3]*rho[18]-0.04303314829119352*weight[1]*rho[18]-0.024845199749997667*weight[0]*rho[18]+0.1*rho[17]*weight[17]+0.05773502691896258*rho[11]*weight[17]+0.051639777949432225*rho[10]*weight[17]+0.029814239699997195*rho[4]*weight[17]+0.05773502691896258*weight[11]*rho[17]+0.051639777949432225*weight[10]*rho[17]+0.029814239699997195*weight[4]*rho[17]+0.1*rho[16]*weight[16]+0.029814239699997195*rho[10]*weight[16]+0.05163977794943223*rho[6]*weight[16]+0.029814239699997195*weight[10]*rho[16]+0.05163977794943223*weight[6]*rho[16]+0.16666666666666669*rho[15]*weight[15]-0.022222222222222223*rho[14]*weight[15]+0.044444444444444446*rho[13]*weight[15]+0.09622504486493764*rho[9]*weight[15]+0.08606629658238706*rho[5]*weight[15]+0.049690399499995326*rho[3]*weight[15]-0.022222222222222223*weight[14]*rho[15]+0.044444444444444446*weight[13]*rho[15]+0.09622504486493764*weight[9]*rho[15]+0.08606629658238706*weight[5]*rho[15]+0.049690399499995326*weight[3]*rho[15]+0.11904761904761905*rho[14]*weight[14]+0.03968253968253969*rho[12]*weight[14]-0.03849001794597506*rho[9]*weight[14]+0.06873217490352689*rho[8]*weight[14]-0.04303314829119353*rho[5]*weight[14]-0.07453559924999299*rho[3]*weight[14]-0.024845199749997663*rho[1]*weight[14]-0.04303314829119353*rho[0]*weight[14]+0.03968253968253969*weight[12]*rho[14]-0.03849001794597506*weight[9]*rho[14]+0.06873217490352689*weight[8]*rho[14]-0.04303314829119353*weight[5]*rho[14]-0.07453559924999299*weight[3]*rho[14]-0.024845199749997663*weight[1]*rho[14]-0.04303314829119353*weight[0]*rho[14]+0.16666666666666669*rho[13]*weight[13]-0.022222222222222223*rho[12]*weight[13]+0.09622504486493764*rho[7]*weight[13]+0.08606629658238706*rho[5]*weight[13]+0.049690399499995326*rho[1]*weight[13]-0.022222222222222223*weight[12]*rho[13]+0.09622504486493764*weight[7]*rho[13]+0.08606629658238706*weight[5]*rho[13]+0.049690399499995326*weight[1]*rho[13]+0.11904761904761905*rho[12]*weight[12]+0.06873217490352689*rho[8]*weight[12]-0.03849001794597506*rho[7]*weight[12]-0.04303314829119353*rho[5]*weight[12]-0.024845199749997663*rho[3]*weight[12]-0.07453559924999299*rho[1]*weight[12]-0.04303314829119353*rho[0]*weight[12]+0.06873217490352689*weight[8]*rho[12]-0.03849001794597506*weight[7]*rho[12]-0.04303314829119353*weight[5]*rho[12]-0.024845199749997663*weight[3]*rho[12]-0.07453559924999299*weight[1]*rho[12]-0.04303314829119353*weight[0]*rho[12]+0.1*rho[11]*weight[11]+0.029814239699997195*rho[10]*weight[11]+0.05163977794943223*rho[4]*weight[11]+0.029814239699997195*weight[10]*rho[11]+0.05163977794943223*weight[4]*rho[11]+0.1*rho[10]*weight[10]+0.05773502691896258*rho[6]*weight[10]+0.05773502691896258*rho[4]*weight[10]+0.03333333333333333*rho[2]*weight[10]+0.05773502691896258*weight[6]*rho[10]+0.05773502691896258*weight[4]*rho[10]+0.03333333333333333*weight[2]*rho[10]+0.16666666666666669*rho[9]*weight[9]+0.04969039949999533*rho[5]*weight[9]+0.08606629658238704*rho[3]*weight[9]+0.04969039949999533*weight[5]*rho[9]+0.08606629658238704*weight[3]*rho[9]+0.11904761904761905*rho[8]*weight[8]-0.024845199749997667*rho[5]*weight[8]-0.04303314829119352*rho[3]*weight[8]-0.04303314829119352*rho[1]*weight[8]-0.074535599249993*rho[0]*weight[8]-0.024845199749997667*weight[5]*rho[8]-0.04303314829119352*weight[3]*rho[8]-0.04303314829119352*weight[1]*rho[8]-0.074535599249993*weight[0]*rho[8]+0.16666666666666669*rho[7]*weight[7]+0.04969039949999533*rho[5]*weight[7]+0.08606629658238704*rho[1]*weight[7]+0.04969039949999533*weight[5]*rho[7]+0.08606629658238704*weight[1]*rho[7]+0.1*rho[6]*weight[6]+0.03333333333333333*rho[4]*weight[6]+0.05773502691896258*rho[2]*weight[6]+0.03333333333333333*weight[4]*rho[6]+0.05773502691896258*weight[2]*rho[6]+0.16666666666666669*rho[5]*weight[5]+0.09622504486493762*rho[3]*weight[5]+0.09622504486493762*rho[1]*weight[5]+0.05555555555555556*rho[0]*weight[5]+0.09622504486493762*weight[3]*rho[5]+0.09622504486493762*weight[1]*rho[5]+0.05555555555555556*weight[0]*rho[5]+0.1*rho[4]*weight[4]+0.05773502691896258*rho[2]*weight[4]+0.05773502691896258*weight[2]*rho[4]+0.16666666666666669*rho[3]*weight[3]+0.05555555555555556*rho[1]*weight[3]+0.09622504486493762*rho[0]*weight[3]+0.05555555555555556*weight[1]*rho[3]+0.09622504486493762*weight[0]*rho[3]+0.1*rho[2]*weight[2]+0.16666666666666669*rho[1]*weight[1]+0.09622504486493762*rho[0]*weight[1]+0.09622504486493762*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]); #else - bsrc[nodeOff+globalIdxs[4]] += 0.23809523809523808*rho[7]*weight[7]+0.1374643498070538*rho[5]*weight[7]-0.07698003589195011*rho[4]*weight[7]-0.14907119849998599*rho[1]*weight[7]-0.08606629658238704*rho[0]*weight[7]+0.1374643498070538*weight[5]*rho[7]-0.07698003589195011*weight[4]*rho[7]-0.14907119849998599*weight[1]*rho[7]-0.08606629658238704*weight[0]*rho[7]+0.2*rho[6]*weight[6]+0.10327955589886445*rho[3]*weight[6]+0.10327955589886445*weight[3]*rho[6]+0.23809523809523808*rho[5]*weight[5]-0.08606629658238706*rho[1]*weight[5]-0.149071198499986*rho[0]*weight[5]-0.08606629658238706*weight[1]*rho[5]-0.149071198499986*weight[0]*rho[5]+0.3333333333333333*rho[4]*weight[4]+0.1721325931647741*rho[1]*weight[4]+0.1721325931647741*weight[1]*rho[4]+0.2*rho[3]*weight[3]+0.11547005383792514*rho[2]*weight[3]+0.11547005383792514*weight[2]*rho[3]+0.2*rho[2]*weight[2]+0.3333333333333333*rho[1]*weight[1]+0.19245008972987523*rho[0]*weight[1]+0.19245008972987523*weight[0]*rho[1]+0.3333333333333333*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[16]] += 0.1*rho[19]*weight[19]+0.02666666666666667*rho[17]*weight[19]+0.05773502691896258*rho[16]*weight[19]+0.051639777949432225*rho[10]*weight[19]+0.029814239699997195*rho[6]*weight[19]+0.02666666666666667*weight[17]*rho[19]+0.05773502691896258*weight[16]*rho[19]+0.051639777949432225*weight[10]*rho[19]+0.029814239699997195*weight[6]*rho[19]+0.11904761904761905*rho[18]*weight[18]-0.03849001794597506*rho[15]*weight[18]+0.06873217490352689*rho[14]*weight[18]-0.03849001794597506*rho[13]*weight[18]+0.06873217490352689*rho[12]*weight[18]-0.022222222222222223*rho[9]*weight[18]+0.03968253968253969*rho[8]*weight[18]-0.022222222222222223*rho[7]*weight[18]-0.074535599249993*rho[5]*weight[18]-0.04303314829119352*rho[3]*weight[18]-0.04303314829119352*rho[1]*weight[18]-0.024845199749997667*rho[0]*weight[18]-0.03849001794597506*weight[15]*rho[18]+0.06873217490352689*weight[14]*rho[18]-0.03849001794597506*weight[13]*rho[18]+0.06873217490352689*weight[12]*rho[18]-0.022222222222222223*weight[9]*rho[18]+0.03968253968253969*weight[8]*rho[18]-0.022222222222222223*weight[7]*rho[18]-0.074535599249993*weight[5]*rho[18]-0.04303314829119352*weight[3]*rho[18]-0.04303314829119352*weight[1]*rho[18]-0.024845199749997667*weight[0]*rho[18]+0.1*rho[17]*weight[17]+0.05773502691896258*rho[11]*weight[17]+0.051639777949432225*rho[10]*weight[17]+0.029814239699997195*rho[4]*weight[17]+0.05773502691896258*weight[11]*rho[17]+0.051639777949432225*weight[10]*rho[17]+0.029814239699997195*weight[4]*rho[17]+0.1*rho[16]*weight[16]+0.029814239699997195*rho[10]*weight[16]+0.05163977794943223*rho[6]*weight[16]+0.029814239699997195*weight[10]*rho[16]+0.05163977794943223*weight[6]*rho[16]+0.16666666666666669*rho[15]*weight[15]-0.022222222222222223*rho[14]*weight[15]+0.044444444444444446*rho[13]*weight[15]+0.09622504486493764*rho[9]*weight[15]+0.08606629658238706*rho[5]*weight[15]+0.049690399499995326*rho[3]*weight[15]-0.022222222222222223*weight[14]*rho[15]+0.044444444444444446*weight[13]*rho[15]+0.09622504486493764*weight[9]*rho[15]+0.08606629658238706*weight[5]*rho[15]+0.049690399499995326*weight[3]*rho[15]+0.11904761904761905*rho[14]*weight[14]+0.03968253968253969*rho[12]*weight[14]-0.03849001794597506*rho[9]*weight[14]+0.06873217490352689*rho[8]*weight[14]-0.04303314829119353*rho[5]*weight[14]-0.07453559924999299*rho[3]*weight[14]-0.024845199749997663*rho[1]*weight[14]-0.04303314829119353*rho[0]*weight[14]+0.03968253968253969*weight[12]*rho[14]-0.03849001794597506*weight[9]*rho[14]+0.06873217490352689*weight[8]*rho[14]-0.04303314829119353*weight[5]*rho[14]-0.07453559924999299*weight[3]*rho[14]-0.024845199749997663*weight[1]*rho[14]-0.04303314829119353*weight[0]*rho[14]+0.16666666666666669*rho[13]*weight[13]-0.022222222222222223*rho[12]*weight[13]+0.09622504486493764*rho[7]*weight[13]+0.08606629658238706*rho[5]*weight[13]+0.049690399499995326*rho[1]*weight[13]-0.022222222222222223*weight[12]*rho[13]+0.09622504486493764*weight[7]*rho[13]+0.08606629658238706*weight[5]*rho[13]+0.049690399499995326*weight[1]*rho[13]+0.11904761904761905*rho[12]*weight[12]+0.06873217490352689*rho[8]*weight[12]-0.03849001794597506*rho[7]*weight[12]-0.04303314829119353*rho[5]*weight[12]-0.024845199749997663*rho[3]*weight[12]-0.07453559924999299*rho[1]*weight[12]-0.04303314829119353*rho[0]*weight[12]+0.06873217490352689*weight[8]*rho[12]-0.03849001794597506*weight[7]*rho[12]-0.04303314829119353*weight[5]*rho[12]-0.024845199749997663*weight[3]*rho[12]-0.07453559924999299*weight[1]*rho[12]-0.04303314829119353*weight[0]*rho[12]+0.1*rho[11]*weight[11]+0.029814239699997195*rho[10]*weight[11]+0.05163977794943223*rho[4]*weight[11]+0.029814239699997195*weight[10]*rho[11]+0.05163977794943223*weight[4]*rho[11]+0.1*rho[10]*weight[10]+0.05773502691896258*rho[6]*weight[10]+0.05773502691896258*rho[4]*weight[10]+0.03333333333333333*rho[2]*weight[10]+0.05773502691896258*weight[6]*rho[10]+0.05773502691896258*weight[4]*rho[10]+0.03333333333333333*weight[2]*rho[10]+0.16666666666666669*rho[9]*weight[9]+0.04969039949999533*rho[5]*weight[9]+0.08606629658238704*rho[3]*weight[9]+0.04969039949999533*weight[5]*rho[9]+0.08606629658238704*weight[3]*rho[9]+0.11904761904761905*rho[8]*weight[8]-0.024845199749997667*rho[5]*weight[8]-0.04303314829119352*rho[3]*weight[8]-0.04303314829119352*rho[1]*weight[8]-0.074535599249993*rho[0]*weight[8]-0.024845199749997667*weight[5]*rho[8]-0.04303314829119352*weight[3]*rho[8]-0.04303314829119352*weight[1]*rho[8]-0.074535599249993*weight[0]*rho[8]+0.16666666666666669*rho[7]*weight[7]+0.04969039949999533*rho[5]*weight[7]+0.08606629658238704*rho[1]*weight[7]+0.04969039949999533*weight[5]*rho[7]+0.08606629658238704*weight[1]*rho[7]+0.1*rho[6]*weight[6]+0.03333333333333333*rho[4]*weight[6]+0.05773502691896258*rho[2]*weight[6]+0.03333333333333333*weight[4]*rho[6]+0.05773502691896258*weight[2]*rho[6]+0.16666666666666669*rho[5]*weight[5]+0.09622504486493762*rho[3]*weight[5]+0.09622504486493762*rho[1]*weight[5]+0.05555555555555556*rho[0]*weight[5]+0.09622504486493762*weight[3]*rho[5]+0.09622504486493762*weight[1]*rho[5]+0.05555555555555556*weight[0]*rho[5]+0.1*rho[4]*weight[4]+0.05773502691896258*rho[2]*weight[4]+0.05773502691896258*weight[2]*rho[4]+0.16666666666666669*rho[3]*weight[3]+0.05555555555555556*rho[1]*weight[3]+0.09622504486493762*rho[0]*weight[3]+0.05555555555555556*weight[1]*rho[3]+0.09622504486493762*weight[0]*rho[3]+0.1*rho[2]*weight[2]+0.16666666666666669*rho[1]*weight[1]+0.09622504486493762*rho[0]*weight[1]+0.09622504486493762*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]; #endif #ifdef __CUDA_ARCH__ - atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[5]],__double_as_longlong(-(1.9364916731037085*phiBC[7])+1.9364916731037085*phiBC[6]+1.118033988749895*phiBC[5]+1.118033988749895*phiBC[4]-1.5*phiBC[3]+0.8660254037844386*phiBC[2]-0.8660254037844386*phiBC[1]+0.5*phiBC[0])); + atomicAdd(&bsrc[nodeOff+globalIdxs[17]],-(0.034523809523809526*rho[19]*weight[19])+0.02*rho[18]*weight[19]-0.02*rho[17]*weight[19]-0.008935182737458497*rho[16]*weight[19]+0.008935182737458497*rho[15]*weight[19]-0.01924500897298753*rho[14]*weight[19]-0.01924500897298753*rho[13]*weight[19]+0.01924500897298753*rho[12]*weight[19]-0.01924500897298753*rho[11]*weight[19]+0.012909944487358056*rho[10]*weight[19]-0.021825396825396828*rho[9]*weight[19]-0.011111111111111112*rho[8]*weight[19]-0.011111111111111112*rho[7]*weight[19]-0.022360679774997897*rho[6]*weight[19]+0.022360679774997897*rho[5]*weight[19]+0.0372677996249965*rho[4]*weight[19]-0.02151657414559676*rho[3]*weight[19]-0.02151657414559676*rho[2]*weight[19]+0.02151657414559676*rho[1]*weight[19]-0.012422599874998833*rho[0]*weight[19]+0.02*weight[18]*rho[19]-0.02*weight[17]*rho[19]-0.008935182737458497*weight[16]*rho[19]+0.008935182737458497*weight[15]*rho[19]-0.01924500897298753*weight[14]*rho[19]-0.01924500897298753*weight[13]*rho[19]+0.01924500897298753*weight[12]*rho[19]-0.01924500897298753*weight[11]*rho[19]+0.012909944487358056*weight[10]*rho[19]-0.021825396825396828*weight[9]*rho[19]-0.011111111111111112*weight[8]*rho[19]-0.011111111111111112*weight[7]*rho[19]-0.022360679774997897*weight[6]*rho[19]+0.022360679774997897*weight[5]*rho[19]+0.0372677996249965*weight[4]*rho[19]-0.02151657414559676*weight[3]*rho[19]-0.02151657414559676*weight[2]*rho[19]+0.02151657414559676*weight[1]*rho[19]-0.012422599874998833*weight[0]*rho[19]-0.034523809523809526*rho[18]*weight[18]-0.02*rho[17]*weight[18]-0.01924500897298753*rho[16]*weight[18]+0.01924500897298753*rho[15]*weight[18]-0.008935182737458497*rho[14]*weight[18]-0.01924500897298753*rho[13]*weight[18]+0.008935182737458497*rho[12]*weight[18]-0.01924500897298753*rho[11]*weight[18]+0.012909944487358056*rho[10]*weight[18]-0.011111111111111112*rho[9]*weight[18]-0.021825396825396828*rho[8]*weight[18]-0.011111111111111112*rho[7]*weight[18]-0.022360679774997897*rho[6]*weight[18]+0.0372677996249965*rho[5]*weight[18]+0.022360679774997897*rho[4]*weight[18]-0.02151657414559676*rho[3]*weight[18]-0.02151657414559676*rho[2]*weight[18]+0.02151657414559676*rho[1]*weight[18]-0.012422599874998833*rho[0]*weight[18]-0.02*weight[17]*rho[18]-0.01924500897298753*weight[16]*rho[18]+0.01924500897298753*weight[15]*rho[18]-0.008935182737458497*weight[14]*rho[18]-0.01924500897298753*weight[13]*rho[18]+0.008935182737458497*weight[12]*rho[18]-0.01924500897298753*weight[11]*rho[18]+0.012909944487358056*weight[10]*rho[18]-0.011111111111111112*weight[9]*rho[18]-0.021825396825396828*weight[8]*rho[18]-0.011111111111111112*weight[7]*rho[18]-0.022360679774997897*weight[6]*rho[18]+0.0372677996249965*weight[5]*rho[18]+0.022360679774997897*weight[4]*rho[18]-0.02151657414559676*weight[3]*rho[18]-0.02151657414559676*weight[2]*rho[18]+0.02151657414559676*weight[1]*rho[18]-0.012422599874998833*weight[0]*rho[18]-0.034523809523809526*rho[17]*weight[17]+0.01924500897298753*rho[16]*weight[17]-0.01924500897298753*rho[15]*weight[17]+0.01924500897298753*rho[14]*weight[17]+0.008935182737458497*rho[13]*weight[17]-0.01924500897298753*rho[12]*weight[17]+0.008935182737458497*rho[11]*weight[17]-0.012909944487358056*rho[10]*weight[17]+0.011111111111111112*rho[9]*weight[17]+0.011111111111111112*rho[8]*weight[17]+0.021825396825396828*rho[7]*weight[17]+0.0372677996249965*rho[6]*weight[17]-0.022360679774997897*rho[5]*weight[17]-0.022360679774997897*rho[4]*weight[17]+0.02151657414559676*rho[3]*weight[17]+0.02151657414559676*rho[2]*weight[17]-0.02151657414559676*rho[1]*weight[17]+0.012422599874998833*rho[0]*weight[17]+0.01924500897298753*weight[16]*rho[17]-0.01924500897298753*weight[15]*rho[17]+0.01924500897298753*weight[14]*rho[17]+0.008935182737458497*weight[13]*rho[17]-0.01924500897298753*weight[12]*rho[17]+0.008935182737458497*weight[11]*rho[17]-0.012909944487358056*weight[10]*rho[17]+0.011111111111111112*weight[9]*rho[17]+0.011111111111111112*weight[8]*rho[17]+0.021825396825396828*weight[7]*rho[17]+0.0372677996249965*weight[6]*rho[17]-0.022360679774997897*weight[5]*rho[17]-0.022360679774997897*weight[4]*rho[17]+0.02151657414559676*weight[3]*rho[17]+0.02151657414559676*weight[2]*rho[17]-0.02151657414559676*weight[1]*rho[17]+0.012422599874998833*weight[0]*rho[17]-0.06785714285714287*rho[16]*weight[16]-0.021825396825396828*rho[15]*weight[16]+0.011111111111111112*rho[14]*weight[16]+0.011111111111111112*rho[13]*weight[16]-0.011111111111111112*rho[12]*weight[16]-0.022360679774997897*rho[10]*weight[16]-0.010309826235529031*rho[9]*weight[16]+0.01924500897298753*rho[8]*weight[16]-0.004303314829119352*rho[6]*weight[16]-0.021516574145596764*rho[5]*weight[16]-0.021516574145596764*rho[4]*weight[16]+0.012422599874998832*rho[3]*weight[16]+0.037267799624996496*rho[2]*weight[16]-0.012422599874998832*rho[1]*weight[16]+0.021516574145596764*rho[0]*weight[16]-0.021825396825396828*weight[15]*rho[16]+0.011111111111111112*weight[14]*rho[16]+0.011111111111111112*weight[13]*rho[16]-0.011111111111111112*weight[12]*rho[16]-0.022360679774997897*weight[10]*rho[16]-0.010309826235529031*weight[9]*rho[16]+0.01924500897298753*weight[8]*rho[16]-0.004303314829119352*weight[6]*rho[16]-0.021516574145596764*weight[5]*rho[16]-0.021516574145596764*weight[4]*rho[16]+0.012422599874998832*weight[3]*rho[16]+0.037267799624996496*weight[2]*rho[16]-0.012422599874998832*weight[1]*rho[16]+0.021516574145596764*weight[0]*rho[16]-0.06785714285714287*rho[15]*weight[15]-0.011111111111111112*rho[14]*weight[15]-0.011111111111111112*rho[13]*weight[15]-0.011111111111111112*rho[11]*weight[15]+0.022360679774997897*rho[10]*weight[15]+0.010309826235529031*rho[9]*weight[15]-0.01924500897298753*rho[7]*weight[15]-0.021516574145596764*rho[6]*weight[15]-0.004303314829119352*rho[5]*weight[15]+0.021516574145596764*rho[4]*weight[15]-0.012422599874998832*rho[3]*weight[15]-0.012422599874998832*rho[2]*weight[15]+0.037267799624996496*rho[1]*weight[15]-0.021516574145596764*rho[0]*weight[15]-0.011111111111111112*weight[14]*rho[15]-0.011111111111111112*weight[13]*rho[15]-0.011111111111111112*weight[11]*rho[15]+0.022360679774997897*weight[10]*rho[15]+0.010309826235529031*weight[9]*rho[15]-0.01924500897298753*weight[7]*rho[15]-0.021516574145596764*weight[6]*rho[15]-0.004303314829119352*weight[5]*rho[15]+0.021516574145596764*weight[4]*rho[15]-0.012422599874998832*weight[3]*rho[15]-0.012422599874998832*weight[2]*rho[15]+0.037267799624996496*weight[1]*rho[15]-0.021516574145596764*weight[0]*rho[15]-0.06785714285714287*rho[14]*weight[14]-0.021825396825396828*rho[12]*weight[14]+0.011111111111111112*rho[11]*weight[14]-0.022360679774997897*rho[10]*weight[14]+0.01924500897298753*rho[9]*weight[14]-0.010309826235529031*rho[8]*weight[14]-0.004303314829119352*rho[6]*weight[14]-0.021516574145596764*rho[5]*weight[14]-0.021516574145596764*rho[4]*weight[14]+0.037267799624996496*rho[3]*weight[14]+0.012422599874998832*rho[2]*weight[14]-0.012422599874998832*rho[1]*weight[14]+0.021516574145596764*rho[0]*weight[14]-0.021825396825396828*weight[12]*rho[14]+0.011111111111111112*weight[11]*rho[14]-0.022360679774997897*weight[10]*rho[14]+0.01924500897298753*weight[9]*rho[14]-0.010309826235529031*weight[8]*rho[14]-0.004303314829119352*weight[6]*rho[14]-0.021516574145596764*weight[5]*rho[14]-0.021516574145596764*weight[4]*rho[14]+0.037267799624996496*weight[3]*rho[14]+0.012422599874998832*weight[2]*rho[14]-0.012422599874998832*weight[1]*rho[14]+0.021516574145596764*weight[0]*rho[14]-0.06785714285714287*rho[13]*weight[13]-0.011111111111111112*rho[12]*weight[13]+0.021825396825396828*rho[11]*weight[13]-0.022360679774997897*rho[10]*weight[13]+0.01924500897298753*rho[9]*weight[13]-0.010309826235529031*rho[7]*weight[13]+0.021516574145596764*rho[6]*weight[13]+0.004303314829119352*rho[5]*weight[13]-0.021516574145596764*rho[4]*weight[13]+0.037267799624996496*rho[3]*weight[13]+0.012422599874998832*rho[2]*weight[13]-0.012422599874998832*rho[1]*weight[13]+0.021516574145596764*rho[0]*weight[13]-0.011111111111111112*weight[12]*rho[13]+0.021825396825396828*weight[11]*rho[13]-0.022360679774997897*weight[10]*rho[13]+0.01924500897298753*weight[9]*rho[13]-0.010309826235529031*weight[7]*rho[13]+0.021516574145596764*weight[6]*rho[13]+0.004303314829119352*weight[5]*rho[13]-0.021516574145596764*weight[4]*rho[13]+0.037267799624996496*weight[3]*rho[13]+0.012422599874998832*weight[2]*rho[13]-0.012422599874998832*weight[1]*rho[13]+0.021516574145596764*weight[0]*rho[13]-0.06785714285714287*rho[12]*weight[12]-0.011111111111111112*rho[11]*weight[12]+0.022360679774997897*rho[10]*weight[12]+0.010309826235529031*rho[8]*weight[12]-0.01924500897298753*rho[7]*weight[12]-0.021516574145596764*rho[6]*weight[12]+0.021516574145596764*rho[5]*weight[12]-0.004303314829119352*rho[4]*weight[12]-0.012422599874998832*rho[3]*weight[12]-0.012422599874998832*rho[2]*weight[12]+0.037267799624996496*rho[1]*weight[12]-0.021516574145596764*rho[0]*weight[12]-0.011111111111111112*weight[11]*rho[12]+0.022360679774997897*weight[10]*rho[12]+0.010309826235529031*weight[8]*rho[12]-0.01924500897298753*weight[7]*rho[12]-0.021516574145596764*weight[6]*rho[12]+0.021516574145596764*weight[5]*rho[12]-0.004303314829119352*weight[4]*rho[12]-0.012422599874998832*weight[3]*rho[12]-0.012422599874998832*weight[2]*rho[12]+0.037267799624996496*weight[1]*rho[12]-0.021516574145596764*weight[0]*rho[12]-0.06785714285714287*rho[11]*weight[11]-0.022360679774997897*rho[10]*weight[11]+0.01924500897298753*rho[8]*weight[11]-0.010309826235529031*rho[7]*weight[11]+0.021516574145596764*rho[6]*weight[11]-0.021516574145596764*rho[5]*weight[11]+0.004303314829119352*rho[4]*weight[11]+0.012422599874998832*rho[3]*weight[11]+0.037267799624996496*rho[2]*weight[11]-0.012422599874998832*rho[1]*weight[11]+0.021516574145596764*rho[0]*weight[11]-0.022360679774997897*weight[10]*rho[11]+0.01924500897298753*weight[8]*rho[11]-0.010309826235529031*weight[7]*rho[11]+0.021516574145596764*weight[6]*rho[11]-0.021516574145596764*weight[5]*rho[11]+0.004303314829119352*weight[4]*rho[11]+0.012422599874998832*weight[3]*rho[11]+0.037267799624996496*weight[2]*rho[11]-0.012422599874998832*weight[1]*rho[11]+0.021516574145596764*weight[0]*rho[11]-0.025*rho[10]*weight[10]-0.02151657414559676*rho[9]*weight[10]-0.02151657414559676*rho[8]*weight[10]-0.02151657414559676*rho[7]*weight[10]-0.014433756729740645*rho[6]*weight[10]+0.014433756729740645*rho[5]*weight[10]+0.014433756729740645*rho[4]*weight[10]-0.025*rho[3]*weight[10]-0.025*rho[2]*weight[10]+0.025*rho[1]*weight[10]-0.024056261216234404*rho[0]*weight[10]-0.02151657414559676*weight[9]*rho[10]-0.02151657414559676*weight[8]*rho[10]-0.02151657414559676*weight[7]*rho[10]-0.014433756729740645*weight[6]*rho[10]+0.014433756729740645*weight[5]*rho[10]+0.014433756729740645*weight[4]*rho[10]-0.025*weight[3]*rho[10]-0.025*weight[2]*rho[10]+0.025*weight[1]*rho[10]-0.024056261216234404*weight[0]*rho[10]-0.10119047619047619*rho[9]*weight[9]+0.012422599874998833*rho[6]*weight[9]-0.012422599874998833*rho[5]*weight[9]-0.012422599874998833*rho[4]*weight[9]-0.02151657414559676*rho[3]*weight[9]+0.02151657414559676*rho[2]*weight[9]-0.02151657414559676*rho[1]*weight[9]+0.0372677996249965*rho[0]*weight[9]+0.012422599874998833*weight[6]*rho[9]-0.012422599874998833*weight[5]*rho[9]-0.012422599874998833*weight[4]*rho[9]-0.02151657414559676*weight[3]*rho[9]+0.02151657414559676*weight[2]*rho[9]-0.02151657414559676*weight[1]*rho[9]+0.0372677996249965*weight[0]*rho[9]-0.10119047619047619*rho[8]*weight[8]+0.012422599874998833*rho[6]*weight[8]-0.012422599874998833*rho[5]*weight[8]-0.012422599874998833*rho[4]*weight[8]+0.02151657414559676*rho[3]*weight[8]-0.02151657414559676*rho[2]*weight[8]-0.02151657414559676*rho[1]*weight[8]+0.0372677996249965*rho[0]*weight[8]+0.012422599874998833*weight[6]*rho[8]-0.012422599874998833*weight[5]*rho[8]-0.012422599874998833*weight[4]*rho[8]+0.02151657414559676*weight[3]*rho[8]-0.02151657414559676*weight[2]*rho[8]-0.02151657414559676*weight[1]*rho[8]+0.0372677996249965*weight[0]*rho[8]-0.10119047619047619*rho[7]*weight[7]+0.012422599874998833*rho[6]*weight[7]-0.012422599874998833*rho[5]*weight[7]-0.012422599874998833*rho[4]*weight[7]+0.02151657414559676*rho[3]*weight[7]+0.02151657414559676*rho[2]*weight[7]+0.02151657414559676*rho[1]*weight[7]+0.0372677996249965*rho[0]*weight[7]+0.012422599874998833*weight[6]*rho[7]-0.012422599874998833*weight[5]*rho[7]-0.012422599874998833*weight[4]*rho[7]+0.02151657414559676*weight[3]*rho[7]+0.02151657414559676*weight[2]*rho[7]+0.02151657414559676*weight[1]*rho[7]+0.0372677996249965*weight[0]*rho[7]-0.058333333333333334*rho[6]*weight[6]-0.025*rho[5]*weight[6]-0.025*rho[4]*weight[6]-0.004811252243246881*rho[3]*weight[6]-0.004811252243246881*rho[2]*weight[6]-0.024056261216234404*rho[1]*weight[6]+0.01388888888888889*rho[0]*weight[6]-0.025*weight[5]*rho[6]-0.025*weight[4]*rho[6]-0.004811252243246881*weight[3]*rho[6]-0.004811252243246881*weight[2]*rho[6]-0.024056261216234404*weight[1]*rho[6]+0.01388888888888889*weight[0]*rho[6]-0.058333333333333334*rho[5]*weight[5]+0.025*rho[4]*weight[5]+0.004811252243246881*rho[3]*weight[5]-0.024056261216234404*rho[2]*weight[5]-0.004811252243246881*rho[1]*weight[5]-0.01388888888888889*rho[0]*weight[5]+0.025*weight[4]*rho[5]+0.004811252243246881*weight[3]*rho[5]-0.024056261216234404*weight[2]*rho[5]-0.004811252243246881*weight[1]*rho[5]-0.01388888888888889*weight[0]*rho[5]-0.058333333333333334*rho[4]*weight[4]-0.024056261216234404*rho[3]*weight[4]+0.004811252243246881*rho[2]*weight[4]-0.004811252243246881*rho[1]*weight[4]-0.01388888888888889*rho[0]*weight[4]-0.024056261216234404*weight[3]*rho[4]+0.004811252243246881*weight[2]*rho[4]-0.004811252243246881*weight[1]*rho[4]-0.01388888888888889*weight[0]*rho[4]-0.09166666666666667*rho[3]*weight[3]+0.01388888888888889*rho[2]*weight[3]-0.01388888888888889*rho[1]*weight[3]-0.024056261216234404*rho[0]*weight[3]+0.01388888888888889*weight[2]*rho[3]-0.01388888888888889*weight[1]*rho[3]-0.024056261216234404*weight[0]*rho[3]-0.09166666666666667*rho[2]*weight[2]-0.01388888888888889*rho[1]*weight[2]-0.024056261216234404*rho[0]*weight[2]-0.01388888888888889*weight[1]*rho[2]-0.024056261216234404*weight[0]*rho[2]-0.09166666666666667*rho[1]*weight[1]+0.024056261216234404*rho[0]*weight[1]+0.024056261216234404*weight[0]*rho[1]-0.125*rho[0]*weight[0]); #else - bsrc[nodeOff+globalIdxs[5]] = -(1.9364916731037085*phiBC[7])+1.9364916731037085*phiBC[6]+1.118033988749895*phiBC[5]+1.118033988749895*phiBC[4]-1.5*phiBC[3]+0.8660254037844386*phiBC[2]-0.8660254037844386*phiBC[1]+0.5*phiBC[0]; + bsrc[nodeOff+globalIdxs[17]] += -(0.034523809523809526*rho[19]*weight[19])+0.02*rho[18]*weight[19]-0.02*rho[17]*weight[19]-0.008935182737458497*rho[16]*weight[19]+0.008935182737458497*rho[15]*weight[19]-0.01924500897298753*rho[14]*weight[19]-0.01924500897298753*rho[13]*weight[19]+0.01924500897298753*rho[12]*weight[19]-0.01924500897298753*rho[11]*weight[19]+0.012909944487358056*rho[10]*weight[19]-0.021825396825396828*rho[9]*weight[19]-0.011111111111111112*rho[8]*weight[19]-0.011111111111111112*rho[7]*weight[19]-0.022360679774997897*rho[6]*weight[19]+0.022360679774997897*rho[5]*weight[19]+0.0372677996249965*rho[4]*weight[19]-0.02151657414559676*rho[3]*weight[19]-0.02151657414559676*rho[2]*weight[19]+0.02151657414559676*rho[1]*weight[19]-0.012422599874998833*rho[0]*weight[19]+0.02*weight[18]*rho[19]-0.02*weight[17]*rho[19]-0.008935182737458497*weight[16]*rho[19]+0.008935182737458497*weight[15]*rho[19]-0.01924500897298753*weight[14]*rho[19]-0.01924500897298753*weight[13]*rho[19]+0.01924500897298753*weight[12]*rho[19]-0.01924500897298753*weight[11]*rho[19]+0.012909944487358056*weight[10]*rho[19]-0.021825396825396828*weight[9]*rho[19]-0.011111111111111112*weight[8]*rho[19]-0.011111111111111112*weight[7]*rho[19]-0.022360679774997897*weight[6]*rho[19]+0.022360679774997897*weight[5]*rho[19]+0.0372677996249965*weight[4]*rho[19]-0.02151657414559676*weight[3]*rho[19]-0.02151657414559676*weight[2]*rho[19]+0.02151657414559676*weight[1]*rho[19]-0.012422599874998833*weight[0]*rho[19]-0.034523809523809526*rho[18]*weight[18]-0.02*rho[17]*weight[18]-0.01924500897298753*rho[16]*weight[18]+0.01924500897298753*rho[15]*weight[18]-0.008935182737458497*rho[14]*weight[18]-0.01924500897298753*rho[13]*weight[18]+0.008935182737458497*rho[12]*weight[18]-0.01924500897298753*rho[11]*weight[18]+0.012909944487358056*rho[10]*weight[18]-0.011111111111111112*rho[9]*weight[18]-0.021825396825396828*rho[8]*weight[18]-0.011111111111111112*rho[7]*weight[18]-0.022360679774997897*rho[6]*weight[18]+0.0372677996249965*rho[5]*weight[18]+0.022360679774997897*rho[4]*weight[18]-0.02151657414559676*rho[3]*weight[18]-0.02151657414559676*rho[2]*weight[18]+0.02151657414559676*rho[1]*weight[18]-0.012422599874998833*rho[0]*weight[18]-0.02*weight[17]*rho[18]-0.01924500897298753*weight[16]*rho[18]+0.01924500897298753*weight[15]*rho[18]-0.008935182737458497*weight[14]*rho[18]-0.01924500897298753*weight[13]*rho[18]+0.008935182737458497*weight[12]*rho[18]-0.01924500897298753*weight[11]*rho[18]+0.012909944487358056*weight[10]*rho[18]-0.011111111111111112*weight[9]*rho[18]-0.021825396825396828*weight[8]*rho[18]-0.011111111111111112*weight[7]*rho[18]-0.022360679774997897*weight[6]*rho[18]+0.0372677996249965*weight[5]*rho[18]+0.022360679774997897*weight[4]*rho[18]-0.02151657414559676*weight[3]*rho[18]-0.02151657414559676*weight[2]*rho[18]+0.02151657414559676*weight[1]*rho[18]-0.012422599874998833*weight[0]*rho[18]-0.034523809523809526*rho[17]*weight[17]+0.01924500897298753*rho[16]*weight[17]-0.01924500897298753*rho[15]*weight[17]+0.01924500897298753*rho[14]*weight[17]+0.008935182737458497*rho[13]*weight[17]-0.01924500897298753*rho[12]*weight[17]+0.008935182737458497*rho[11]*weight[17]-0.012909944487358056*rho[10]*weight[17]+0.011111111111111112*rho[9]*weight[17]+0.011111111111111112*rho[8]*weight[17]+0.021825396825396828*rho[7]*weight[17]+0.0372677996249965*rho[6]*weight[17]-0.022360679774997897*rho[5]*weight[17]-0.022360679774997897*rho[4]*weight[17]+0.02151657414559676*rho[3]*weight[17]+0.02151657414559676*rho[2]*weight[17]-0.02151657414559676*rho[1]*weight[17]+0.012422599874998833*rho[0]*weight[17]+0.01924500897298753*weight[16]*rho[17]-0.01924500897298753*weight[15]*rho[17]+0.01924500897298753*weight[14]*rho[17]+0.008935182737458497*weight[13]*rho[17]-0.01924500897298753*weight[12]*rho[17]+0.008935182737458497*weight[11]*rho[17]-0.012909944487358056*weight[10]*rho[17]+0.011111111111111112*weight[9]*rho[17]+0.011111111111111112*weight[8]*rho[17]+0.021825396825396828*weight[7]*rho[17]+0.0372677996249965*weight[6]*rho[17]-0.022360679774997897*weight[5]*rho[17]-0.022360679774997897*weight[4]*rho[17]+0.02151657414559676*weight[3]*rho[17]+0.02151657414559676*weight[2]*rho[17]-0.02151657414559676*weight[1]*rho[17]+0.012422599874998833*weight[0]*rho[17]-0.06785714285714287*rho[16]*weight[16]-0.021825396825396828*rho[15]*weight[16]+0.011111111111111112*rho[14]*weight[16]+0.011111111111111112*rho[13]*weight[16]-0.011111111111111112*rho[12]*weight[16]-0.022360679774997897*rho[10]*weight[16]-0.010309826235529031*rho[9]*weight[16]+0.01924500897298753*rho[8]*weight[16]-0.004303314829119352*rho[6]*weight[16]-0.021516574145596764*rho[5]*weight[16]-0.021516574145596764*rho[4]*weight[16]+0.012422599874998832*rho[3]*weight[16]+0.037267799624996496*rho[2]*weight[16]-0.012422599874998832*rho[1]*weight[16]+0.021516574145596764*rho[0]*weight[16]-0.021825396825396828*weight[15]*rho[16]+0.011111111111111112*weight[14]*rho[16]+0.011111111111111112*weight[13]*rho[16]-0.011111111111111112*weight[12]*rho[16]-0.022360679774997897*weight[10]*rho[16]-0.010309826235529031*weight[9]*rho[16]+0.01924500897298753*weight[8]*rho[16]-0.004303314829119352*weight[6]*rho[16]-0.021516574145596764*weight[5]*rho[16]-0.021516574145596764*weight[4]*rho[16]+0.012422599874998832*weight[3]*rho[16]+0.037267799624996496*weight[2]*rho[16]-0.012422599874998832*weight[1]*rho[16]+0.021516574145596764*weight[0]*rho[16]-0.06785714285714287*rho[15]*weight[15]-0.011111111111111112*rho[14]*weight[15]-0.011111111111111112*rho[13]*weight[15]-0.011111111111111112*rho[11]*weight[15]+0.022360679774997897*rho[10]*weight[15]+0.010309826235529031*rho[9]*weight[15]-0.01924500897298753*rho[7]*weight[15]-0.021516574145596764*rho[6]*weight[15]-0.004303314829119352*rho[5]*weight[15]+0.021516574145596764*rho[4]*weight[15]-0.012422599874998832*rho[3]*weight[15]-0.012422599874998832*rho[2]*weight[15]+0.037267799624996496*rho[1]*weight[15]-0.021516574145596764*rho[0]*weight[15]-0.011111111111111112*weight[14]*rho[15]-0.011111111111111112*weight[13]*rho[15]-0.011111111111111112*weight[11]*rho[15]+0.022360679774997897*weight[10]*rho[15]+0.010309826235529031*weight[9]*rho[15]-0.01924500897298753*weight[7]*rho[15]-0.021516574145596764*weight[6]*rho[15]-0.004303314829119352*weight[5]*rho[15]+0.021516574145596764*weight[4]*rho[15]-0.012422599874998832*weight[3]*rho[15]-0.012422599874998832*weight[2]*rho[15]+0.037267799624996496*weight[1]*rho[15]-0.021516574145596764*weight[0]*rho[15]-0.06785714285714287*rho[14]*weight[14]-0.021825396825396828*rho[12]*weight[14]+0.011111111111111112*rho[11]*weight[14]-0.022360679774997897*rho[10]*weight[14]+0.01924500897298753*rho[9]*weight[14]-0.010309826235529031*rho[8]*weight[14]-0.004303314829119352*rho[6]*weight[14]-0.021516574145596764*rho[5]*weight[14]-0.021516574145596764*rho[4]*weight[14]+0.037267799624996496*rho[3]*weight[14]+0.012422599874998832*rho[2]*weight[14]-0.012422599874998832*rho[1]*weight[14]+0.021516574145596764*rho[0]*weight[14]-0.021825396825396828*weight[12]*rho[14]+0.011111111111111112*weight[11]*rho[14]-0.022360679774997897*weight[10]*rho[14]+0.01924500897298753*weight[9]*rho[14]-0.010309826235529031*weight[8]*rho[14]-0.004303314829119352*weight[6]*rho[14]-0.021516574145596764*weight[5]*rho[14]-0.021516574145596764*weight[4]*rho[14]+0.037267799624996496*weight[3]*rho[14]+0.012422599874998832*weight[2]*rho[14]-0.012422599874998832*weight[1]*rho[14]+0.021516574145596764*weight[0]*rho[14]-0.06785714285714287*rho[13]*weight[13]-0.011111111111111112*rho[12]*weight[13]+0.021825396825396828*rho[11]*weight[13]-0.022360679774997897*rho[10]*weight[13]+0.01924500897298753*rho[9]*weight[13]-0.010309826235529031*rho[7]*weight[13]+0.021516574145596764*rho[6]*weight[13]+0.004303314829119352*rho[5]*weight[13]-0.021516574145596764*rho[4]*weight[13]+0.037267799624996496*rho[3]*weight[13]+0.012422599874998832*rho[2]*weight[13]-0.012422599874998832*rho[1]*weight[13]+0.021516574145596764*rho[0]*weight[13]-0.011111111111111112*weight[12]*rho[13]+0.021825396825396828*weight[11]*rho[13]-0.022360679774997897*weight[10]*rho[13]+0.01924500897298753*weight[9]*rho[13]-0.010309826235529031*weight[7]*rho[13]+0.021516574145596764*weight[6]*rho[13]+0.004303314829119352*weight[5]*rho[13]-0.021516574145596764*weight[4]*rho[13]+0.037267799624996496*weight[3]*rho[13]+0.012422599874998832*weight[2]*rho[13]-0.012422599874998832*weight[1]*rho[13]+0.021516574145596764*weight[0]*rho[13]-0.06785714285714287*rho[12]*weight[12]-0.011111111111111112*rho[11]*weight[12]+0.022360679774997897*rho[10]*weight[12]+0.010309826235529031*rho[8]*weight[12]-0.01924500897298753*rho[7]*weight[12]-0.021516574145596764*rho[6]*weight[12]+0.021516574145596764*rho[5]*weight[12]-0.004303314829119352*rho[4]*weight[12]-0.012422599874998832*rho[3]*weight[12]-0.012422599874998832*rho[2]*weight[12]+0.037267799624996496*rho[1]*weight[12]-0.021516574145596764*rho[0]*weight[12]-0.011111111111111112*weight[11]*rho[12]+0.022360679774997897*weight[10]*rho[12]+0.010309826235529031*weight[8]*rho[12]-0.01924500897298753*weight[7]*rho[12]-0.021516574145596764*weight[6]*rho[12]+0.021516574145596764*weight[5]*rho[12]-0.004303314829119352*weight[4]*rho[12]-0.012422599874998832*weight[3]*rho[12]-0.012422599874998832*weight[2]*rho[12]+0.037267799624996496*weight[1]*rho[12]-0.021516574145596764*weight[0]*rho[12]-0.06785714285714287*rho[11]*weight[11]-0.022360679774997897*rho[10]*weight[11]+0.01924500897298753*rho[8]*weight[11]-0.010309826235529031*rho[7]*weight[11]+0.021516574145596764*rho[6]*weight[11]-0.021516574145596764*rho[5]*weight[11]+0.004303314829119352*rho[4]*weight[11]+0.012422599874998832*rho[3]*weight[11]+0.037267799624996496*rho[2]*weight[11]-0.012422599874998832*rho[1]*weight[11]+0.021516574145596764*rho[0]*weight[11]-0.022360679774997897*weight[10]*rho[11]+0.01924500897298753*weight[8]*rho[11]-0.010309826235529031*weight[7]*rho[11]+0.021516574145596764*weight[6]*rho[11]-0.021516574145596764*weight[5]*rho[11]+0.004303314829119352*weight[4]*rho[11]+0.012422599874998832*weight[3]*rho[11]+0.037267799624996496*weight[2]*rho[11]-0.012422599874998832*weight[1]*rho[11]+0.021516574145596764*weight[0]*rho[11]-0.025*rho[10]*weight[10]-0.02151657414559676*rho[9]*weight[10]-0.02151657414559676*rho[8]*weight[10]-0.02151657414559676*rho[7]*weight[10]-0.014433756729740645*rho[6]*weight[10]+0.014433756729740645*rho[5]*weight[10]+0.014433756729740645*rho[4]*weight[10]-0.025*rho[3]*weight[10]-0.025*rho[2]*weight[10]+0.025*rho[1]*weight[10]-0.024056261216234404*rho[0]*weight[10]-0.02151657414559676*weight[9]*rho[10]-0.02151657414559676*weight[8]*rho[10]-0.02151657414559676*weight[7]*rho[10]-0.014433756729740645*weight[6]*rho[10]+0.014433756729740645*weight[5]*rho[10]+0.014433756729740645*weight[4]*rho[10]-0.025*weight[3]*rho[10]-0.025*weight[2]*rho[10]+0.025*weight[1]*rho[10]-0.024056261216234404*weight[0]*rho[10]-0.10119047619047619*rho[9]*weight[9]+0.012422599874998833*rho[6]*weight[9]-0.012422599874998833*rho[5]*weight[9]-0.012422599874998833*rho[4]*weight[9]-0.02151657414559676*rho[3]*weight[9]+0.02151657414559676*rho[2]*weight[9]-0.02151657414559676*rho[1]*weight[9]+0.0372677996249965*rho[0]*weight[9]+0.012422599874998833*weight[6]*rho[9]-0.012422599874998833*weight[5]*rho[9]-0.012422599874998833*weight[4]*rho[9]-0.02151657414559676*weight[3]*rho[9]+0.02151657414559676*weight[2]*rho[9]-0.02151657414559676*weight[1]*rho[9]+0.0372677996249965*weight[0]*rho[9]-0.10119047619047619*rho[8]*weight[8]+0.012422599874998833*rho[6]*weight[8]-0.012422599874998833*rho[5]*weight[8]-0.012422599874998833*rho[4]*weight[8]+0.02151657414559676*rho[3]*weight[8]-0.02151657414559676*rho[2]*weight[8]-0.02151657414559676*rho[1]*weight[8]+0.0372677996249965*rho[0]*weight[8]+0.012422599874998833*weight[6]*rho[8]-0.012422599874998833*weight[5]*rho[8]-0.012422599874998833*weight[4]*rho[8]+0.02151657414559676*weight[3]*rho[8]-0.02151657414559676*weight[2]*rho[8]-0.02151657414559676*weight[1]*rho[8]+0.0372677996249965*weight[0]*rho[8]-0.10119047619047619*rho[7]*weight[7]+0.012422599874998833*rho[6]*weight[7]-0.012422599874998833*rho[5]*weight[7]-0.012422599874998833*rho[4]*weight[7]+0.02151657414559676*rho[3]*weight[7]+0.02151657414559676*rho[2]*weight[7]+0.02151657414559676*rho[1]*weight[7]+0.0372677996249965*rho[0]*weight[7]+0.012422599874998833*weight[6]*rho[7]-0.012422599874998833*weight[5]*rho[7]-0.012422599874998833*weight[4]*rho[7]+0.02151657414559676*weight[3]*rho[7]+0.02151657414559676*weight[2]*rho[7]+0.02151657414559676*weight[1]*rho[7]+0.0372677996249965*weight[0]*rho[7]-0.058333333333333334*rho[6]*weight[6]-0.025*rho[5]*weight[6]-0.025*rho[4]*weight[6]-0.004811252243246881*rho[3]*weight[6]-0.004811252243246881*rho[2]*weight[6]-0.024056261216234404*rho[1]*weight[6]+0.01388888888888889*rho[0]*weight[6]-0.025*weight[5]*rho[6]-0.025*weight[4]*rho[6]-0.004811252243246881*weight[3]*rho[6]-0.004811252243246881*weight[2]*rho[6]-0.024056261216234404*weight[1]*rho[6]+0.01388888888888889*weight[0]*rho[6]-0.058333333333333334*rho[5]*weight[5]+0.025*rho[4]*weight[5]+0.004811252243246881*rho[3]*weight[5]-0.024056261216234404*rho[2]*weight[5]-0.004811252243246881*rho[1]*weight[5]-0.01388888888888889*rho[0]*weight[5]+0.025*weight[4]*rho[5]+0.004811252243246881*weight[3]*rho[5]-0.024056261216234404*weight[2]*rho[5]-0.004811252243246881*weight[1]*rho[5]-0.01388888888888889*weight[0]*rho[5]-0.058333333333333334*rho[4]*weight[4]-0.024056261216234404*rho[3]*weight[4]+0.004811252243246881*rho[2]*weight[4]-0.004811252243246881*rho[1]*weight[4]-0.01388888888888889*rho[0]*weight[4]-0.024056261216234404*weight[3]*rho[4]+0.004811252243246881*weight[2]*rho[4]-0.004811252243246881*weight[1]*rho[4]-0.01388888888888889*weight[0]*rho[4]-0.09166666666666667*rho[3]*weight[3]+0.01388888888888889*rho[2]*weight[3]-0.01388888888888889*rho[1]*weight[3]-0.024056261216234404*rho[0]*weight[3]+0.01388888888888889*weight[2]*rho[3]-0.01388888888888889*weight[1]*rho[3]-0.024056261216234404*weight[0]*rho[3]-0.09166666666666667*rho[2]*weight[2]-0.01388888888888889*rho[1]*weight[2]-0.024056261216234404*rho[0]*weight[2]-0.01388888888888889*weight[1]*rho[2]-0.024056261216234404*weight[0]*rho[2]-0.09166666666666667*rho[1]*weight[1]+0.024056261216234404*rho[0]*weight[1]+0.024056261216234404*weight[0]*rho[1]-0.125*rho[0]*weight[0]; #endif #ifdef __CUDA_ARCH__ - atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[6]],__double_as_longlong(-(0.9682458365518543*phiBC[6])+1.118033988749895*phiBC[5]-0.5590169943749475*phiBC[4]+0.8660254037844386*phiBC[2]+0.5*phiBC[0])); + atomicAdd(&bsrc[nodeOff+globalIdxs[18]],0.1*rho[19]*weight[19]+0.02666666666666667*rho[18]*weight[19]+0.05773502691896258*rho[15]*weight[19]+0.051639777949432225*rho[10]*weight[19]+0.029814239699997195*rho[5]*weight[19]+0.02666666666666667*weight[18]*rho[19]+0.05773502691896258*weight[15]*rho[19]+0.051639777949432225*weight[10]*rho[19]+0.029814239699997195*weight[5]*rho[19]+0.1*rho[18]*weight[18]+0.05773502691896258*rho[12]*weight[18]+0.051639777949432225*rho[10]*weight[18]+0.029814239699997195*rho[4]*weight[18]+0.05773502691896258*weight[12]*rho[18]+0.051639777949432225*weight[10]*rho[18]+0.029814239699997195*weight[4]*rho[18]+0.11904761904761905*rho[17]*weight[17]-0.03849001794597506*rho[16]*weight[17]-0.03849001794597506*rho[14]*weight[17]+0.06873217490352689*rho[13]*weight[17]+0.06873217490352689*rho[11]*weight[17]-0.022222222222222223*rho[9]*weight[17]-0.022222222222222223*rho[8]*weight[17]+0.03968253968253969*rho[7]*weight[17]-0.074535599249993*rho[6]*weight[17]-0.04303314829119352*rho[3]*weight[17]-0.04303314829119352*rho[2]*weight[17]-0.024845199749997667*rho[0]*weight[17]-0.03849001794597506*weight[16]*rho[17]-0.03849001794597506*weight[14]*rho[17]+0.06873217490352689*weight[13]*rho[17]+0.06873217490352689*weight[11]*rho[17]-0.022222222222222223*weight[9]*rho[17]-0.022222222222222223*weight[8]*rho[17]+0.03968253968253969*weight[7]*rho[17]-0.074535599249993*weight[6]*rho[17]-0.04303314829119352*weight[3]*rho[17]-0.04303314829119352*weight[2]*rho[17]-0.024845199749997667*weight[0]*rho[17]+0.16666666666666669*rho[16]*weight[16]+0.044444444444444446*rho[14]*weight[16]-0.022222222222222223*rho[13]*weight[16]+0.09622504486493764*rho[9]*weight[16]+0.08606629658238706*rho[6]*weight[16]+0.049690399499995326*rho[3]*weight[16]+0.044444444444444446*weight[14]*rho[16]-0.022222222222222223*weight[13]*rho[16]+0.09622504486493764*weight[9]*rho[16]+0.08606629658238706*weight[6]*rho[16]+0.049690399499995326*weight[3]*rho[16]+0.1*rho[15]*weight[15]+0.029814239699997195*rho[10]*weight[15]+0.05163977794943223*rho[5]*weight[15]+0.029814239699997195*weight[10]*rho[15]+0.05163977794943223*weight[5]*rho[15]+0.16666666666666669*rho[14]*weight[14]-0.022222222222222223*rho[11]*weight[14]+0.09622504486493764*rho[8]*weight[14]+0.08606629658238706*rho[6]*weight[14]+0.049690399499995326*rho[2]*weight[14]-0.022222222222222223*weight[11]*rho[14]+0.09622504486493764*weight[8]*rho[14]+0.08606629658238706*weight[6]*rho[14]+0.049690399499995326*weight[2]*rho[14]+0.11904761904761905*rho[13]*weight[13]+0.03968253968253969*rho[11]*weight[13]-0.03849001794597506*rho[9]*weight[13]+0.06873217490352689*rho[7]*weight[13]-0.04303314829119353*rho[6]*weight[13]-0.07453559924999299*rho[3]*weight[13]-0.024845199749997663*rho[2]*weight[13]-0.04303314829119353*rho[0]*weight[13]+0.03968253968253969*weight[11]*rho[13]-0.03849001794597506*weight[9]*rho[13]+0.06873217490352689*weight[7]*rho[13]-0.04303314829119353*weight[6]*rho[13]-0.07453559924999299*weight[3]*rho[13]-0.024845199749997663*weight[2]*rho[13]-0.04303314829119353*weight[0]*rho[13]+0.1*rho[12]*weight[12]+0.029814239699997195*rho[10]*weight[12]+0.05163977794943223*rho[4]*weight[12]+0.029814239699997195*weight[10]*rho[12]+0.05163977794943223*weight[4]*rho[12]+0.11904761904761905*rho[11]*weight[11]-0.03849001794597506*rho[8]*weight[11]+0.06873217490352689*rho[7]*weight[11]-0.04303314829119353*rho[6]*weight[11]-0.024845199749997663*rho[3]*weight[11]-0.07453559924999299*rho[2]*weight[11]-0.04303314829119353*rho[0]*weight[11]-0.03849001794597506*weight[8]*rho[11]+0.06873217490352689*weight[7]*rho[11]-0.04303314829119353*weight[6]*rho[11]-0.024845199749997663*weight[3]*rho[11]-0.07453559924999299*weight[2]*rho[11]-0.04303314829119353*weight[0]*rho[11]+0.1*rho[10]*weight[10]+0.05773502691896258*rho[5]*weight[10]+0.05773502691896258*rho[4]*weight[10]+0.03333333333333333*rho[1]*weight[10]+0.05773502691896258*weight[5]*rho[10]+0.05773502691896258*weight[4]*rho[10]+0.03333333333333333*weight[1]*rho[10]+0.16666666666666669*rho[9]*weight[9]+0.04969039949999533*rho[6]*weight[9]+0.08606629658238704*rho[3]*weight[9]+0.04969039949999533*weight[6]*rho[9]+0.08606629658238704*weight[3]*rho[9]+0.16666666666666669*rho[8]*weight[8]+0.04969039949999533*rho[6]*weight[8]+0.08606629658238704*rho[2]*weight[8]+0.04969039949999533*weight[6]*rho[8]+0.08606629658238704*weight[2]*rho[8]+0.11904761904761905*rho[7]*weight[7]-0.024845199749997667*rho[6]*weight[7]-0.04303314829119352*rho[3]*weight[7]-0.04303314829119352*rho[2]*weight[7]-0.074535599249993*rho[0]*weight[7]-0.024845199749997667*weight[6]*rho[7]-0.04303314829119352*weight[3]*rho[7]-0.04303314829119352*weight[2]*rho[7]-0.074535599249993*weight[0]*rho[7]+0.16666666666666669*rho[6]*weight[6]+0.09622504486493762*rho[3]*weight[6]+0.09622504486493762*rho[2]*weight[6]+0.05555555555555556*rho[0]*weight[6]+0.09622504486493762*weight[3]*rho[6]+0.09622504486493762*weight[2]*rho[6]+0.05555555555555556*weight[0]*rho[6]+0.1*rho[5]*weight[5]+0.03333333333333333*rho[4]*weight[5]+0.05773502691896258*rho[1]*weight[5]+0.03333333333333333*weight[4]*rho[5]+0.05773502691896258*weight[1]*rho[5]+0.1*rho[4]*weight[4]+0.05773502691896258*rho[1]*weight[4]+0.05773502691896258*weight[1]*rho[4]+0.16666666666666669*rho[3]*weight[3]+0.05555555555555556*rho[2]*weight[3]+0.09622504486493762*rho[0]*weight[3]+0.05555555555555556*weight[2]*rho[3]+0.09622504486493762*weight[0]*rho[3]+0.16666666666666669*rho[2]*weight[2]+0.09622504486493762*rho[0]*weight[2]+0.09622504486493762*weight[0]*rho[2]+0.1*rho[1]*weight[1]+0.16666666666666669*rho[0]*weight[0]); #else - bsrc[nodeOff+globalIdxs[6]] = -(0.9682458365518543*phiBC[6])+1.118033988749895*phiBC[5]-0.5590169943749475*phiBC[4]+0.8660254037844386*phiBC[2]+0.5*phiBC[0]; + bsrc[nodeOff+globalIdxs[18]] += 0.1*rho[19]*weight[19]+0.02666666666666667*rho[18]*weight[19]+0.05773502691896258*rho[15]*weight[19]+0.051639777949432225*rho[10]*weight[19]+0.029814239699997195*rho[5]*weight[19]+0.02666666666666667*weight[18]*rho[19]+0.05773502691896258*weight[15]*rho[19]+0.051639777949432225*weight[10]*rho[19]+0.029814239699997195*weight[5]*rho[19]+0.1*rho[18]*weight[18]+0.05773502691896258*rho[12]*weight[18]+0.051639777949432225*rho[10]*weight[18]+0.029814239699997195*rho[4]*weight[18]+0.05773502691896258*weight[12]*rho[18]+0.051639777949432225*weight[10]*rho[18]+0.029814239699997195*weight[4]*rho[18]+0.11904761904761905*rho[17]*weight[17]-0.03849001794597506*rho[16]*weight[17]-0.03849001794597506*rho[14]*weight[17]+0.06873217490352689*rho[13]*weight[17]+0.06873217490352689*rho[11]*weight[17]-0.022222222222222223*rho[9]*weight[17]-0.022222222222222223*rho[8]*weight[17]+0.03968253968253969*rho[7]*weight[17]-0.074535599249993*rho[6]*weight[17]-0.04303314829119352*rho[3]*weight[17]-0.04303314829119352*rho[2]*weight[17]-0.024845199749997667*rho[0]*weight[17]-0.03849001794597506*weight[16]*rho[17]-0.03849001794597506*weight[14]*rho[17]+0.06873217490352689*weight[13]*rho[17]+0.06873217490352689*weight[11]*rho[17]-0.022222222222222223*weight[9]*rho[17]-0.022222222222222223*weight[8]*rho[17]+0.03968253968253969*weight[7]*rho[17]-0.074535599249993*weight[6]*rho[17]-0.04303314829119352*weight[3]*rho[17]-0.04303314829119352*weight[2]*rho[17]-0.024845199749997667*weight[0]*rho[17]+0.16666666666666669*rho[16]*weight[16]+0.044444444444444446*rho[14]*weight[16]-0.022222222222222223*rho[13]*weight[16]+0.09622504486493764*rho[9]*weight[16]+0.08606629658238706*rho[6]*weight[16]+0.049690399499995326*rho[3]*weight[16]+0.044444444444444446*weight[14]*rho[16]-0.022222222222222223*weight[13]*rho[16]+0.09622504486493764*weight[9]*rho[16]+0.08606629658238706*weight[6]*rho[16]+0.049690399499995326*weight[3]*rho[16]+0.1*rho[15]*weight[15]+0.029814239699997195*rho[10]*weight[15]+0.05163977794943223*rho[5]*weight[15]+0.029814239699997195*weight[10]*rho[15]+0.05163977794943223*weight[5]*rho[15]+0.16666666666666669*rho[14]*weight[14]-0.022222222222222223*rho[11]*weight[14]+0.09622504486493764*rho[8]*weight[14]+0.08606629658238706*rho[6]*weight[14]+0.049690399499995326*rho[2]*weight[14]-0.022222222222222223*weight[11]*rho[14]+0.09622504486493764*weight[8]*rho[14]+0.08606629658238706*weight[6]*rho[14]+0.049690399499995326*weight[2]*rho[14]+0.11904761904761905*rho[13]*weight[13]+0.03968253968253969*rho[11]*weight[13]-0.03849001794597506*rho[9]*weight[13]+0.06873217490352689*rho[7]*weight[13]-0.04303314829119353*rho[6]*weight[13]-0.07453559924999299*rho[3]*weight[13]-0.024845199749997663*rho[2]*weight[13]-0.04303314829119353*rho[0]*weight[13]+0.03968253968253969*weight[11]*rho[13]-0.03849001794597506*weight[9]*rho[13]+0.06873217490352689*weight[7]*rho[13]-0.04303314829119353*weight[6]*rho[13]-0.07453559924999299*weight[3]*rho[13]-0.024845199749997663*weight[2]*rho[13]-0.04303314829119353*weight[0]*rho[13]+0.1*rho[12]*weight[12]+0.029814239699997195*rho[10]*weight[12]+0.05163977794943223*rho[4]*weight[12]+0.029814239699997195*weight[10]*rho[12]+0.05163977794943223*weight[4]*rho[12]+0.11904761904761905*rho[11]*weight[11]-0.03849001794597506*rho[8]*weight[11]+0.06873217490352689*rho[7]*weight[11]-0.04303314829119353*rho[6]*weight[11]-0.024845199749997663*rho[3]*weight[11]-0.07453559924999299*rho[2]*weight[11]-0.04303314829119353*rho[0]*weight[11]-0.03849001794597506*weight[8]*rho[11]+0.06873217490352689*weight[7]*rho[11]-0.04303314829119353*weight[6]*rho[11]-0.024845199749997663*weight[3]*rho[11]-0.07453559924999299*weight[2]*rho[11]-0.04303314829119353*weight[0]*rho[11]+0.1*rho[10]*weight[10]+0.05773502691896258*rho[5]*weight[10]+0.05773502691896258*rho[4]*weight[10]+0.03333333333333333*rho[1]*weight[10]+0.05773502691896258*weight[5]*rho[10]+0.05773502691896258*weight[4]*rho[10]+0.03333333333333333*weight[1]*rho[10]+0.16666666666666669*rho[9]*weight[9]+0.04969039949999533*rho[6]*weight[9]+0.08606629658238704*rho[3]*weight[9]+0.04969039949999533*weight[6]*rho[9]+0.08606629658238704*weight[3]*rho[9]+0.16666666666666669*rho[8]*weight[8]+0.04969039949999533*rho[6]*weight[8]+0.08606629658238704*rho[2]*weight[8]+0.04969039949999533*weight[6]*rho[8]+0.08606629658238704*weight[2]*rho[8]+0.11904761904761905*rho[7]*weight[7]-0.024845199749997667*rho[6]*weight[7]-0.04303314829119352*rho[3]*weight[7]-0.04303314829119352*rho[2]*weight[7]-0.074535599249993*rho[0]*weight[7]-0.024845199749997667*weight[6]*rho[7]-0.04303314829119352*weight[3]*rho[7]-0.04303314829119352*weight[2]*rho[7]-0.074535599249993*weight[0]*rho[7]+0.16666666666666669*rho[6]*weight[6]+0.09622504486493762*rho[3]*weight[6]+0.09622504486493762*rho[2]*weight[6]+0.05555555555555556*rho[0]*weight[6]+0.09622504486493762*weight[3]*rho[6]+0.09622504486493762*weight[2]*rho[6]+0.05555555555555556*weight[0]*rho[6]+0.1*rho[5]*weight[5]+0.03333333333333333*rho[4]*weight[5]+0.05773502691896258*rho[1]*weight[5]+0.03333333333333333*weight[4]*rho[5]+0.05773502691896258*weight[1]*rho[5]+0.1*rho[4]*weight[4]+0.05773502691896258*rho[1]*weight[4]+0.05773502691896258*weight[1]*rho[4]+0.16666666666666669*rho[3]*weight[3]+0.05555555555555556*rho[2]*weight[3]+0.09622504486493762*rho[0]*weight[3]+0.05555555555555556*weight[2]*rho[3]+0.09622504486493762*weight[0]*rho[3]+0.16666666666666669*rho[2]*weight[2]+0.09622504486493762*rho[0]*weight[2]+0.09622504486493762*weight[0]*rho[2]+0.1*rho[1]*weight[1]+0.16666666666666669*rho[0]*weight[0]; #endif #ifdef __CUDA_ARCH__ - atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[7]],__double_as_longlong(1.9364916731037085*phiBC[7]+1.9364916731037085*phiBC[6]+1.118033988749895*phiBC[5]+1.118033988749895*phiBC[4]+1.5*phiBC[3]+0.8660254037844386*phiBC[2]+0.8660254037844386*phiBC[1]+0.5*phiBC[0])); + atomicAdd(&bsrc[nodeOff+globalIdxs[19]],-(0.034523809523809526*rho[19]*weight[19])+0.02*rho[18]*weight[19]+0.02*rho[17]*weight[19]+0.008935182737458497*rho[16]*weight[19]+0.008935182737458497*rho[15]*weight[19]+0.01924500897298753*rho[14]*weight[19]+0.01924500897298753*rho[13]*weight[19]+0.01924500897298753*rho[12]*weight[19]+0.01924500897298753*rho[11]*weight[19]+0.012909944487358056*rho[10]*weight[19]+0.021825396825396828*rho[9]*weight[19]+0.011111111111111112*rho[8]*weight[19]+0.011111111111111112*rho[7]*weight[19]+0.022360679774997897*rho[6]*weight[19]+0.022360679774997897*rho[5]*weight[19]+0.0372677996249965*rho[4]*weight[19]+0.02151657414559676*rho[3]*weight[19]+0.02151657414559676*rho[2]*weight[19]+0.02151657414559676*rho[1]*weight[19]+0.012422599874998833*rho[0]*weight[19]+0.02*weight[18]*rho[19]+0.02*weight[17]*rho[19]+0.008935182737458497*weight[16]*rho[19]+0.008935182737458497*weight[15]*rho[19]+0.01924500897298753*weight[14]*rho[19]+0.01924500897298753*weight[13]*rho[19]+0.01924500897298753*weight[12]*rho[19]+0.01924500897298753*weight[11]*rho[19]+0.012909944487358056*weight[10]*rho[19]+0.021825396825396828*weight[9]*rho[19]+0.011111111111111112*weight[8]*rho[19]+0.011111111111111112*weight[7]*rho[19]+0.022360679774997897*weight[6]*rho[19]+0.022360679774997897*weight[5]*rho[19]+0.0372677996249965*weight[4]*rho[19]+0.02151657414559676*weight[3]*rho[19]+0.02151657414559676*weight[2]*rho[19]+0.02151657414559676*weight[1]*rho[19]+0.012422599874998833*weight[0]*rho[19]-0.034523809523809526*rho[18]*weight[18]+0.02*rho[17]*weight[18]+0.01924500897298753*rho[16]*weight[18]+0.01924500897298753*rho[15]*weight[18]+0.008935182737458497*rho[14]*weight[18]+0.01924500897298753*rho[13]*weight[18]+0.008935182737458497*rho[12]*weight[18]+0.01924500897298753*rho[11]*weight[18]+0.012909944487358056*rho[10]*weight[18]+0.011111111111111112*rho[9]*weight[18]+0.021825396825396828*rho[8]*weight[18]+0.011111111111111112*rho[7]*weight[18]+0.022360679774997897*rho[6]*weight[18]+0.0372677996249965*rho[5]*weight[18]+0.022360679774997897*rho[4]*weight[18]+0.02151657414559676*rho[3]*weight[18]+0.02151657414559676*rho[2]*weight[18]+0.02151657414559676*rho[1]*weight[18]+0.012422599874998833*rho[0]*weight[18]+0.02*weight[17]*rho[18]+0.01924500897298753*weight[16]*rho[18]+0.01924500897298753*weight[15]*rho[18]+0.008935182737458497*weight[14]*rho[18]+0.01924500897298753*weight[13]*rho[18]+0.008935182737458497*weight[12]*rho[18]+0.01924500897298753*weight[11]*rho[18]+0.012909944487358056*weight[10]*rho[18]+0.011111111111111112*weight[9]*rho[18]+0.021825396825396828*weight[8]*rho[18]+0.011111111111111112*weight[7]*rho[18]+0.022360679774997897*weight[6]*rho[18]+0.0372677996249965*weight[5]*rho[18]+0.022360679774997897*weight[4]*rho[18]+0.02151657414559676*weight[3]*rho[18]+0.02151657414559676*weight[2]*rho[18]+0.02151657414559676*weight[1]*rho[18]+0.012422599874998833*weight[0]*rho[18]-0.034523809523809526*rho[17]*weight[17]+0.01924500897298753*rho[16]*weight[17]+0.01924500897298753*rho[15]*weight[17]+0.01924500897298753*rho[14]*weight[17]+0.008935182737458497*rho[13]*weight[17]+0.01924500897298753*rho[12]*weight[17]+0.008935182737458497*rho[11]*weight[17]+0.012909944487358056*rho[10]*weight[17]+0.011111111111111112*rho[9]*weight[17]+0.011111111111111112*rho[8]*weight[17]+0.021825396825396828*rho[7]*weight[17]+0.0372677996249965*rho[6]*weight[17]+0.022360679774997897*rho[5]*weight[17]+0.022360679774997897*rho[4]*weight[17]+0.02151657414559676*rho[3]*weight[17]+0.02151657414559676*rho[2]*weight[17]+0.02151657414559676*rho[1]*weight[17]+0.012422599874998833*rho[0]*weight[17]+0.01924500897298753*weight[16]*rho[17]+0.01924500897298753*weight[15]*rho[17]+0.01924500897298753*weight[14]*rho[17]+0.008935182737458497*weight[13]*rho[17]+0.01924500897298753*weight[12]*rho[17]+0.008935182737458497*weight[11]*rho[17]+0.012909944487358056*weight[10]*rho[17]+0.011111111111111112*weight[9]*rho[17]+0.011111111111111112*weight[8]*rho[17]+0.021825396825396828*weight[7]*rho[17]+0.0372677996249965*weight[6]*rho[17]+0.022360679774997897*weight[5]*rho[17]+0.022360679774997897*weight[4]*rho[17]+0.02151657414559676*weight[3]*rho[17]+0.02151657414559676*weight[2]*rho[17]+0.02151657414559676*weight[1]*rho[17]+0.012422599874998833*weight[0]*rho[17]-0.06785714285714287*rho[16]*weight[16]+0.021825396825396828*rho[15]*weight[16]+0.011111111111111112*rho[14]*weight[16]+0.011111111111111112*rho[13]*weight[16]+0.011111111111111112*rho[12]*weight[16]+0.022360679774997897*rho[10]*weight[16]-0.010309826235529031*rho[9]*weight[16]+0.01924500897298753*rho[8]*weight[16]-0.004303314829119352*rho[6]*weight[16]+0.021516574145596764*rho[5]*weight[16]+0.021516574145596764*rho[4]*weight[16]+0.012422599874998832*rho[3]*weight[16]+0.037267799624996496*rho[2]*weight[16]+0.012422599874998832*rho[1]*weight[16]+0.021516574145596764*rho[0]*weight[16]+0.021825396825396828*weight[15]*rho[16]+0.011111111111111112*weight[14]*rho[16]+0.011111111111111112*weight[13]*rho[16]+0.011111111111111112*weight[12]*rho[16]+0.022360679774997897*weight[10]*rho[16]-0.010309826235529031*weight[9]*rho[16]+0.01924500897298753*weight[8]*rho[16]-0.004303314829119352*weight[6]*rho[16]+0.021516574145596764*weight[5]*rho[16]+0.021516574145596764*weight[4]*rho[16]+0.012422599874998832*weight[3]*rho[16]+0.037267799624996496*weight[2]*rho[16]+0.012422599874998832*weight[1]*rho[16]+0.021516574145596764*weight[0]*rho[16]-0.06785714285714287*rho[15]*weight[15]+0.011111111111111112*rho[14]*weight[15]+0.011111111111111112*rho[13]*weight[15]+0.011111111111111112*rho[11]*weight[15]+0.022360679774997897*rho[10]*weight[15]-0.010309826235529031*rho[9]*weight[15]+0.01924500897298753*rho[7]*weight[15]+0.021516574145596764*rho[6]*weight[15]-0.004303314829119352*rho[5]*weight[15]+0.021516574145596764*rho[4]*weight[15]+0.012422599874998832*rho[3]*weight[15]+0.012422599874998832*rho[2]*weight[15]+0.037267799624996496*rho[1]*weight[15]+0.021516574145596764*rho[0]*weight[15]+0.011111111111111112*weight[14]*rho[15]+0.011111111111111112*weight[13]*rho[15]+0.011111111111111112*weight[11]*rho[15]+0.022360679774997897*weight[10]*rho[15]-0.010309826235529031*weight[9]*rho[15]+0.01924500897298753*weight[7]*rho[15]+0.021516574145596764*weight[6]*rho[15]-0.004303314829119352*weight[5]*rho[15]+0.021516574145596764*weight[4]*rho[15]+0.012422599874998832*weight[3]*rho[15]+0.012422599874998832*weight[2]*rho[15]+0.037267799624996496*weight[1]*rho[15]+0.021516574145596764*weight[0]*rho[15]-0.06785714285714287*rho[14]*weight[14]+0.021825396825396828*rho[12]*weight[14]+0.011111111111111112*rho[11]*weight[14]+0.022360679774997897*rho[10]*weight[14]+0.01924500897298753*rho[9]*weight[14]-0.010309826235529031*rho[8]*weight[14]-0.004303314829119352*rho[6]*weight[14]+0.021516574145596764*rho[5]*weight[14]+0.021516574145596764*rho[4]*weight[14]+0.037267799624996496*rho[3]*weight[14]+0.012422599874998832*rho[2]*weight[14]+0.012422599874998832*rho[1]*weight[14]+0.021516574145596764*rho[0]*weight[14]+0.021825396825396828*weight[12]*rho[14]+0.011111111111111112*weight[11]*rho[14]+0.022360679774997897*weight[10]*rho[14]+0.01924500897298753*weight[9]*rho[14]-0.010309826235529031*weight[8]*rho[14]-0.004303314829119352*weight[6]*rho[14]+0.021516574145596764*weight[5]*rho[14]+0.021516574145596764*weight[4]*rho[14]+0.037267799624996496*weight[3]*rho[14]+0.012422599874998832*weight[2]*rho[14]+0.012422599874998832*weight[1]*rho[14]+0.021516574145596764*weight[0]*rho[14]-0.06785714285714287*rho[13]*weight[13]+0.011111111111111112*rho[12]*weight[13]+0.021825396825396828*rho[11]*weight[13]+0.022360679774997897*rho[10]*weight[13]+0.01924500897298753*rho[9]*weight[13]-0.010309826235529031*rho[7]*weight[13]+0.021516574145596764*rho[6]*weight[13]-0.004303314829119352*rho[5]*weight[13]+0.021516574145596764*rho[4]*weight[13]+0.037267799624996496*rho[3]*weight[13]+0.012422599874998832*rho[2]*weight[13]+0.012422599874998832*rho[1]*weight[13]+0.021516574145596764*rho[0]*weight[13]+0.011111111111111112*weight[12]*rho[13]+0.021825396825396828*weight[11]*rho[13]+0.022360679774997897*weight[10]*rho[13]+0.01924500897298753*weight[9]*rho[13]-0.010309826235529031*weight[7]*rho[13]+0.021516574145596764*weight[6]*rho[13]-0.004303314829119352*weight[5]*rho[13]+0.021516574145596764*weight[4]*rho[13]+0.037267799624996496*weight[3]*rho[13]+0.012422599874998832*weight[2]*rho[13]+0.012422599874998832*weight[1]*rho[13]+0.021516574145596764*weight[0]*rho[13]-0.06785714285714287*rho[12]*weight[12]+0.011111111111111112*rho[11]*weight[12]+0.022360679774997897*rho[10]*weight[12]-0.010309826235529031*rho[8]*weight[12]+0.01924500897298753*rho[7]*weight[12]+0.021516574145596764*rho[6]*weight[12]+0.021516574145596764*rho[5]*weight[12]-0.004303314829119352*rho[4]*weight[12]+0.012422599874998832*rho[3]*weight[12]+0.012422599874998832*rho[2]*weight[12]+0.037267799624996496*rho[1]*weight[12]+0.021516574145596764*rho[0]*weight[12]+0.011111111111111112*weight[11]*rho[12]+0.022360679774997897*weight[10]*rho[12]-0.010309826235529031*weight[8]*rho[12]+0.01924500897298753*weight[7]*rho[12]+0.021516574145596764*weight[6]*rho[12]+0.021516574145596764*weight[5]*rho[12]-0.004303314829119352*weight[4]*rho[12]+0.012422599874998832*weight[3]*rho[12]+0.012422599874998832*weight[2]*rho[12]+0.037267799624996496*weight[1]*rho[12]+0.021516574145596764*weight[0]*rho[12]-0.06785714285714287*rho[11]*weight[11]+0.022360679774997897*rho[10]*weight[11]+0.01924500897298753*rho[8]*weight[11]-0.010309826235529031*rho[7]*weight[11]+0.021516574145596764*rho[6]*weight[11]+0.021516574145596764*rho[5]*weight[11]-0.004303314829119352*rho[4]*weight[11]+0.012422599874998832*rho[3]*weight[11]+0.037267799624996496*rho[2]*weight[11]+0.012422599874998832*rho[1]*weight[11]+0.021516574145596764*rho[0]*weight[11]+0.022360679774997897*weight[10]*rho[11]+0.01924500897298753*weight[8]*rho[11]-0.010309826235529031*weight[7]*rho[11]+0.021516574145596764*weight[6]*rho[11]+0.021516574145596764*weight[5]*rho[11]-0.004303314829119352*weight[4]*rho[11]+0.012422599874998832*weight[3]*rho[11]+0.037267799624996496*weight[2]*rho[11]+0.012422599874998832*weight[1]*rho[11]+0.021516574145596764*weight[0]*rho[11]-0.025*rho[10]*weight[10]+0.02151657414559676*rho[9]*weight[10]+0.02151657414559676*rho[8]*weight[10]+0.02151657414559676*rho[7]*weight[10]+0.014433756729740645*rho[6]*weight[10]+0.014433756729740645*rho[5]*weight[10]+0.014433756729740645*rho[4]*weight[10]+0.025*rho[3]*weight[10]+0.025*rho[2]*weight[10]+0.025*rho[1]*weight[10]+0.024056261216234404*rho[0]*weight[10]+0.02151657414559676*weight[9]*rho[10]+0.02151657414559676*weight[8]*rho[10]+0.02151657414559676*weight[7]*rho[10]+0.014433756729740645*weight[6]*rho[10]+0.014433756729740645*weight[5]*rho[10]+0.014433756729740645*weight[4]*rho[10]+0.025*weight[3]*rho[10]+0.025*weight[2]*rho[10]+0.025*weight[1]*rho[10]+0.024056261216234404*weight[0]*rho[10]-0.10119047619047619*rho[9]*weight[9]+0.012422599874998833*rho[6]*weight[9]+0.012422599874998833*rho[5]*weight[9]+0.012422599874998833*rho[4]*weight[9]-0.02151657414559676*rho[3]*weight[9]+0.02151657414559676*rho[2]*weight[9]+0.02151657414559676*rho[1]*weight[9]+0.0372677996249965*rho[0]*weight[9]+0.012422599874998833*weight[6]*rho[9]+0.012422599874998833*weight[5]*rho[9]+0.012422599874998833*weight[4]*rho[9]-0.02151657414559676*weight[3]*rho[9]+0.02151657414559676*weight[2]*rho[9]+0.02151657414559676*weight[1]*rho[9]+0.0372677996249965*weight[0]*rho[9]-0.10119047619047619*rho[8]*weight[8]+0.012422599874998833*rho[6]*weight[8]+0.012422599874998833*rho[5]*weight[8]+0.012422599874998833*rho[4]*weight[8]+0.02151657414559676*rho[3]*weight[8]-0.02151657414559676*rho[2]*weight[8]+0.02151657414559676*rho[1]*weight[8]+0.0372677996249965*rho[0]*weight[8]+0.012422599874998833*weight[6]*rho[8]+0.012422599874998833*weight[5]*rho[8]+0.012422599874998833*weight[4]*rho[8]+0.02151657414559676*weight[3]*rho[8]-0.02151657414559676*weight[2]*rho[8]+0.02151657414559676*weight[1]*rho[8]+0.0372677996249965*weight[0]*rho[8]-0.10119047619047619*rho[7]*weight[7]+0.012422599874998833*rho[6]*weight[7]+0.012422599874998833*rho[5]*weight[7]+0.012422599874998833*rho[4]*weight[7]+0.02151657414559676*rho[3]*weight[7]+0.02151657414559676*rho[2]*weight[7]-0.02151657414559676*rho[1]*weight[7]+0.0372677996249965*rho[0]*weight[7]+0.012422599874998833*weight[6]*rho[7]+0.012422599874998833*weight[5]*rho[7]+0.012422599874998833*weight[4]*rho[7]+0.02151657414559676*weight[3]*rho[7]+0.02151657414559676*weight[2]*rho[7]-0.02151657414559676*weight[1]*rho[7]+0.0372677996249965*weight[0]*rho[7]-0.058333333333333334*rho[6]*weight[6]+0.025*rho[5]*weight[6]+0.025*rho[4]*weight[6]-0.004811252243246881*rho[3]*weight[6]-0.004811252243246881*rho[2]*weight[6]+0.024056261216234404*rho[1]*weight[6]+0.01388888888888889*rho[0]*weight[6]+0.025*weight[5]*rho[6]+0.025*weight[4]*rho[6]-0.004811252243246881*weight[3]*rho[6]-0.004811252243246881*weight[2]*rho[6]+0.024056261216234404*weight[1]*rho[6]+0.01388888888888889*weight[0]*rho[6]-0.058333333333333334*rho[5]*weight[5]+0.025*rho[4]*weight[5]-0.004811252243246881*rho[3]*weight[5]+0.024056261216234404*rho[2]*weight[5]-0.004811252243246881*rho[1]*weight[5]+0.01388888888888889*rho[0]*weight[5]+0.025*weight[4]*rho[5]-0.004811252243246881*weight[3]*rho[5]+0.024056261216234404*weight[2]*rho[5]-0.004811252243246881*weight[1]*rho[5]+0.01388888888888889*weight[0]*rho[5]-0.058333333333333334*rho[4]*weight[4]+0.024056261216234404*rho[3]*weight[4]-0.004811252243246881*rho[2]*weight[4]-0.004811252243246881*rho[1]*weight[4]+0.01388888888888889*rho[0]*weight[4]+0.024056261216234404*weight[3]*rho[4]-0.004811252243246881*weight[2]*rho[4]-0.004811252243246881*weight[1]*rho[4]+0.01388888888888889*weight[0]*rho[4]-0.09166666666666667*rho[3]*weight[3]+0.01388888888888889*rho[2]*weight[3]+0.01388888888888889*rho[1]*weight[3]-0.024056261216234404*rho[0]*weight[3]+0.01388888888888889*weight[2]*rho[3]+0.01388888888888889*weight[1]*rho[3]-0.024056261216234404*weight[0]*rho[3]-0.09166666666666667*rho[2]*weight[2]+0.01388888888888889*rho[1]*weight[2]-0.024056261216234404*rho[0]*weight[2]+0.01388888888888889*weight[1]*rho[2]-0.024056261216234404*weight[0]*rho[2]-0.09166666666666667*rho[1]*weight[1]-0.024056261216234404*rho[0]*weight[1]-0.024056261216234404*weight[0]*rho[1]-0.125*rho[0]*weight[0]); #else - bsrc[nodeOff+globalIdxs[7]] = 1.9364916731037085*phiBC[7]+1.9364916731037085*phiBC[6]+1.118033988749895*phiBC[5]+1.118033988749895*phiBC[4]+1.5*phiBC[3]+0.8660254037844386*phiBC[2]+0.8660254037844386*phiBC[1]+0.5*phiBC[0]; + bsrc[nodeOff+globalIdxs[19]] += -(0.034523809523809526*rho[19]*weight[19])+0.02*rho[18]*weight[19]+0.02*rho[17]*weight[19]+0.008935182737458497*rho[16]*weight[19]+0.008935182737458497*rho[15]*weight[19]+0.01924500897298753*rho[14]*weight[19]+0.01924500897298753*rho[13]*weight[19]+0.01924500897298753*rho[12]*weight[19]+0.01924500897298753*rho[11]*weight[19]+0.012909944487358056*rho[10]*weight[19]+0.021825396825396828*rho[9]*weight[19]+0.011111111111111112*rho[8]*weight[19]+0.011111111111111112*rho[7]*weight[19]+0.022360679774997897*rho[6]*weight[19]+0.022360679774997897*rho[5]*weight[19]+0.0372677996249965*rho[4]*weight[19]+0.02151657414559676*rho[3]*weight[19]+0.02151657414559676*rho[2]*weight[19]+0.02151657414559676*rho[1]*weight[19]+0.012422599874998833*rho[0]*weight[19]+0.02*weight[18]*rho[19]+0.02*weight[17]*rho[19]+0.008935182737458497*weight[16]*rho[19]+0.008935182737458497*weight[15]*rho[19]+0.01924500897298753*weight[14]*rho[19]+0.01924500897298753*weight[13]*rho[19]+0.01924500897298753*weight[12]*rho[19]+0.01924500897298753*weight[11]*rho[19]+0.012909944487358056*weight[10]*rho[19]+0.021825396825396828*weight[9]*rho[19]+0.011111111111111112*weight[8]*rho[19]+0.011111111111111112*weight[7]*rho[19]+0.022360679774997897*weight[6]*rho[19]+0.022360679774997897*weight[5]*rho[19]+0.0372677996249965*weight[4]*rho[19]+0.02151657414559676*weight[3]*rho[19]+0.02151657414559676*weight[2]*rho[19]+0.02151657414559676*weight[1]*rho[19]+0.012422599874998833*weight[0]*rho[19]-0.034523809523809526*rho[18]*weight[18]+0.02*rho[17]*weight[18]+0.01924500897298753*rho[16]*weight[18]+0.01924500897298753*rho[15]*weight[18]+0.008935182737458497*rho[14]*weight[18]+0.01924500897298753*rho[13]*weight[18]+0.008935182737458497*rho[12]*weight[18]+0.01924500897298753*rho[11]*weight[18]+0.012909944487358056*rho[10]*weight[18]+0.011111111111111112*rho[9]*weight[18]+0.021825396825396828*rho[8]*weight[18]+0.011111111111111112*rho[7]*weight[18]+0.022360679774997897*rho[6]*weight[18]+0.0372677996249965*rho[5]*weight[18]+0.022360679774997897*rho[4]*weight[18]+0.02151657414559676*rho[3]*weight[18]+0.02151657414559676*rho[2]*weight[18]+0.02151657414559676*rho[1]*weight[18]+0.012422599874998833*rho[0]*weight[18]+0.02*weight[17]*rho[18]+0.01924500897298753*weight[16]*rho[18]+0.01924500897298753*weight[15]*rho[18]+0.008935182737458497*weight[14]*rho[18]+0.01924500897298753*weight[13]*rho[18]+0.008935182737458497*weight[12]*rho[18]+0.01924500897298753*weight[11]*rho[18]+0.012909944487358056*weight[10]*rho[18]+0.011111111111111112*weight[9]*rho[18]+0.021825396825396828*weight[8]*rho[18]+0.011111111111111112*weight[7]*rho[18]+0.022360679774997897*weight[6]*rho[18]+0.0372677996249965*weight[5]*rho[18]+0.022360679774997897*weight[4]*rho[18]+0.02151657414559676*weight[3]*rho[18]+0.02151657414559676*weight[2]*rho[18]+0.02151657414559676*weight[1]*rho[18]+0.012422599874998833*weight[0]*rho[18]-0.034523809523809526*rho[17]*weight[17]+0.01924500897298753*rho[16]*weight[17]+0.01924500897298753*rho[15]*weight[17]+0.01924500897298753*rho[14]*weight[17]+0.008935182737458497*rho[13]*weight[17]+0.01924500897298753*rho[12]*weight[17]+0.008935182737458497*rho[11]*weight[17]+0.012909944487358056*rho[10]*weight[17]+0.011111111111111112*rho[9]*weight[17]+0.011111111111111112*rho[8]*weight[17]+0.021825396825396828*rho[7]*weight[17]+0.0372677996249965*rho[6]*weight[17]+0.022360679774997897*rho[5]*weight[17]+0.022360679774997897*rho[4]*weight[17]+0.02151657414559676*rho[3]*weight[17]+0.02151657414559676*rho[2]*weight[17]+0.02151657414559676*rho[1]*weight[17]+0.012422599874998833*rho[0]*weight[17]+0.01924500897298753*weight[16]*rho[17]+0.01924500897298753*weight[15]*rho[17]+0.01924500897298753*weight[14]*rho[17]+0.008935182737458497*weight[13]*rho[17]+0.01924500897298753*weight[12]*rho[17]+0.008935182737458497*weight[11]*rho[17]+0.012909944487358056*weight[10]*rho[17]+0.011111111111111112*weight[9]*rho[17]+0.011111111111111112*weight[8]*rho[17]+0.021825396825396828*weight[7]*rho[17]+0.0372677996249965*weight[6]*rho[17]+0.022360679774997897*weight[5]*rho[17]+0.022360679774997897*weight[4]*rho[17]+0.02151657414559676*weight[3]*rho[17]+0.02151657414559676*weight[2]*rho[17]+0.02151657414559676*weight[1]*rho[17]+0.012422599874998833*weight[0]*rho[17]-0.06785714285714287*rho[16]*weight[16]+0.021825396825396828*rho[15]*weight[16]+0.011111111111111112*rho[14]*weight[16]+0.011111111111111112*rho[13]*weight[16]+0.011111111111111112*rho[12]*weight[16]+0.022360679774997897*rho[10]*weight[16]-0.010309826235529031*rho[9]*weight[16]+0.01924500897298753*rho[8]*weight[16]-0.004303314829119352*rho[6]*weight[16]+0.021516574145596764*rho[5]*weight[16]+0.021516574145596764*rho[4]*weight[16]+0.012422599874998832*rho[3]*weight[16]+0.037267799624996496*rho[2]*weight[16]+0.012422599874998832*rho[1]*weight[16]+0.021516574145596764*rho[0]*weight[16]+0.021825396825396828*weight[15]*rho[16]+0.011111111111111112*weight[14]*rho[16]+0.011111111111111112*weight[13]*rho[16]+0.011111111111111112*weight[12]*rho[16]+0.022360679774997897*weight[10]*rho[16]-0.010309826235529031*weight[9]*rho[16]+0.01924500897298753*weight[8]*rho[16]-0.004303314829119352*weight[6]*rho[16]+0.021516574145596764*weight[5]*rho[16]+0.021516574145596764*weight[4]*rho[16]+0.012422599874998832*weight[3]*rho[16]+0.037267799624996496*weight[2]*rho[16]+0.012422599874998832*weight[1]*rho[16]+0.021516574145596764*weight[0]*rho[16]-0.06785714285714287*rho[15]*weight[15]+0.011111111111111112*rho[14]*weight[15]+0.011111111111111112*rho[13]*weight[15]+0.011111111111111112*rho[11]*weight[15]+0.022360679774997897*rho[10]*weight[15]-0.010309826235529031*rho[9]*weight[15]+0.01924500897298753*rho[7]*weight[15]+0.021516574145596764*rho[6]*weight[15]-0.004303314829119352*rho[5]*weight[15]+0.021516574145596764*rho[4]*weight[15]+0.012422599874998832*rho[3]*weight[15]+0.012422599874998832*rho[2]*weight[15]+0.037267799624996496*rho[1]*weight[15]+0.021516574145596764*rho[0]*weight[15]+0.011111111111111112*weight[14]*rho[15]+0.011111111111111112*weight[13]*rho[15]+0.011111111111111112*weight[11]*rho[15]+0.022360679774997897*weight[10]*rho[15]-0.010309826235529031*weight[9]*rho[15]+0.01924500897298753*weight[7]*rho[15]+0.021516574145596764*weight[6]*rho[15]-0.004303314829119352*weight[5]*rho[15]+0.021516574145596764*weight[4]*rho[15]+0.012422599874998832*weight[3]*rho[15]+0.012422599874998832*weight[2]*rho[15]+0.037267799624996496*weight[1]*rho[15]+0.021516574145596764*weight[0]*rho[15]-0.06785714285714287*rho[14]*weight[14]+0.021825396825396828*rho[12]*weight[14]+0.011111111111111112*rho[11]*weight[14]+0.022360679774997897*rho[10]*weight[14]+0.01924500897298753*rho[9]*weight[14]-0.010309826235529031*rho[8]*weight[14]-0.004303314829119352*rho[6]*weight[14]+0.021516574145596764*rho[5]*weight[14]+0.021516574145596764*rho[4]*weight[14]+0.037267799624996496*rho[3]*weight[14]+0.012422599874998832*rho[2]*weight[14]+0.012422599874998832*rho[1]*weight[14]+0.021516574145596764*rho[0]*weight[14]+0.021825396825396828*weight[12]*rho[14]+0.011111111111111112*weight[11]*rho[14]+0.022360679774997897*weight[10]*rho[14]+0.01924500897298753*weight[9]*rho[14]-0.010309826235529031*weight[8]*rho[14]-0.004303314829119352*weight[6]*rho[14]+0.021516574145596764*weight[5]*rho[14]+0.021516574145596764*weight[4]*rho[14]+0.037267799624996496*weight[3]*rho[14]+0.012422599874998832*weight[2]*rho[14]+0.012422599874998832*weight[1]*rho[14]+0.021516574145596764*weight[0]*rho[14]-0.06785714285714287*rho[13]*weight[13]+0.011111111111111112*rho[12]*weight[13]+0.021825396825396828*rho[11]*weight[13]+0.022360679774997897*rho[10]*weight[13]+0.01924500897298753*rho[9]*weight[13]-0.010309826235529031*rho[7]*weight[13]+0.021516574145596764*rho[6]*weight[13]-0.004303314829119352*rho[5]*weight[13]+0.021516574145596764*rho[4]*weight[13]+0.037267799624996496*rho[3]*weight[13]+0.012422599874998832*rho[2]*weight[13]+0.012422599874998832*rho[1]*weight[13]+0.021516574145596764*rho[0]*weight[13]+0.011111111111111112*weight[12]*rho[13]+0.021825396825396828*weight[11]*rho[13]+0.022360679774997897*weight[10]*rho[13]+0.01924500897298753*weight[9]*rho[13]-0.010309826235529031*weight[7]*rho[13]+0.021516574145596764*weight[6]*rho[13]-0.004303314829119352*weight[5]*rho[13]+0.021516574145596764*weight[4]*rho[13]+0.037267799624996496*weight[3]*rho[13]+0.012422599874998832*weight[2]*rho[13]+0.012422599874998832*weight[1]*rho[13]+0.021516574145596764*weight[0]*rho[13]-0.06785714285714287*rho[12]*weight[12]+0.011111111111111112*rho[11]*weight[12]+0.022360679774997897*rho[10]*weight[12]-0.010309826235529031*rho[8]*weight[12]+0.01924500897298753*rho[7]*weight[12]+0.021516574145596764*rho[6]*weight[12]+0.021516574145596764*rho[5]*weight[12]-0.004303314829119352*rho[4]*weight[12]+0.012422599874998832*rho[3]*weight[12]+0.012422599874998832*rho[2]*weight[12]+0.037267799624996496*rho[1]*weight[12]+0.021516574145596764*rho[0]*weight[12]+0.011111111111111112*weight[11]*rho[12]+0.022360679774997897*weight[10]*rho[12]-0.010309826235529031*weight[8]*rho[12]+0.01924500897298753*weight[7]*rho[12]+0.021516574145596764*weight[6]*rho[12]+0.021516574145596764*weight[5]*rho[12]-0.004303314829119352*weight[4]*rho[12]+0.012422599874998832*weight[3]*rho[12]+0.012422599874998832*weight[2]*rho[12]+0.037267799624996496*weight[1]*rho[12]+0.021516574145596764*weight[0]*rho[12]-0.06785714285714287*rho[11]*weight[11]+0.022360679774997897*rho[10]*weight[11]+0.01924500897298753*rho[8]*weight[11]-0.010309826235529031*rho[7]*weight[11]+0.021516574145596764*rho[6]*weight[11]+0.021516574145596764*rho[5]*weight[11]-0.004303314829119352*rho[4]*weight[11]+0.012422599874998832*rho[3]*weight[11]+0.037267799624996496*rho[2]*weight[11]+0.012422599874998832*rho[1]*weight[11]+0.021516574145596764*rho[0]*weight[11]+0.022360679774997897*weight[10]*rho[11]+0.01924500897298753*weight[8]*rho[11]-0.010309826235529031*weight[7]*rho[11]+0.021516574145596764*weight[6]*rho[11]+0.021516574145596764*weight[5]*rho[11]-0.004303314829119352*weight[4]*rho[11]+0.012422599874998832*weight[3]*rho[11]+0.037267799624996496*weight[2]*rho[11]+0.012422599874998832*weight[1]*rho[11]+0.021516574145596764*weight[0]*rho[11]-0.025*rho[10]*weight[10]+0.02151657414559676*rho[9]*weight[10]+0.02151657414559676*rho[8]*weight[10]+0.02151657414559676*rho[7]*weight[10]+0.014433756729740645*rho[6]*weight[10]+0.014433756729740645*rho[5]*weight[10]+0.014433756729740645*rho[4]*weight[10]+0.025*rho[3]*weight[10]+0.025*rho[2]*weight[10]+0.025*rho[1]*weight[10]+0.024056261216234404*rho[0]*weight[10]+0.02151657414559676*weight[9]*rho[10]+0.02151657414559676*weight[8]*rho[10]+0.02151657414559676*weight[7]*rho[10]+0.014433756729740645*weight[6]*rho[10]+0.014433756729740645*weight[5]*rho[10]+0.014433756729740645*weight[4]*rho[10]+0.025*weight[3]*rho[10]+0.025*weight[2]*rho[10]+0.025*weight[1]*rho[10]+0.024056261216234404*weight[0]*rho[10]-0.10119047619047619*rho[9]*weight[9]+0.012422599874998833*rho[6]*weight[9]+0.012422599874998833*rho[5]*weight[9]+0.012422599874998833*rho[4]*weight[9]-0.02151657414559676*rho[3]*weight[9]+0.02151657414559676*rho[2]*weight[9]+0.02151657414559676*rho[1]*weight[9]+0.0372677996249965*rho[0]*weight[9]+0.012422599874998833*weight[6]*rho[9]+0.012422599874998833*weight[5]*rho[9]+0.012422599874998833*weight[4]*rho[9]-0.02151657414559676*weight[3]*rho[9]+0.02151657414559676*weight[2]*rho[9]+0.02151657414559676*weight[1]*rho[9]+0.0372677996249965*weight[0]*rho[9]-0.10119047619047619*rho[8]*weight[8]+0.012422599874998833*rho[6]*weight[8]+0.012422599874998833*rho[5]*weight[8]+0.012422599874998833*rho[4]*weight[8]+0.02151657414559676*rho[3]*weight[8]-0.02151657414559676*rho[2]*weight[8]+0.02151657414559676*rho[1]*weight[8]+0.0372677996249965*rho[0]*weight[8]+0.012422599874998833*weight[6]*rho[8]+0.012422599874998833*weight[5]*rho[8]+0.012422599874998833*weight[4]*rho[8]+0.02151657414559676*weight[3]*rho[8]-0.02151657414559676*weight[2]*rho[8]+0.02151657414559676*weight[1]*rho[8]+0.0372677996249965*weight[0]*rho[8]-0.10119047619047619*rho[7]*weight[7]+0.012422599874998833*rho[6]*weight[7]+0.012422599874998833*rho[5]*weight[7]+0.012422599874998833*rho[4]*weight[7]+0.02151657414559676*rho[3]*weight[7]+0.02151657414559676*rho[2]*weight[7]-0.02151657414559676*rho[1]*weight[7]+0.0372677996249965*rho[0]*weight[7]+0.012422599874998833*weight[6]*rho[7]+0.012422599874998833*weight[5]*rho[7]+0.012422599874998833*weight[4]*rho[7]+0.02151657414559676*weight[3]*rho[7]+0.02151657414559676*weight[2]*rho[7]-0.02151657414559676*weight[1]*rho[7]+0.0372677996249965*weight[0]*rho[7]-0.058333333333333334*rho[6]*weight[6]+0.025*rho[5]*weight[6]+0.025*rho[4]*weight[6]-0.004811252243246881*rho[3]*weight[6]-0.004811252243246881*rho[2]*weight[6]+0.024056261216234404*rho[1]*weight[6]+0.01388888888888889*rho[0]*weight[6]+0.025*weight[5]*rho[6]+0.025*weight[4]*rho[6]-0.004811252243246881*weight[3]*rho[6]-0.004811252243246881*weight[2]*rho[6]+0.024056261216234404*weight[1]*rho[6]+0.01388888888888889*weight[0]*rho[6]-0.058333333333333334*rho[5]*weight[5]+0.025*rho[4]*weight[5]-0.004811252243246881*rho[3]*weight[5]+0.024056261216234404*rho[2]*weight[5]-0.004811252243246881*rho[1]*weight[5]+0.01388888888888889*rho[0]*weight[5]+0.025*weight[4]*rho[5]-0.004811252243246881*weight[3]*rho[5]+0.024056261216234404*weight[2]*rho[5]-0.004811252243246881*weight[1]*rho[5]+0.01388888888888889*weight[0]*rho[5]-0.058333333333333334*rho[4]*weight[4]+0.024056261216234404*rho[3]*weight[4]-0.004811252243246881*rho[2]*weight[4]-0.004811252243246881*rho[1]*weight[4]+0.01388888888888889*rho[0]*weight[4]+0.024056261216234404*weight[3]*rho[4]-0.004811252243246881*weight[2]*rho[4]-0.004811252243246881*weight[1]*rho[4]+0.01388888888888889*weight[0]*rho[4]-0.09166666666666667*rho[3]*weight[3]+0.01388888888888889*rho[2]*weight[3]+0.01388888888888889*rho[1]*weight[3]-0.024056261216234404*rho[0]*weight[3]+0.01388888888888889*weight[2]*rho[3]+0.01388888888888889*weight[1]*rho[3]-0.024056261216234404*weight[0]*rho[3]-0.09166666666666667*rho[2]*weight[2]+0.01388888888888889*rho[1]*weight[2]-0.024056261216234404*rho[0]*weight[2]+0.01388888888888889*weight[1]*rho[2]-0.024056261216234404*weight[0]*rho[2]-0.09166666666666667*rho[1]*weight[1]-0.024056261216234404*rho[0]*weight[1]-0.024056261216234404*weight[0]*rho[1]-0.125*rho[0]*weight[0]; #endif } -GKYL_CU_DH void fem_parproj_src_stencil_weighted_3x_ser_p1_inz_nondirichletz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +GKYL_CU_DH void fem_parproj_src_stencil_weighted_3x_ser_p1_loz_nondirichletz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) { // rho: right side source. // weight: Weight in the projection operation. - // phiBC: Dirichlet boundary potential, given as a DG expansion in the ghost cell (volume). + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. // nodeOff: node offset (prob idx * global number of nodes). // globalIdxs: global linear index of each basis function/node in current cell. // bsrc: global right side source vector. #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[0]],0.125*rho[7]*weight[7]-0.0721687836487032*rho[6]*weight[7]-0.0721687836487032*rho[5]*weight[7]-0.0721687836487032*rho[4]*weight[7]+0.041666666666666664*rho[3]*weight[7]+0.041666666666666664*rho[2]*weight[7]+0.041666666666666664*rho[1]*weight[7]-0.024056261216234404*rho[0]*weight[7]-0.0721687836487032*weight[6]*rho[7]-0.0721687836487032*weight[5]*rho[7]-0.0721687836487032*weight[4]*rho[7]+0.041666666666666664*weight[3]*rho[7]+0.041666666666666664*weight[2]*rho[7]+0.041666666666666664*weight[1]*rho[7]-0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]+0.041666666666666664*rho[5]*weight[6]+0.041666666666666664*rho[4]*weight[6]-0.0721687836487032*rho[3]*weight[6]-0.0721687836487032*rho[2]*weight[6]-0.024056261216234404*rho[1]*weight[6]+0.041666666666666664*rho[0]*weight[6]+0.041666666666666664*weight[5]*rho[6]+0.041666666666666664*weight[4]*rho[6]-0.0721687836487032*weight[3]*rho[6]-0.0721687836487032*weight[2]*rho[6]-0.024056261216234404*weight[1]*rho[6]+0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]+0.041666666666666664*rho[4]*weight[5]-0.0721687836487032*rho[3]*weight[5]-0.024056261216234404*rho[2]*weight[5]-0.0721687836487032*rho[1]*weight[5]+0.041666666666666664*rho[0]*weight[5]+0.041666666666666664*weight[4]*rho[5]-0.0721687836487032*weight[3]*rho[5]-0.024056261216234404*weight[2]*rho[5]-0.0721687836487032*weight[1]*rho[5]+0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]-0.024056261216234404*rho[3]*weight[4]-0.0721687836487032*rho[2]*weight[4]-0.0721687836487032*rho[1]*weight[4]+0.041666666666666664*rho[0]*weight[4]-0.024056261216234404*weight[3]*rho[4]-0.0721687836487032*weight[2]*rho[4]-0.0721687836487032*weight[1]*rho[4]+0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]+0.041666666666666664*rho[2]*weight[3]+0.041666666666666664*rho[1]*weight[3]-0.0721687836487032*rho[0]*weight[3]+0.041666666666666664*weight[2]*rho[3]+0.041666666666666664*weight[1]*rho[3]-0.0721687836487032*weight[0]*rho[3]+0.125*rho[2]*weight[2]+0.041666666666666664*rho[1]*weight[2]-0.0721687836487032*rho[0]*weight[2]+0.041666666666666664*weight[1]*rho[2]-0.0721687836487032*weight[0]*rho[2]+0.125*rho[1]*weight[1]-0.0721687836487032*rho[0]*weight[1]-0.0721687836487032*weight[0]*rho[1]+0.125*rho[0]*weight[0]); + atomicAdd(&bsrc[nodeOff+globalIdxs[0]],0.125*rho[7]*weight[7]-0.07216878364870322*rho[6]*weight[7]-0.07216878364870322*rho[5]*weight[7]-0.07216878364870322*rho[4]*weight[7]+0.041666666666666664*rho[3]*weight[7]+0.041666666666666664*rho[2]*weight[7]+0.041666666666666664*rho[1]*weight[7]-0.024056261216234404*rho[0]*weight[7]-0.07216878364870322*weight[6]*rho[7]-0.07216878364870322*weight[5]*rho[7]-0.07216878364870322*weight[4]*rho[7]+0.041666666666666664*weight[3]*rho[7]+0.041666666666666664*weight[2]*rho[7]+0.041666666666666664*weight[1]*rho[7]-0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]+0.041666666666666664*rho[5]*weight[6]+0.041666666666666664*rho[4]*weight[6]-0.07216878364870322*rho[3]*weight[6]-0.07216878364870322*rho[2]*weight[6]-0.024056261216234404*rho[1]*weight[6]+0.041666666666666664*rho[0]*weight[6]+0.041666666666666664*weight[5]*rho[6]+0.041666666666666664*weight[4]*rho[6]-0.07216878364870322*weight[3]*rho[6]-0.07216878364870322*weight[2]*rho[6]-0.024056261216234404*weight[1]*rho[6]+0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]+0.041666666666666664*rho[4]*weight[5]-0.07216878364870322*rho[3]*weight[5]-0.024056261216234404*rho[2]*weight[5]-0.07216878364870322*rho[1]*weight[5]+0.041666666666666664*rho[0]*weight[5]+0.041666666666666664*weight[4]*rho[5]-0.07216878364870322*weight[3]*rho[5]-0.024056261216234404*weight[2]*rho[5]-0.07216878364870322*weight[1]*rho[5]+0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]-0.024056261216234404*rho[3]*weight[4]-0.07216878364870322*rho[2]*weight[4]-0.07216878364870322*rho[1]*weight[4]+0.041666666666666664*rho[0]*weight[4]-0.024056261216234404*weight[3]*rho[4]-0.07216878364870322*weight[2]*rho[4]-0.07216878364870322*weight[1]*rho[4]+0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]+0.041666666666666664*rho[2]*weight[3]+0.041666666666666664*rho[1]*weight[3]-0.07216878364870322*rho[0]*weight[3]+0.041666666666666664*weight[2]*rho[3]+0.041666666666666664*weight[1]*rho[3]-0.07216878364870322*weight[0]*rho[3]+0.125*rho[2]*weight[2]+0.041666666666666664*rho[1]*weight[2]-0.07216878364870322*rho[0]*weight[2]+0.041666666666666664*weight[1]*rho[2]-0.07216878364870322*weight[0]*rho[2]+0.125*rho[1]*weight[1]-0.07216878364870322*rho[0]*weight[1]-0.07216878364870322*weight[0]*rho[1]+0.125*rho[0]*weight[0]); #else - bsrc[nodeOff+globalIdxs[0]] += 0.125*rho[7]*weight[7]-0.0721687836487032*rho[6]*weight[7]-0.0721687836487032*rho[5]*weight[7]-0.0721687836487032*rho[4]*weight[7]+0.041666666666666664*rho[3]*weight[7]+0.041666666666666664*rho[2]*weight[7]+0.041666666666666664*rho[1]*weight[7]-0.024056261216234404*rho[0]*weight[7]-0.0721687836487032*weight[6]*rho[7]-0.0721687836487032*weight[5]*rho[7]-0.0721687836487032*weight[4]*rho[7]+0.041666666666666664*weight[3]*rho[7]+0.041666666666666664*weight[2]*rho[7]+0.041666666666666664*weight[1]*rho[7]-0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]+0.041666666666666664*rho[5]*weight[6]+0.041666666666666664*rho[4]*weight[6]-0.0721687836487032*rho[3]*weight[6]-0.0721687836487032*rho[2]*weight[6]-0.024056261216234404*rho[1]*weight[6]+0.041666666666666664*rho[0]*weight[6]+0.041666666666666664*weight[5]*rho[6]+0.041666666666666664*weight[4]*rho[6]-0.0721687836487032*weight[3]*rho[6]-0.0721687836487032*weight[2]*rho[6]-0.024056261216234404*weight[1]*rho[6]+0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]+0.041666666666666664*rho[4]*weight[5]-0.0721687836487032*rho[3]*weight[5]-0.024056261216234404*rho[2]*weight[5]-0.0721687836487032*rho[1]*weight[5]+0.041666666666666664*rho[0]*weight[5]+0.041666666666666664*weight[4]*rho[5]-0.0721687836487032*weight[3]*rho[5]-0.024056261216234404*weight[2]*rho[5]-0.0721687836487032*weight[1]*rho[5]+0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]-0.024056261216234404*rho[3]*weight[4]-0.0721687836487032*rho[2]*weight[4]-0.0721687836487032*rho[1]*weight[4]+0.041666666666666664*rho[0]*weight[4]-0.024056261216234404*weight[3]*rho[4]-0.0721687836487032*weight[2]*rho[4]-0.0721687836487032*weight[1]*rho[4]+0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]+0.041666666666666664*rho[2]*weight[3]+0.041666666666666664*rho[1]*weight[3]-0.0721687836487032*rho[0]*weight[3]+0.041666666666666664*weight[2]*rho[3]+0.041666666666666664*weight[1]*rho[3]-0.0721687836487032*weight[0]*rho[3]+0.125*rho[2]*weight[2]+0.041666666666666664*rho[1]*weight[2]-0.0721687836487032*rho[0]*weight[2]+0.041666666666666664*weight[1]*rho[2]-0.0721687836487032*weight[0]*rho[2]+0.125*rho[1]*weight[1]-0.0721687836487032*rho[0]*weight[1]-0.0721687836487032*weight[0]*rho[1]+0.125*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[0]] += 0.125*rho[7]*weight[7]-0.07216878364870322*rho[6]*weight[7]-0.07216878364870322*rho[5]*weight[7]-0.07216878364870322*rho[4]*weight[7]+0.041666666666666664*rho[3]*weight[7]+0.041666666666666664*rho[2]*weight[7]+0.041666666666666664*rho[1]*weight[7]-0.024056261216234404*rho[0]*weight[7]-0.07216878364870322*weight[6]*rho[7]-0.07216878364870322*weight[5]*rho[7]-0.07216878364870322*weight[4]*rho[7]+0.041666666666666664*weight[3]*rho[7]+0.041666666666666664*weight[2]*rho[7]+0.041666666666666664*weight[1]*rho[7]-0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]+0.041666666666666664*rho[5]*weight[6]+0.041666666666666664*rho[4]*weight[6]-0.07216878364870322*rho[3]*weight[6]-0.07216878364870322*rho[2]*weight[6]-0.024056261216234404*rho[1]*weight[6]+0.041666666666666664*rho[0]*weight[6]+0.041666666666666664*weight[5]*rho[6]+0.041666666666666664*weight[4]*rho[6]-0.07216878364870322*weight[3]*rho[6]-0.07216878364870322*weight[2]*rho[6]-0.024056261216234404*weight[1]*rho[6]+0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]+0.041666666666666664*rho[4]*weight[5]-0.07216878364870322*rho[3]*weight[5]-0.024056261216234404*rho[2]*weight[5]-0.07216878364870322*rho[1]*weight[5]+0.041666666666666664*rho[0]*weight[5]+0.041666666666666664*weight[4]*rho[5]-0.07216878364870322*weight[3]*rho[5]-0.024056261216234404*weight[2]*rho[5]-0.07216878364870322*weight[1]*rho[5]+0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]-0.024056261216234404*rho[3]*weight[4]-0.07216878364870322*rho[2]*weight[4]-0.07216878364870322*rho[1]*weight[4]+0.041666666666666664*rho[0]*weight[4]-0.024056261216234404*weight[3]*rho[4]-0.07216878364870322*weight[2]*rho[4]-0.07216878364870322*weight[1]*rho[4]+0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]+0.041666666666666664*rho[2]*weight[3]+0.041666666666666664*rho[1]*weight[3]-0.07216878364870322*rho[0]*weight[3]+0.041666666666666664*weight[2]*rho[3]+0.041666666666666664*weight[1]*rho[3]-0.07216878364870322*weight[0]*rho[3]+0.125*rho[2]*weight[2]+0.041666666666666664*rho[1]*weight[2]-0.07216878364870322*rho[0]*weight[2]+0.041666666666666664*weight[1]*rho[2]-0.07216878364870322*weight[0]*rho[2]+0.125*rho[1]*weight[1]-0.07216878364870322*rho[0]*weight[1]-0.07216878364870322*weight[0]*rho[1]+0.125*rho[0]*weight[0]; #endif #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[1]],0.125*rho[7]*weight[7]+0.0721687836487032*rho[6]*weight[7]-0.0721687836487032*rho[5]*weight[7]-0.0721687836487032*rho[4]*weight[7]-0.041666666666666664*rho[3]*weight[7]-0.041666666666666664*rho[2]*weight[7]+0.041666666666666664*rho[1]*weight[7]+0.024056261216234404*rho[0]*weight[7]+0.0721687836487032*weight[6]*rho[7]-0.0721687836487032*weight[5]*rho[7]-0.0721687836487032*weight[4]*rho[7]-0.041666666666666664*weight[3]*rho[7]-0.041666666666666664*weight[2]*rho[7]+0.041666666666666664*weight[1]*rho[7]+0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]-0.041666666666666664*rho[5]*weight[6]-0.041666666666666664*rho[4]*weight[6]-0.0721687836487032*rho[3]*weight[6]-0.0721687836487032*rho[2]*weight[6]+0.024056261216234404*rho[1]*weight[6]+0.041666666666666664*rho[0]*weight[6]-0.041666666666666664*weight[5]*rho[6]-0.041666666666666664*weight[4]*rho[6]-0.0721687836487032*weight[3]*rho[6]-0.0721687836487032*weight[2]*rho[6]+0.024056261216234404*weight[1]*rho[6]+0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]+0.041666666666666664*rho[4]*weight[5]+0.0721687836487032*rho[3]*weight[5]+0.024056261216234404*rho[2]*weight[5]-0.0721687836487032*rho[1]*weight[5]-0.041666666666666664*rho[0]*weight[5]+0.041666666666666664*weight[4]*rho[5]+0.0721687836487032*weight[3]*rho[5]+0.024056261216234404*weight[2]*rho[5]-0.0721687836487032*weight[1]*rho[5]-0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]+0.024056261216234404*rho[3]*weight[4]+0.0721687836487032*rho[2]*weight[4]-0.0721687836487032*rho[1]*weight[4]-0.041666666666666664*rho[0]*weight[4]+0.024056261216234404*weight[3]*rho[4]+0.0721687836487032*weight[2]*rho[4]-0.0721687836487032*weight[1]*rho[4]-0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]+0.041666666666666664*rho[2]*weight[3]-0.041666666666666664*rho[1]*weight[3]-0.0721687836487032*rho[0]*weight[3]+0.041666666666666664*weight[2]*rho[3]-0.041666666666666664*weight[1]*rho[3]-0.0721687836487032*weight[0]*rho[3]+0.125*rho[2]*weight[2]-0.041666666666666664*rho[1]*weight[2]-0.0721687836487032*rho[0]*weight[2]-0.041666666666666664*weight[1]*rho[2]-0.0721687836487032*weight[0]*rho[2]+0.125*rho[1]*weight[1]+0.0721687836487032*rho[0]*weight[1]+0.0721687836487032*weight[0]*rho[1]+0.125*rho[0]*weight[0]); + atomicAdd(&bsrc[nodeOff+globalIdxs[1]],0.125*rho[7]*weight[7]+0.07216878364870322*rho[6]*weight[7]-0.07216878364870322*rho[5]*weight[7]-0.07216878364870322*rho[4]*weight[7]-0.041666666666666664*rho[3]*weight[7]-0.041666666666666664*rho[2]*weight[7]+0.041666666666666664*rho[1]*weight[7]+0.024056261216234404*rho[0]*weight[7]+0.07216878364870322*weight[6]*rho[7]-0.07216878364870322*weight[5]*rho[7]-0.07216878364870322*weight[4]*rho[7]-0.041666666666666664*weight[3]*rho[7]-0.041666666666666664*weight[2]*rho[7]+0.041666666666666664*weight[1]*rho[7]+0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]-0.041666666666666664*rho[5]*weight[6]-0.041666666666666664*rho[4]*weight[6]-0.07216878364870322*rho[3]*weight[6]-0.07216878364870322*rho[2]*weight[6]+0.024056261216234404*rho[1]*weight[6]+0.041666666666666664*rho[0]*weight[6]-0.041666666666666664*weight[5]*rho[6]-0.041666666666666664*weight[4]*rho[6]-0.07216878364870322*weight[3]*rho[6]-0.07216878364870322*weight[2]*rho[6]+0.024056261216234404*weight[1]*rho[6]+0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]+0.041666666666666664*rho[4]*weight[5]+0.07216878364870322*rho[3]*weight[5]+0.024056261216234404*rho[2]*weight[5]-0.07216878364870322*rho[1]*weight[5]-0.041666666666666664*rho[0]*weight[5]+0.041666666666666664*weight[4]*rho[5]+0.07216878364870322*weight[3]*rho[5]+0.024056261216234404*weight[2]*rho[5]-0.07216878364870322*weight[1]*rho[5]-0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]+0.024056261216234404*rho[3]*weight[4]+0.07216878364870322*rho[2]*weight[4]-0.07216878364870322*rho[1]*weight[4]-0.041666666666666664*rho[0]*weight[4]+0.024056261216234404*weight[3]*rho[4]+0.07216878364870322*weight[2]*rho[4]-0.07216878364870322*weight[1]*rho[4]-0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]+0.041666666666666664*rho[2]*weight[3]-0.041666666666666664*rho[1]*weight[3]-0.07216878364870322*rho[0]*weight[3]+0.041666666666666664*weight[2]*rho[3]-0.041666666666666664*weight[1]*rho[3]-0.07216878364870322*weight[0]*rho[3]+0.125*rho[2]*weight[2]-0.041666666666666664*rho[1]*weight[2]-0.07216878364870322*rho[0]*weight[2]-0.041666666666666664*weight[1]*rho[2]-0.07216878364870322*weight[0]*rho[2]+0.125*rho[1]*weight[1]+0.07216878364870322*rho[0]*weight[1]+0.07216878364870322*weight[0]*rho[1]+0.125*rho[0]*weight[0]); #else - bsrc[nodeOff+globalIdxs[1]] += 0.125*rho[7]*weight[7]+0.0721687836487032*rho[6]*weight[7]-0.0721687836487032*rho[5]*weight[7]-0.0721687836487032*rho[4]*weight[7]-0.041666666666666664*rho[3]*weight[7]-0.041666666666666664*rho[2]*weight[7]+0.041666666666666664*rho[1]*weight[7]+0.024056261216234404*rho[0]*weight[7]+0.0721687836487032*weight[6]*rho[7]-0.0721687836487032*weight[5]*rho[7]-0.0721687836487032*weight[4]*rho[7]-0.041666666666666664*weight[3]*rho[7]-0.041666666666666664*weight[2]*rho[7]+0.041666666666666664*weight[1]*rho[7]+0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]-0.041666666666666664*rho[5]*weight[6]-0.041666666666666664*rho[4]*weight[6]-0.0721687836487032*rho[3]*weight[6]-0.0721687836487032*rho[2]*weight[6]+0.024056261216234404*rho[1]*weight[6]+0.041666666666666664*rho[0]*weight[6]-0.041666666666666664*weight[5]*rho[6]-0.041666666666666664*weight[4]*rho[6]-0.0721687836487032*weight[3]*rho[6]-0.0721687836487032*weight[2]*rho[6]+0.024056261216234404*weight[1]*rho[6]+0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]+0.041666666666666664*rho[4]*weight[5]+0.0721687836487032*rho[3]*weight[5]+0.024056261216234404*rho[2]*weight[5]-0.0721687836487032*rho[1]*weight[5]-0.041666666666666664*rho[0]*weight[5]+0.041666666666666664*weight[4]*rho[5]+0.0721687836487032*weight[3]*rho[5]+0.024056261216234404*weight[2]*rho[5]-0.0721687836487032*weight[1]*rho[5]-0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]+0.024056261216234404*rho[3]*weight[4]+0.0721687836487032*rho[2]*weight[4]-0.0721687836487032*rho[1]*weight[4]-0.041666666666666664*rho[0]*weight[4]+0.024056261216234404*weight[3]*rho[4]+0.0721687836487032*weight[2]*rho[4]-0.0721687836487032*weight[1]*rho[4]-0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]+0.041666666666666664*rho[2]*weight[3]-0.041666666666666664*rho[1]*weight[3]-0.0721687836487032*rho[0]*weight[3]+0.041666666666666664*weight[2]*rho[3]-0.041666666666666664*weight[1]*rho[3]-0.0721687836487032*weight[0]*rho[3]+0.125*rho[2]*weight[2]-0.041666666666666664*rho[1]*weight[2]-0.0721687836487032*rho[0]*weight[2]-0.041666666666666664*weight[1]*rho[2]-0.0721687836487032*weight[0]*rho[2]+0.125*rho[1]*weight[1]+0.0721687836487032*rho[0]*weight[1]+0.0721687836487032*weight[0]*rho[1]+0.125*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[1]] += 0.125*rho[7]*weight[7]+0.07216878364870322*rho[6]*weight[7]-0.07216878364870322*rho[5]*weight[7]-0.07216878364870322*rho[4]*weight[7]-0.041666666666666664*rho[3]*weight[7]-0.041666666666666664*rho[2]*weight[7]+0.041666666666666664*rho[1]*weight[7]+0.024056261216234404*rho[0]*weight[7]+0.07216878364870322*weight[6]*rho[7]-0.07216878364870322*weight[5]*rho[7]-0.07216878364870322*weight[4]*rho[7]-0.041666666666666664*weight[3]*rho[7]-0.041666666666666664*weight[2]*rho[7]+0.041666666666666664*weight[1]*rho[7]+0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]-0.041666666666666664*rho[5]*weight[6]-0.041666666666666664*rho[4]*weight[6]-0.07216878364870322*rho[3]*weight[6]-0.07216878364870322*rho[2]*weight[6]+0.024056261216234404*rho[1]*weight[6]+0.041666666666666664*rho[0]*weight[6]-0.041666666666666664*weight[5]*rho[6]-0.041666666666666664*weight[4]*rho[6]-0.07216878364870322*weight[3]*rho[6]-0.07216878364870322*weight[2]*rho[6]+0.024056261216234404*weight[1]*rho[6]+0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]+0.041666666666666664*rho[4]*weight[5]+0.07216878364870322*rho[3]*weight[5]+0.024056261216234404*rho[2]*weight[5]-0.07216878364870322*rho[1]*weight[5]-0.041666666666666664*rho[0]*weight[5]+0.041666666666666664*weight[4]*rho[5]+0.07216878364870322*weight[3]*rho[5]+0.024056261216234404*weight[2]*rho[5]-0.07216878364870322*weight[1]*rho[5]-0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]+0.024056261216234404*rho[3]*weight[4]+0.07216878364870322*rho[2]*weight[4]-0.07216878364870322*rho[1]*weight[4]-0.041666666666666664*rho[0]*weight[4]+0.024056261216234404*weight[3]*rho[4]+0.07216878364870322*weight[2]*rho[4]-0.07216878364870322*weight[1]*rho[4]-0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]+0.041666666666666664*rho[2]*weight[3]-0.041666666666666664*rho[1]*weight[3]-0.07216878364870322*rho[0]*weight[3]+0.041666666666666664*weight[2]*rho[3]-0.041666666666666664*weight[1]*rho[3]-0.07216878364870322*weight[0]*rho[3]+0.125*rho[2]*weight[2]-0.041666666666666664*rho[1]*weight[2]-0.07216878364870322*rho[0]*weight[2]-0.041666666666666664*weight[1]*rho[2]-0.07216878364870322*weight[0]*rho[2]+0.125*rho[1]*weight[1]+0.07216878364870322*rho[0]*weight[1]+0.07216878364870322*weight[0]*rho[1]+0.125*rho[0]*weight[0]; #endif #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[2]],0.125*rho[7]*weight[7]-0.0721687836487032*rho[6]*weight[7]+0.0721687836487032*rho[5]*weight[7]-0.0721687836487032*rho[4]*weight[7]-0.041666666666666664*rho[3]*weight[7]+0.041666666666666664*rho[2]*weight[7]-0.041666666666666664*rho[1]*weight[7]+0.024056261216234404*rho[0]*weight[7]-0.0721687836487032*weight[6]*rho[7]+0.0721687836487032*weight[5]*rho[7]-0.0721687836487032*weight[4]*rho[7]-0.041666666666666664*weight[3]*rho[7]+0.041666666666666664*weight[2]*rho[7]-0.041666666666666664*weight[1]*rho[7]+0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]-0.041666666666666664*rho[5]*weight[6]+0.041666666666666664*rho[4]*weight[6]+0.0721687836487032*rho[3]*weight[6]-0.0721687836487032*rho[2]*weight[6]+0.024056261216234404*rho[1]*weight[6]-0.041666666666666664*rho[0]*weight[6]-0.041666666666666664*weight[5]*rho[6]+0.041666666666666664*weight[4]*rho[6]+0.0721687836487032*weight[3]*rho[6]-0.0721687836487032*weight[2]*rho[6]+0.024056261216234404*weight[1]*rho[6]-0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]-0.041666666666666664*rho[4]*weight[5]-0.0721687836487032*rho[3]*weight[5]+0.024056261216234404*rho[2]*weight[5]-0.0721687836487032*rho[1]*weight[5]+0.041666666666666664*rho[0]*weight[5]-0.041666666666666664*weight[4]*rho[5]-0.0721687836487032*weight[3]*rho[5]+0.024056261216234404*weight[2]*rho[5]-0.0721687836487032*weight[1]*rho[5]+0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]+0.024056261216234404*rho[3]*weight[4]-0.0721687836487032*rho[2]*weight[4]+0.0721687836487032*rho[1]*weight[4]-0.041666666666666664*rho[0]*weight[4]+0.024056261216234404*weight[3]*rho[4]-0.0721687836487032*weight[2]*rho[4]+0.0721687836487032*weight[1]*rho[4]-0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]-0.041666666666666664*rho[2]*weight[3]+0.041666666666666664*rho[1]*weight[3]-0.0721687836487032*rho[0]*weight[3]-0.041666666666666664*weight[2]*rho[3]+0.041666666666666664*weight[1]*rho[3]-0.0721687836487032*weight[0]*rho[3]+0.125*rho[2]*weight[2]-0.041666666666666664*rho[1]*weight[2]+0.0721687836487032*rho[0]*weight[2]-0.041666666666666664*weight[1]*rho[2]+0.0721687836487032*weight[0]*rho[2]+0.125*rho[1]*weight[1]-0.0721687836487032*rho[0]*weight[1]-0.0721687836487032*weight[0]*rho[1]+0.125*rho[0]*weight[0]); + atomicAdd(&bsrc[nodeOff+globalIdxs[2]],0.125*rho[7]*weight[7]-0.07216878364870322*rho[6]*weight[7]+0.07216878364870322*rho[5]*weight[7]-0.07216878364870322*rho[4]*weight[7]-0.041666666666666664*rho[3]*weight[7]+0.041666666666666664*rho[2]*weight[7]-0.041666666666666664*rho[1]*weight[7]+0.024056261216234404*rho[0]*weight[7]-0.07216878364870322*weight[6]*rho[7]+0.07216878364870322*weight[5]*rho[7]-0.07216878364870322*weight[4]*rho[7]-0.041666666666666664*weight[3]*rho[7]+0.041666666666666664*weight[2]*rho[7]-0.041666666666666664*weight[1]*rho[7]+0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]-0.041666666666666664*rho[5]*weight[6]+0.041666666666666664*rho[4]*weight[6]+0.07216878364870322*rho[3]*weight[6]-0.07216878364870322*rho[2]*weight[6]+0.024056261216234404*rho[1]*weight[6]-0.041666666666666664*rho[0]*weight[6]-0.041666666666666664*weight[5]*rho[6]+0.041666666666666664*weight[4]*rho[6]+0.07216878364870322*weight[3]*rho[6]-0.07216878364870322*weight[2]*rho[6]+0.024056261216234404*weight[1]*rho[6]-0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]-0.041666666666666664*rho[4]*weight[5]-0.07216878364870322*rho[3]*weight[5]+0.024056261216234404*rho[2]*weight[5]-0.07216878364870322*rho[1]*weight[5]+0.041666666666666664*rho[0]*weight[5]-0.041666666666666664*weight[4]*rho[5]-0.07216878364870322*weight[3]*rho[5]+0.024056261216234404*weight[2]*rho[5]-0.07216878364870322*weight[1]*rho[5]+0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]+0.024056261216234404*rho[3]*weight[4]-0.07216878364870322*rho[2]*weight[4]+0.07216878364870322*rho[1]*weight[4]-0.041666666666666664*rho[0]*weight[4]+0.024056261216234404*weight[3]*rho[4]-0.07216878364870322*weight[2]*rho[4]+0.07216878364870322*weight[1]*rho[4]-0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]-0.041666666666666664*rho[2]*weight[3]+0.041666666666666664*rho[1]*weight[3]-0.07216878364870322*rho[0]*weight[3]-0.041666666666666664*weight[2]*rho[3]+0.041666666666666664*weight[1]*rho[3]-0.07216878364870322*weight[0]*rho[3]+0.125*rho[2]*weight[2]-0.041666666666666664*rho[1]*weight[2]+0.07216878364870322*rho[0]*weight[2]-0.041666666666666664*weight[1]*rho[2]+0.07216878364870322*weight[0]*rho[2]+0.125*rho[1]*weight[1]-0.07216878364870322*rho[0]*weight[1]-0.07216878364870322*weight[0]*rho[1]+0.125*rho[0]*weight[0]); #else - bsrc[nodeOff+globalIdxs[2]] += 0.125*rho[7]*weight[7]-0.0721687836487032*rho[6]*weight[7]+0.0721687836487032*rho[5]*weight[7]-0.0721687836487032*rho[4]*weight[7]-0.041666666666666664*rho[3]*weight[7]+0.041666666666666664*rho[2]*weight[7]-0.041666666666666664*rho[1]*weight[7]+0.024056261216234404*rho[0]*weight[7]-0.0721687836487032*weight[6]*rho[7]+0.0721687836487032*weight[5]*rho[7]-0.0721687836487032*weight[4]*rho[7]-0.041666666666666664*weight[3]*rho[7]+0.041666666666666664*weight[2]*rho[7]-0.041666666666666664*weight[1]*rho[7]+0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]-0.041666666666666664*rho[5]*weight[6]+0.041666666666666664*rho[4]*weight[6]+0.0721687836487032*rho[3]*weight[6]-0.0721687836487032*rho[2]*weight[6]+0.024056261216234404*rho[1]*weight[6]-0.041666666666666664*rho[0]*weight[6]-0.041666666666666664*weight[5]*rho[6]+0.041666666666666664*weight[4]*rho[6]+0.0721687836487032*weight[3]*rho[6]-0.0721687836487032*weight[2]*rho[6]+0.024056261216234404*weight[1]*rho[6]-0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]-0.041666666666666664*rho[4]*weight[5]-0.0721687836487032*rho[3]*weight[5]+0.024056261216234404*rho[2]*weight[5]-0.0721687836487032*rho[1]*weight[5]+0.041666666666666664*rho[0]*weight[5]-0.041666666666666664*weight[4]*rho[5]-0.0721687836487032*weight[3]*rho[5]+0.024056261216234404*weight[2]*rho[5]-0.0721687836487032*weight[1]*rho[5]+0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]+0.024056261216234404*rho[3]*weight[4]-0.0721687836487032*rho[2]*weight[4]+0.0721687836487032*rho[1]*weight[4]-0.041666666666666664*rho[0]*weight[4]+0.024056261216234404*weight[3]*rho[4]-0.0721687836487032*weight[2]*rho[4]+0.0721687836487032*weight[1]*rho[4]-0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]-0.041666666666666664*rho[2]*weight[3]+0.041666666666666664*rho[1]*weight[3]-0.0721687836487032*rho[0]*weight[3]-0.041666666666666664*weight[2]*rho[3]+0.041666666666666664*weight[1]*rho[3]-0.0721687836487032*weight[0]*rho[3]+0.125*rho[2]*weight[2]-0.041666666666666664*rho[1]*weight[2]+0.0721687836487032*rho[0]*weight[2]-0.041666666666666664*weight[1]*rho[2]+0.0721687836487032*weight[0]*rho[2]+0.125*rho[1]*weight[1]-0.0721687836487032*rho[0]*weight[1]-0.0721687836487032*weight[0]*rho[1]+0.125*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[2]] += 0.125*rho[7]*weight[7]-0.07216878364870322*rho[6]*weight[7]+0.07216878364870322*rho[5]*weight[7]-0.07216878364870322*rho[4]*weight[7]-0.041666666666666664*rho[3]*weight[7]+0.041666666666666664*rho[2]*weight[7]-0.041666666666666664*rho[1]*weight[7]+0.024056261216234404*rho[0]*weight[7]-0.07216878364870322*weight[6]*rho[7]+0.07216878364870322*weight[5]*rho[7]-0.07216878364870322*weight[4]*rho[7]-0.041666666666666664*weight[3]*rho[7]+0.041666666666666664*weight[2]*rho[7]-0.041666666666666664*weight[1]*rho[7]+0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]-0.041666666666666664*rho[5]*weight[6]+0.041666666666666664*rho[4]*weight[6]+0.07216878364870322*rho[3]*weight[6]-0.07216878364870322*rho[2]*weight[6]+0.024056261216234404*rho[1]*weight[6]-0.041666666666666664*rho[0]*weight[6]-0.041666666666666664*weight[5]*rho[6]+0.041666666666666664*weight[4]*rho[6]+0.07216878364870322*weight[3]*rho[6]-0.07216878364870322*weight[2]*rho[6]+0.024056261216234404*weight[1]*rho[6]-0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]-0.041666666666666664*rho[4]*weight[5]-0.07216878364870322*rho[3]*weight[5]+0.024056261216234404*rho[2]*weight[5]-0.07216878364870322*rho[1]*weight[5]+0.041666666666666664*rho[0]*weight[5]-0.041666666666666664*weight[4]*rho[5]-0.07216878364870322*weight[3]*rho[5]+0.024056261216234404*weight[2]*rho[5]-0.07216878364870322*weight[1]*rho[5]+0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]+0.024056261216234404*rho[3]*weight[4]-0.07216878364870322*rho[2]*weight[4]+0.07216878364870322*rho[1]*weight[4]-0.041666666666666664*rho[0]*weight[4]+0.024056261216234404*weight[3]*rho[4]-0.07216878364870322*weight[2]*rho[4]+0.07216878364870322*weight[1]*rho[4]-0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]-0.041666666666666664*rho[2]*weight[3]+0.041666666666666664*rho[1]*weight[3]-0.07216878364870322*rho[0]*weight[3]-0.041666666666666664*weight[2]*rho[3]+0.041666666666666664*weight[1]*rho[3]-0.07216878364870322*weight[0]*rho[3]+0.125*rho[2]*weight[2]-0.041666666666666664*rho[1]*weight[2]+0.07216878364870322*rho[0]*weight[2]-0.041666666666666664*weight[1]*rho[2]+0.07216878364870322*weight[0]*rho[2]+0.125*rho[1]*weight[1]-0.07216878364870322*rho[0]*weight[1]-0.07216878364870322*weight[0]*rho[1]+0.125*rho[0]*weight[0]; #endif #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[3]],0.125*rho[7]*weight[7]+0.0721687836487032*rho[6]*weight[7]+0.0721687836487032*rho[5]*weight[7]-0.0721687836487032*rho[4]*weight[7]+0.041666666666666664*rho[3]*weight[7]-0.041666666666666664*rho[2]*weight[7]-0.041666666666666664*rho[1]*weight[7]-0.024056261216234404*rho[0]*weight[7]+0.0721687836487032*weight[6]*rho[7]+0.0721687836487032*weight[5]*rho[7]-0.0721687836487032*weight[4]*rho[7]+0.041666666666666664*weight[3]*rho[7]-0.041666666666666664*weight[2]*rho[7]-0.041666666666666664*weight[1]*rho[7]-0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]+0.041666666666666664*rho[5]*weight[6]-0.041666666666666664*rho[4]*weight[6]+0.0721687836487032*rho[3]*weight[6]-0.0721687836487032*rho[2]*weight[6]-0.024056261216234404*rho[1]*weight[6]-0.041666666666666664*rho[0]*weight[6]+0.041666666666666664*weight[5]*rho[6]-0.041666666666666664*weight[4]*rho[6]+0.0721687836487032*weight[3]*rho[6]-0.0721687836487032*weight[2]*rho[6]-0.024056261216234404*weight[1]*rho[6]-0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]-0.041666666666666664*rho[4]*weight[5]+0.0721687836487032*rho[3]*weight[5]-0.024056261216234404*rho[2]*weight[5]-0.0721687836487032*rho[1]*weight[5]-0.041666666666666664*rho[0]*weight[5]-0.041666666666666664*weight[4]*rho[5]+0.0721687836487032*weight[3]*rho[5]-0.024056261216234404*weight[2]*rho[5]-0.0721687836487032*weight[1]*rho[5]-0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]-0.024056261216234404*rho[3]*weight[4]+0.0721687836487032*rho[2]*weight[4]+0.0721687836487032*rho[1]*weight[4]+0.041666666666666664*rho[0]*weight[4]-0.024056261216234404*weight[3]*rho[4]+0.0721687836487032*weight[2]*rho[4]+0.0721687836487032*weight[1]*rho[4]+0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]-0.041666666666666664*rho[2]*weight[3]-0.041666666666666664*rho[1]*weight[3]-0.0721687836487032*rho[0]*weight[3]-0.041666666666666664*weight[2]*rho[3]-0.041666666666666664*weight[1]*rho[3]-0.0721687836487032*weight[0]*rho[3]+0.125*rho[2]*weight[2]+0.041666666666666664*rho[1]*weight[2]+0.0721687836487032*rho[0]*weight[2]+0.041666666666666664*weight[1]*rho[2]+0.0721687836487032*weight[0]*rho[2]+0.125*rho[1]*weight[1]+0.0721687836487032*rho[0]*weight[1]+0.0721687836487032*weight[0]*rho[1]+0.125*rho[0]*weight[0]); + atomicAdd(&bsrc[nodeOff+globalIdxs[3]],0.125*rho[7]*weight[7]+0.07216878364870322*rho[6]*weight[7]+0.07216878364870322*rho[5]*weight[7]-0.07216878364870322*rho[4]*weight[7]+0.041666666666666664*rho[3]*weight[7]-0.041666666666666664*rho[2]*weight[7]-0.041666666666666664*rho[1]*weight[7]-0.024056261216234404*rho[0]*weight[7]+0.07216878364870322*weight[6]*rho[7]+0.07216878364870322*weight[5]*rho[7]-0.07216878364870322*weight[4]*rho[7]+0.041666666666666664*weight[3]*rho[7]-0.041666666666666664*weight[2]*rho[7]-0.041666666666666664*weight[1]*rho[7]-0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]+0.041666666666666664*rho[5]*weight[6]-0.041666666666666664*rho[4]*weight[6]+0.07216878364870322*rho[3]*weight[6]-0.07216878364870322*rho[2]*weight[6]-0.024056261216234404*rho[1]*weight[6]-0.041666666666666664*rho[0]*weight[6]+0.041666666666666664*weight[5]*rho[6]-0.041666666666666664*weight[4]*rho[6]+0.07216878364870322*weight[3]*rho[6]-0.07216878364870322*weight[2]*rho[6]-0.024056261216234404*weight[1]*rho[6]-0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]-0.041666666666666664*rho[4]*weight[5]+0.07216878364870322*rho[3]*weight[5]-0.024056261216234404*rho[2]*weight[5]-0.07216878364870322*rho[1]*weight[5]-0.041666666666666664*rho[0]*weight[5]-0.041666666666666664*weight[4]*rho[5]+0.07216878364870322*weight[3]*rho[5]-0.024056261216234404*weight[2]*rho[5]-0.07216878364870322*weight[1]*rho[5]-0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]-0.024056261216234404*rho[3]*weight[4]+0.07216878364870322*rho[2]*weight[4]+0.07216878364870322*rho[1]*weight[4]+0.041666666666666664*rho[0]*weight[4]-0.024056261216234404*weight[3]*rho[4]+0.07216878364870322*weight[2]*rho[4]+0.07216878364870322*weight[1]*rho[4]+0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]-0.041666666666666664*rho[2]*weight[3]-0.041666666666666664*rho[1]*weight[3]-0.07216878364870322*rho[0]*weight[3]-0.041666666666666664*weight[2]*rho[3]-0.041666666666666664*weight[1]*rho[3]-0.07216878364870322*weight[0]*rho[3]+0.125*rho[2]*weight[2]+0.041666666666666664*rho[1]*weight[2]+0.07216878364870322*rho[0]*weight[2]+0.041666666666666664*weight[1]*rho[2]+0.07216878364870322*weight[0]*rho[2]+0.125*rho[1]*weight[1]+0.07216878364870322*rho[0]*weight[1]+0.07216878364870322*weight[0]*rho[1]+0.125*rho[0]*weight[0]); #else - bsrc[nodeOff+globalIdxs[3]] += 0.125*rho[7]*weight[7]+0.0721687836487032*rho[6]*weight[7]+0.0721687836487032*rho[5]*weight[7]-0.0721687836487032*rho[4]*weight[7]+0.041666666666666664*rho[3]*weight[7]-0.041666666666666664*rho[2]*weight[7]-0.041666666666666664*rho[1]*weight[7]-0.024056261216234404*rho[0]*weight[7]+0.0721687836487032*weight[6]*rho[7]+0.0721687836487032*weight[5]*rho[7]-0.0721687836487032*weight[4]*rho[7]+0.041666666666666664*weight[3]*rho[7]-0.041666666666666664*weight[2]*rho[7]-0.041666666666666664*weight[1]*rho[7]-0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]+0.041666666666666664*rho[5]*weight[6]-0.041666666666666664*rho[4]*weight[6]+0.0721687836487032*rho[3]*weight[6]-0.0721687836487032*rho[2]*weight[6]-0.024056261216234404*rho[1]*weight[6]-0.041666666666666664*rho[0]*weight[6]+0.041666666666666664*weight[5]*rho[6]-0.041666666666666664*weight[4]*rho[6]+0.0721687836487032*weight[3]*rho[6]-0.0721687836487032*weight[2]*rho[6]-0.024056261216234404*weight[1]*rho[6]-0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]-0.041666666666666664*rho[4]*weight[5]+0.0721687836487032*rho[3]*weight[5]-0.024056261216234404*rho[2]*weight[5]-0.0721687836487032*rho[1]*weight[5]-0.041666666666666664*rho[0]*weight[5]-0.041666666666666664*weight[4]*rho[5]+0.0721687836487032*weight[3]*rho[5]-0.024056261216234404*weight[2]*rho[5]-0.0721687836487032*weight[1]*rho[5]-0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]-0.024056261216234404*rho[3]*weight[4]+0.0721687836487032*rho[2]*weight[4]+0.0721687836487032*rho[1]*weight[4]+0.041666666666666664*rho[0]*weight[4]-0.024056261216234404*weight[3]*rho[4]+0.0721687836487032*weight[2]*rho[4]+0.0721687836487032*weight[1]*rho[4]+0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]-0.041666666666666664*rho[2]*weight[3]-0.041666666666666664*rho[1]*weight[3]-0.0721687836487032*rho[0]*weight[3]-0.041666666666666664*weight[2]*rho[3]-0.041666666666666664*weight[1]*rho[3]-0.0721687836487032*weight[0]*rho[3]+0.125*rho[2]*weight[2]+0.041666666666666664*rho[1]*weight[2]+0.0721687836487032*rho[0]*weight[2]+0.041666666666666664*weight[1]*rho[2]+0.0721687836487032*weight[0]*rho[2]+0.125*rho[1]*weight[1]+0.0721687836487032*rho[0]*weight[1]+0.0721687836487032*weight[0]*rho[1]+0.125*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[3]] += 0.125*rho[7]*weight[7]+0.07216878364870322*rho[6]*weight[7]+0.07216878364870322*rho[5]*weight[7]-0.07216878364870322*rho[4]*weight[7]+0.041666666666666664*rho[3]*weight[7]-0.041666666666666664*rho[2]*weight[7]-0.041666666666666664*rho[1]*weight[7]-0.024056261216234404*rho[0]*weight[7]+0.07216878364870322*weight[6]*rho[7]+0.07216878364870322*weight[5]*rho[7]-0.07216878364870322*weight[4]*rho[7]+0.041666666666666664*weight[3]*rho[7]-0.041666666666666664*weight[2]*rho[7]-0.041666666666666664*weight[1]*rho[7]-0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]+0.041666666666666664*rho[5]*weight[6]-0.041666666666666664*rho[4]*weight[6]+0.07216878364870322*rho[3]*weight[6]-0.07216878364870322*rho[2]*weight[6]-0.024056261216234404*rho[1]*weight[6]-0.041666666666666664*rho[0]*weight[6]+0.041666666666666664*weight[5]*rho[6]-0.041666666666666664*weight[4]*rho[6]+0.07216878364870322*weight[3]*rho[6]-0.07216878364870322*weight[2]*rho[6]-0.024056261216234404*weight[1]*rho[6]-0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]-0.041666666666666664*rho[4]*weight[5]+0.07216878364870322*rho[3]*weight[5]-0.024056261216234404*rho[2]*weight[5]-0.07216878364870322*rho[1]*weight[5]-0.041666666666666664*rho[0]*weight[5]-0.041666666666666664*weight[4]*rho[5]+0.07216878364870322*weight[3]*rho[5]-0.024056261216234404*weight[2]*rho[5]-0.07216878364870322*weight[1]*rho[5]-0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]-0.024056261216234404*rho[3]*weight[4]+0.07216878364870322*rho[2]*weight[4]+0.07216878364870322*rho[1]*weight[4]+0.041666666666666664*rho[0]*weight[4]-0.024056261216234404*weight[3]*rho[4]+0.07216878364870322*weight[2]*rho[4]+0.07216878364870322*weight[1]*rho[4]+0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]-0.041666666666666664*rho[2]*weight[3]-0.041666666666666664*rho[1]*weight[3]-0.07216878364870322*rho[0]*weight[3]-0.041666666666666664*weight[2]*rho[3]-0.041666666666666664*weight[1]*rho[3]-0.07216878364870322*weight[0]*rho[3]+0.125*rho[2]*weight[2]+0.041666666666666664*rho[1]*weight[2]+0.07216878364870322*rho[0]*weight[2]+0.041666666666666664*weight[1]*rho[2]+0.07216878364870322*weight[0]*rho[2]+0.125*rho[1]*weight[1]+0.07216878364870322*rho[0]*weight[1]+0.07216878364870322*weight[0]*rho[1]+0.125*rho[0]*weight[0]; #endif #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[4]],0.125*rho[7]*weight[7]-0.0721687836487032*rho[6]*weight[7]-0.0721687836487032*rho[5]*weight[7]+0.0721687836487032*rho[4]*weight[7]+0.041666666666666664*rho[3]*weight[7]-0.041666666666666664*rho[2]*weight[7]-0.041666666666666664*rho[1]*weight[7]+0.024056261216234404*rho[0]*weight[7]-0.0721687836487032*weight[6]*rho[7]-0.0721687836487032*weight[5]*rho[7]+0.0721687836487032*weight[4]*rho[7]+0.041666666666666664*weight[3]*rho[7]-0.041666666666666664*weight[2]*rho[7]-0.041666666666666664*weight[1]*rho[7]+0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]+0.041666666666666664*rho[5]*weight[6]-0.041666666666666664*rho[4]*weight[6]-0.0721687836487032*rho[3]*weight[6]+0.0721687836487032*rho[2]*weight[6]+0.024056261216234404*rho[1]*weight[6]-0.041666666666666664*rho[0]*weight[6]+0.041666666666666664*weight[5]*rho[6]-0.041666666666666664*weight[4]*rho[6]-0.0721687836487032*weight[3]*rho[6]+0.0721687836487032*weight[2]*rho[6]+0.024056261216234404*weight[1]*rho[6]-0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]-0.041666666666666664*rho[4]*weight[5]-0.0721687836487032*rho[3]*weight[5]+0.024056261216234404*rho[2]*weight[5]+0.0721687836487032*rho[1]*weight[5]-0.041666666666666664*rho[0]*weight[5]-0.041666666666666664*weight[4]*rho[5]-0.0721687836487032*weight[3]*rho[5]+0.024056261216234404*weight[2]*rho[5]+0.0721687836487032*weight[1]*rho[5]-0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]+0.024056261216234404*rho[3]*weight[4]-0.0721687836487032*rho[2]*weight[4]-0.0721687836487032*rho[1]*weight[4]+0.041666666666666664*rho[0]*weight[4]+0.024056261216234404*weight[3]*rho[4]-0.0721687836487032*weight[2]*rho[4]-0.0721687836487032*weight[1]*rho[4]+0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]-0.041666666666666664*rho[2]*weight[3]-0.041666666666666664*rho[1]*weight[3]+0.0721687836487032*rho[0]*weight[3]-0.041666666666666664*weight[2]*rho[3]-0.041666666666666664*weight[1]*rho[3]+0.0721687836487032*weight[0]*rho[3]+0.125*rho[2]*weight[2]+0.041666666666666664*rho[1]*weight[2]-0.0721687836487032*rho[0]*weight[2]+0.041666666666666664*weight[1]*rho[2]-0.0721687836487032*weight[0]*rho[2]+0.125*rho[1]*weight[1]-0.0721687836487032*rho[0]*weight[1]-0.0721687836487032*weight[0]*rho[1]+0.125*rho[0]*weight[0]); + atomicAdd(&bsrc[nodeOff+globalIdxs[4]],0.125*rho[7]*weight[7]-0.07216878364870322*rho[6]*weight[7]-0.07216878364870322*rho[5]*weight[7]+0.07216878364870322*rho[4]*weight[7]+0.041666666666666664*rho[3]*weight[7]-0.041666666666666664*rho[2]*weight[7]-0.041666666666666664*rho[1]*weight[7]+0.024056261216234404*rho[0]*weight[7]-0.07216878364870322*weight[6]*rho[7]-0.07216878364870322*weight[5]*rho[7]+0.07216878364870322*weight[4]*rho[7]+0.041666666666666664*weight[3]*rho[7]-0.041666666666666664*weight[2]*rho[7]-0.041666666666666664*weight[1]*rho[7]+0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]+0.041666666666666664*rho[5]*weight[6]-0.041666666666666664*rho[4]*weight[6]-0.07216878364870322*rho[3]*weight[6]+0.07216878364870322*rho[2]*weight[6]+0.024056261216234404*rho[1]*weight[6]-0.041666666666666664*rho[0]*weight[6]+0.041666666666666664*weight[5]*rho[6]-0.041666666666666664*weight[4]*rho[6]-0.07216878364870322*weight[3]*rho[6]+0.07216878364870322*weight[2]*rho[6]+0.024056261216234404*weight[1]*rho[6]-0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]-0.041666666666666664*rho[4]*weight[5]-0.07216878364870322*rho[3]*weight[5]+0.024056261216234404*rho[2]*weight[5]+0.07216878364870322*rho[1]*weight[5]-0.041666666666666664*rho[0]*weight[5]-0.041666666666666664*weight[4]*rho[5]-0.07216878364870322*weight[3]*rho[5]+0.024056261216234404*weight[2]*rho[5]+0.07216878364870322*weight[1]*rho[5]-0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]+0.024056261216234404*rho[3]*weight[4]-0.07216878364870322*rho[2]*weight[4]-0.07216878364870322*rho[1]*weight[4]+0.041666666666666664*rho[0]*weight[4]+0.024056261216234404*weight[3]*rho[4]-0.07216878364870322*weight[2]*rho[4]-0.07216878364870322*weight[1]*rho[4]+0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]-0.041666666666666664*rho[2]*weight[3]-0.041666666666666664*rho[1]*weight[3]+0.07216878364870322*rho[0]*weight[3]-0.041666666666666664*weight[2]*rho[3]-0.041666666666666664*weight[1]*rho[3]+0.07216878364870322*weight[0]*rho[3]+0.125*rho[2]*weight[2]+0.041666666666666664*rho[1]*weight[2]-0.07216878364870322*rho[0]*weight[2]+0.041666666666666664*weight[1]*rho[2]-0.07216878364870322*weight[0]*rho[2]+0.125*rho[1]*weight[1]-0.07216878364870322*rho[0]*weight[1]-0.07216878364870322*weight[0]*rho[1]+0.125*rho[0]*weight[0]); #else - bsrc[nodeOff+globalIdxs[4]] += 0.125*rho[7]*weight[7]-0.0721687836487032*rho[6]*weight[7]-0.0721687836487032*rho[5]*weight[7]+0.0721687836487032*rho[4]*weight[7]+0.041666666666666664*rho[3]*weight[7]-0.041666666666666664*rho[2]*weight[7]-0.041666666666666664*rho[1]*weight[7]+0.024056261216234404*rho[0]*weight[7]-0.0721687836487032*weight[6]*rho[7]-0.0721687836487032*weight[5]*rho[7]+0.0721687836487032*weight[4]*rho[7]+0.041666666666666664*weight[3]*rho[7]-0.041666666666666664*weight[2]*rho[7]-0.041666666666666664*weight[1]*rho[7]+0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]+0.041666666666666664*rho[5]*weight[6]-0.041666666666666664*rho[4]*weight[6]-0.0721687836487032*rho[3]*weight[6]+0.0721687836487032*rho[2]*weight[6]+0.024056261216234404*rho[1]*weight[6]-0.041666666666666664*rho[0]*weight[6]+0.041666666666666664*weight[5]*rho[6]-0.041666666666666664*weight[4]*rho[6]-0.0721687836487032*weight[3]*rho[6]+0.0721687836487032*weight[2]*rho[6]+0.024056261216234404*weight[1]*rho[6]-0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]-0.041666666666666664*rho[4]*weight[5]-0.0721687836487032*rho[3]*weight[5]+0.024056261216234404*rho[2]*weight[5]+0.0721687836487032*rho[1]*weight[5]-0.041666666666666664*rho[0]*weight[5]-0.041666666666666664*weight[4]*rho[5]-0.0721687836487032*weight[3]*rho[5]+0.024056261216234404*weight[2]*rho[5]+0.0721687836487032*weight[1]*rho[5]-0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]+0.024056261216234404*rho[3]*weight[4]-0.0721687836487032*rho[2]*weight[4]-0.0721687836487032*rho[1]*weight[4]+0.041666666666666664*rho[0]*weight[4]+0.024056261216234404*weight[3]*rho[4]-0.0721687836487032*weight[2]*rho[4]-0.0721687836487032*weight[1]*rho[4]+0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]-0.041666666666666664*rho[2]*weight[3]-0.041666666666666664*rho[1]*weight[3]+0.0721687836487032*rho[0]*weight[3]-0.041666666666666664*weight[2]*rho[3]-0.041666666666666664*weight[1]*rho[3]+0.0721687836487032*weight[0]*rho[3]+0.125*rho[2]*weight[2]+0.041666666666666664*rho[1]*weight[2]-0.0721687836487032*rho[0]*weight[2]+0.041666666666666664*weight[1]*rho[2]-0.0721687836487032*weight[0]*rho[2]+0.125*rho[1]*weight[1]-0.0721687836487032*rho[0]*weight[1]-0.0721687836487032*weight[0]*rho[1]+0.125*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[4]] += 0.125*rho[7]*weight[7]-0.07216878364870322*rho[6]*weight[7]-0.07216878364870322*rho[5]*weight[7]+0.07216878364870322*rho[4]*weight[7]+0.041666666666666664*rho[3]*weight[7]-0.041666666666666664*rho[2]*weight[7]-0.041666666666666664*rho[1]*weight[7]+0.024056261216234404*rho[0]*weight[7]-0.07216878364870322*weight[6]*rho[7]-0.07216878364870322*weight[5]*rho[7]+0.07216878364870322*weight[4]*rho[7]+0.041666666666666664*weight[3]*rho[7]-0.041666666666666664*weight[2]*rho[7]-0.041666666666666664*weight[1]*rho[7]+0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]+0.041666666666666664*rho[5]*weight[6]-0.041666666666666664*rho[4]*weight[6]-0.07216878364870322*rho[3]*weight[6]+0.07216878364870322*rho[2]*weight[6]+0.024056261216234404*rho[1]*weight[6]-0.041666666666666664*rho[0]*weight[6]+0.041666666666666664*weight[5]*rho[6]-0.041666666666666664*weight[4]*rho[6]-0.07216878364870322*weight[3]*rho[6]+0.07216878364870322*weight[2]*rho[6]+0.024056261216234404*weight[1]*rho[6]-0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]-0.041666666666666664*rho[4]*weight[5]-0.07216878364870322*rho[3]*weight[5]+0.024056261216234404*rho[2]*weight[5]+0.07216878364870322*rho[1]*weight[5]-0.041666666666666664*rho[0]*weight[5]-0.041666666666666664*weight[4]*rho[5]-0.07216878364870322*weight[3]*rho[5]+0.024056261216234404*weight[2]*rho[5]+0.07216878364870322*weight[1]*rho[5]-0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]+0.024056261216234404*rho[3]*weight[4]-0.07216878364870322*rho[2]*weight[4]-0.07216878364870322*rho[1]*weight[4]+0.041666666666666664*rho[0]*weight[4]+0.024056261216234404*weight[3]*rho[4]-0.07216878364870322*weight[2]*rho[4]-0.07216878364870322*weight[1]*rho[4]+0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]-0.041666666666666664*rho[2]*weight[3]-0.041666666666666664*rho[1]*weight[3]+0.07216878364870322*rho[0]*weight[3]-0.041666666666666664*weight[2]*rho[3]-0.041666666666666664*weight[1]*rho[3]+0.07216878364870322*weight[0]*rho[3]+0.125*rho[2]*weight[2]+0.041666666666666664*rho[1]*weight[2]-0.07216878364870322*rho[0]*weight[2]+0.041666666666666664*weight[1]*rho[2]-0.07216878364870322*weight[0]*rho[2]+0.125*rho[1]*weight[1]-0.07216878364870322*rho[0]*weight[1]-0.07216878364870322*weight[0]*rho[1]+0.125*rho[0]*weight[0]; #endif #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[5]],0.125*rho[7]*weight[7]+0.0721687836487032*rho[6]*weight[7]-0.0721687836487032*rho[5]*weight[7]+0.0721687836487032*rho[4]*weight[7]-0.041666666666666664*rho[3]*weight[7]+0.041666666666666664*rho[2]*weight[7]-0.041666666666666664*rho[1]*weight[7]-0.024056261216234404*rho[0]*weight[7]+0.0721687836487032*weight[6]*rho[7]-0.0721687836487032*weight[5]*rho[7]+0.0721687836487032*weight[4]*rho[7]-0.041666666666666664*weight[3]*rho[7]+0.041666666666666664*weight[2]*rho[7]-0.041666666666666664*weight[1]*rho[7]-0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]-0.041666666666666664*rho[5]*weight[6]+0.041666666666666664*rho[4]*weight[6]-0.0721687836487032*rho[3]*weight[6]+0.0721687836487032*rho[2]*weight[6]-0.024056261216234404*rho[1]*weight[6]-0.041666666666666664*rho[0]*weight[6]-0.041666666666666664*weight[5]*rho[6]+0.041666666666666664*weight[4]*rho[6]-0.0721687836487032*weight[3]*rho[6]+0.0721687836487032*weight[2]*rho[6]-0.024056261216234404*weight[1]*rho[6]-0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]-0.041666666666666664*rho[4]*weight[5]+0.0721687836487032*rho[3]*weight[5]-0.024056261216234404*rho[2]*weight[5]+0.0721687836487032*rho[1]*weight[5]+0.041666666666666664*rho[0]*weight[5]-0.041666666666666664*weight[4]*rho[5]+0.0721687836487032*weight[3]*rho[5]-0.024056261216234404*weight[2]*rho[5]+0.0721687836487032*weight[1]*rho[5]+0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]-0.024056261216234404*rho[3]*weight[4]+0.0721687836487032*rho[2]*weight[4]-0.0721687836487032*rho[1]*weight[4]-0.041666666666666664*rho[0]*weight[4]-0.024056261216234404*weight[3]*rho[4]+0.0721687836487032*weight[2]*rho[4]-0.0721687836487032*weight[1]*rho[4]-0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]-0.041666666666666664*rho[2]*weight[3]+0.041666666666666664*rho[1]*weight[3]+0.0721687836487032*rho[0]*weight[3]-0.041666666666666664*weight[2]*rho[3]+0.041666666666666664*weight[1]*rho[3]+0.0721687836487032*weight[0]*rho[3]+0.125*rho[2]*weight[2]-0.041666666666666664*rho[1]*weight[2]-0.0721687836487032*rho[0]*weight[2]-0.041666666666666664*weight[1]*rho[2]-0.0721687836487032*weight[0]*rho[2]+0.125*rho[1]*weight[1]+0.0721687836487032*rho[0]*weight[1]+0.0721687836487032*weight[0]*rho[1]+0.125*rho[0]*weight[0]); + atomicAdd(&bsrc[nodeOff+globalIdxs[5]],0.125*rho[7]*weight[7]+0.07216878364870322*rho[6]*weight[7]-0.07216878364870322*rho[5]*weight[7]+0.07216878364870322*rho[4]*weight[7]-0.041666666666666664*rho[3]*weight[7]+0.041666666666666664*rho[2]*weight[7]-0.041666666666666664*rho[1]*weight[7]-0.024056261216234404*rho[0]*weight[7]+0.07216878364870322*weight[6]*rho[7]-0.07216878364870322*weight[5]*rho[7]+0.07216878364870322*weight[4]*rho[7]-0.041666666666666664*weight[3]*rho[7]+0.041666666666666664*weight[2]*rho[7]-0.041666666666666664*weight[1]*rho[7]-0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]-0.041666666666666664*rho[5]*weight[6]+0.041666666666666664*rho[4]*weight[6]-0.07216878364870322*rho[3]*weight[6]+0.07216878364870322*rho[2]*weight[6]-0.024056261216234404*rho[1]*weight[6]-0.041666666666666664*rho[0]*weight[6]-0.041666666666666664*weight[5]*rho[6]+0.041666666666666664*weight[4]*rho[6]-0.07216878364870322*weight[3]*rho[6]+0.07216878364870322*weight[2]*rho[6]-0.024056261216234404*weight[1]*rho[6]-0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]-0.041666666666666664*rho[4]*weight[5]+0.07216878364870322*rho[3]*weight[5]-0.024056261216234404*rho[2]*weight[5]+0.07216878364870322*rho[1]*weight[5]+0.041666666666666664*rho[0]*weight[5]-0.041666666666666664*weight[4]*rho[5]+0.07216878364870322*weight[3]*rho[5]-0.024056261216234404*weight[2]*rho[5]+0.07216878364870322*weight[1]*rho[5]+0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]-0.024056261216234404*rho[3]*weight[4]+0.07216878364870322*rho[2]*weight[4]-0.07216878364870322*rho[1]*weight[4]-0.041666666666666664*rho[0]*weight[4]-0.024056261216234404*weight[3]*rho[4]+0.07216878364870322*weight[2]*rho[4]-0.07216878364870322*weight[1]*rho[4]-0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]-0.041666666666666664*rho[2]*weight[3]+0.041666666666666664*rho[1]*weight[3]+0.07216878364870322*rho[0]*weight[3]-0.041666666666666664*weight[2]*rho[3]+0.041666666666666664*weight[1]*rho[3]+0.07216878364870322*weight[0]*rho[3]+0.125*rho[2]*weight[2]-0.041666666666666664*rho[1]*weight[2]-0.07216878364870322*rho[0]*weight[2]-0.041666666666666664*weight[1]*rho[2]-0.07216878364870322*weight[0]*rho[2]+0.125*rho[1]*weight[1]+0.07216878364870322*rho[0]*weight[1]+0.07216878364870322*weight[0]*rho[1]+0.125*rho[0]*weight[0]); #else - bsrc[nodeOff+globalIdxs[5]] += 0.125*rho[7]*weight[7]+0.0721687836487032*rho[6]*weight[7]-0.0721687836487032*rho[5]*weight[7]+0.0721687836487032*rho[4]*weight[7]-0.041666666666666664*rho[3]*weight[7]+0.041666666666666664*rho[2]*weight[7]-0.041666666666666664*rho[1]*weight[7]-0.024056261216234404*rho[0]*weight[7]+0.0721687836487032*weight[6]*rho[7]-0.0721687836487032*weight[5]*rho[7]+0.0721687836487032*weight[4]*rho[7]-0.041666666666666664*weight[3]*rho[7]+0.041666666666666664*weight[2]*rho[7]-0.041666666666666664*weight[1]*rho[7]-0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]-0.041666666666666664*rho[5]*weight[6]+0.041666666666666664*rho[4]*weight[6]-0.0721687836487032*rho[3]*weight[6]+0.0721687836487032*rho[2]*weight[6]-0.024056261216234404*rho[1]*weight[6]-0.041666666666666664*rho[0]*weight[6]-0.041666666666666664*weight[5]*rho[6]+0.041666666666666664*weight[4]*rho[6]-0.0721687836487032*weight[3]*rho[6]+0.0721687836487032*weight[2]*rho[6]-0.024056261216234404*weight[1]*rho[6]-0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]-0.041666666666666664*rho[4]*weight[5]+0.0721687836487032*rho[3]*weight[5]-0.024056261216234404*rho[2]*weight[5]+0.0721687836487032*rho[1]*weight[5]+0.041666666666666664*rho[0]*weight[5]-0.041666666666666664*weight[4]*rho[5]+0.0721687836487032*weight[3]*rho[5]-0.024056261216234404*weight[2]*rho[5]+0.0721687836487032*weight[1]*rho[5]+0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]-0.024056261216234404*rho[3]*weight[4]+0.0721687836487032*rho[2]*weight[4]-0.0721687836487032*rho[1]*weight[4]-0.041666666666666664*rho[0]*weight[4]-0.024056261216234404*weight[3]*rho[4]+0.0721687836487032*weight[2]*rho[4]-0.0721687836487032*weight[1]*rho[4]-0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]-0.041666666666666664*rho[2]*weight[3]+0.041666666666666664*rho[1]*weight[3]+0.0721687836487032*rho[0]*weight[3]-0.041666666666666664*weight[2]*rho[3]+0.041666666666666664*weight[1]*rho[3]+0.0721687836487032*weight[0]*rho[3]+0.125*rho[2]*weight[2]-0.041666666666666664*rho[1]*weight[2]-0.0721687836487032*rho[0]*weight[2]-0.041666666666666664*weight[1]*rho[2]-0.0721687836487032*weight[0]*rho[2]+0.125*rho[1]*weight[1]+0.0721687836487032*rho[0]*weight[1]+0.0721687836487032*weight[0]*rho[1]+0.125*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[5]] += 0.125*rho[7]*weight[7]+0.07216878364870322*rho[6]*weight[7]-0.07216878364870322*rho[5]*weight[7]+0.07216878364870322*rho[4]*weight[7]-0.041666666666666664*rho[3]*weight[7]+0.041666666666666664*rho[2]*weight[7]-0.041666666666666664*rho[1]*weight[7]-0.024056261216234404*rho[0]*weight[7]+0.07216878364870322*weight[6]*rho[7]-0.07216878364870322*weight[5]*rho[7]+0.07216878364870322*weight[4]*rho[7]-0.041666666666666664*weight[3]*rho[7]+0.041666666666666664*weight[2]*rho[7]-0.041666666666666664*weight[1]*rho[7]-0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]-0.041666666666666664*rho[5]*weight[6]+0.041666666666666664*rho[4]*weight[6]-0.07216878364870322*rho[3]*weight[6]+0.07216878364870322*rho[2]*weight[6]-0.024056261216234404*rho[1]*weight[6]-0.041666666666666664*rho[0]*weight[6]-0.041666666666666664*weight[5]*rho[6]+0.041666666666666664*weight[4]*rho[6]-0.07216878364870322*weight[3]*rho[6]+0.07216878364870322*weight[2]*rho[6]-0.024056261216234404*weight[1]*rho[6]-0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]-0.041666666666666664*rho[4]*weight[5]+0.07216878364870322*rho[3]*weight[5]-0.024056261216234404*rho[2]*weight[5]+0.07216878364870322*rho[1]*weight[5]+0.041666666666666664*rho[0]*weight[5]-0.041666666666666664*weight[4]*rho[5]+0.07216878364870322*weight[3]*rho[5]-0.024056261216234404*weight[2]*rho[5]+0.07216878364870322*weight[1]*rho[5]+0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]-0.024056261216234404*rho[3]*weight[4]+0.07216878364870322*rho[2]*weight[4]-0.07216878364870322*rho[1]*weight[4]-0.041666666666666664*rho[0]*weight[4]-0.024056261216234404*weight[3]*rho[4]+0.07216878364870322*weight[2]*rho[4]-0.07216878364870322*weight[1]*rho[4]-0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]-0.041666666666666664*rho[2]*weight[3]+0.041666666666666664*rho[1]*weight[3]+0.07216878364870322*rho[0]*weight[3]-0.041666666666666664*weight[2]*rho[3]+0.041666666666666664*weight[1]*rho[3]+0.07216878364870322*weight[0]*rho[3]+0.125*rho[2]*weight[2]-0.041666666666666664*rho[1]*weight[2]-0.07216878364870322*rho[0]*weight[2]-0.041666666666666664*weight[1]*rho[2]-0.07216878364870322*weight[0]*rho[2]+0.125*rho[1]*weight[1]+0.07216878364870322*rho[0]*weight[1]+0.07216878364870322*weight[0]*rho[1]+0.125*rho[0]*weight[0]; #endif #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[6]],0.125*rho[7]*weight[7]-0.0721687836487032*rho[6]*weight[7]+0.0721687836487032*rho[5]*weight[7]+0.0721687836487032*rho[4]*weight[7]-0.041666666666666664*rho[3]*weight[7]-0.041666666666666664*rho[2]*weight[7]+0.041666666666666664*rho[1]*weight[7]-0.024056261216234404*rho[0]*weight[7]-0.0721687836487032*weight[6]*rho[7]+0.0721687836487032*weight[5]*rho[7]+0.0721687836487032*weight[4]*rho[7]-0.041666666666666664*weight[3]*rho[7]-0.041666666666666664*weight[2]*rho[7]+0.041666666666666664*weight[1]*rho[7]-0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]-0.041666666666666664*rho[5]*weight[6]-0.041666666666666664*rho[4]*weight[6]+0.0721687836487032*rho[3]*weight[6]+0.0721687836487032*rho[2]*weight[6]-0.024056261216234404*rho[1]*weight[6]+0.041666666666666664*rho[0]*weight[6]-0.041666666666666664*weight[5]*rho[6]-0.041666666666666664*weight[4]*rho[6]+0.0721687836487032*weight[3]*rho[6]+0.0721687836487032*weight[2]*rho[6]-0.024056261216234404*weight[1]*rho[6]+0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]+0.041666666666666664*rho[4]*weight[5]-0.0721687836487032*rho[3]*weight[5]-0.024056261216234404*rho[2]*weight[5]+0.0721687836487032*rho[1]*weight[5]-0.041666666666666664*rho[0]*weight[5]+0.041666666666666664*weight[4]*rho[5]-0.0721687836487032*weight[3]*rho[5]-0.024056261216234404*weight[2]*rho[5]+0.0721687836487032*weight[1]*rho[5]-0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]-0.024056261216234404*rho[3]*weight[4]-0.0721687836487032*rho[2]*weight[4]+0.0721687836487032*rho[1]*weight[4]-0.041666666666666664*rho[0]*weight[4]-0.024056261216234404*weight[3]*rho[4]-0.0721687836487032*weight[2]*rho[4]+0.0721687836487032*weight[1]*rho[4]-0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]+0.041666666666666664*rho[2]*weight[3]-0.041666666666666664*rho[1]*weight[3]+0.0721687836487032*rho[0]*weight[3]+0.041666666666666664*weight[2]*rho[3]-0.041666666666666664*weight[1]*rho[3]+0.0721687836487032*weight[0]*rho[3]+0.125*rho[2]*weight[2]-0.041666666666666664*rho[1]*weight[2]+0.0721687836487032*rho[0]*weight[2]-0.041666666666666664*weight[1]*rho[2]+0.0721687836487032*weight[0]*rho[2]+0.125*rho[1]*weight[1]-0.0721687836487032*rho[0]*weight[1]-0.0721687836487032*weight[0]*rho[1]+0.125*rho[0]*weight[0]); + atomicAdd(&bsrc[nodeOff+globalIdxs[6]],0.125*rho[7]*weight[7]-0.07216878364870322*rho[6]*weight[7]+0.07216878364870322*rho[5]*weight[7]+0.07216878364870322*rho[4]*weight[7]-0.041666666666666664*rho[3]*weight[7]-0.041666666666666664*rho[2]*weight[7]+0.041666666666666664*rho[1]*weight[7]-0.024056261216234404*rho[0]*weight[7]-0.07216878364870322*weight[6]*rho[7]+0.07216878364870322*weight[5]*rho[7]+0.07216878364870322*weight[4]*rho[7]-0.041666666666666664*weight[3]*rho[7]-0.041666666666666664*weight[2]*rho[7]+0.041666666666666664*weight[1]*rho[7]-0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]-0.041666666666666664*rho[5]*weight[6]-0.041666666666666664*rho[4]*weight[6]+0.07216878364870322*rho[3]*weight[6]+0.07216878364870322*rho[2]*weight[6]-0.024056261216234404*rho[1]*weight[6]+0.041666666666666664*rho[0]*weight[6]-0.041666666666666664*weight[5]*rho[6]-0.041666666666666664*weight[4]*rho[6]+0.07216878364870322*weight[3]*rho[6]+0.07216878364870322*weight[2]*rho[6]-0.024056261216234404*weight[1]*rho[6]+0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]+0.041666666666666664*rho[4]*weight[5]-0.07216878364870322*rho[3]*weight[5]-0.024056261216234404*rho[2]*weight[5]+0.07216878364870322*rho[1]*weight[5]-0.041666666666666664*rho[0]*weight[5]+0.041666666666666664*weight[4]*rho[5]-0.07216878364870322*weight[3]*rho[5]-0.024056261216234404*weight[2]*rho[5]+0.07216878364870322*weight[1]*rho[5]-0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]-0.024056261216234404*rho[3]*weight[4]-0.07216878364870322*rho[2]*weight[4]+0.07216878364870322*rho[1]*weight[4]-0.041666666666666664*rho[0]*weight[4]-0.024056261216234404*weight[3]*rho[4]-0.07216878364870322*weight[2]*rho[4]+0.07216878364870322*weight[1]*rho[4]-0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]+0.041666666666666664*rho[2]*weight[3]-0.041666666666666664*rho[1]*weight[3]+0.07216878364870322*rho[0]*weight[3]+0.041666666666666664*weight[2]*rho[3]-0.041666666666666664*weight[1]*rho[3]+0.07216878364870322*weight[0]*rho[3]+0.125*rho[2]*weight[2]-0.041666666666666664*rho[1]*weight[2]+0.07216878364870322*rho[0]*weight[2]-0.041666666666666664*weight[1]*rho[2]+0.07216878364870322*weight[0]*rho[2]+0.125*rho[1]*weight[1]-0.07216878364870322*rho[0]*weight[1]-0.07216878364870322*weight[0]*rho[1]+0.125*rho[0]*weight[0]); #else - bsrc[nodeOff+globalIdxs[6]] += 0.125*rho[7]*weight[7]-0.0721687836487032*rho[6]*weight[7]+0.0721687836487032*rho[5]*weight[7]+0.0721687836487032*rho[4]*weight[7]-0.041666666666666664*rho[3]*weight[7]-0.041666666666666664*rho[2]*weight[7]+0.041666666666666664*rho[1]*weight[7]-0.024056261216234404*rho[0]*weight[7]-0.0721687836487032*weight[6]*rho[7]+0.0721687836487032*weight[5]*rho[7]+0.0721687836487032*weight[4]*rho[7]-0.041666666666666664*weight[3]*rho[7]-0.041666666666666664*weight[2]*rho[7]+0.041666666666666664*weight[1]*rho[7]-0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]-0.041666666666666664*rho[5]*weight[6]-0.041666666666666664*rho[4]*weight[6]+0.0721687836487032*rho[3]*weight[6]+0.0721687836487032*rho[2]*weight[6]-0.024056261216234404*rho[1]*weight[6]+0.041666666666666664*rho[0]*weight[6]-0.041666666666666664*weight[5]*rho[6]-0.041666666666666664*weight[4]*rho[6]+0.0721687836487032*weight[3]*rho[6]+0.0721687836487032*weight[2]*rho[6]-0.024056261216234404*weight[1]*rho[6]+0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]+0.041666666666666664*rho[4]*weight[5]-0.0721687836487032*rho[3]*weight[5]-0.024056261216234404*rho[2]*weight[5]+0.0721687836487032*rho[1]*weight[5]-0.041666666666666664*rho[0]*weight[5]+0.041666666666666664*weight[4]*rho[5]-0.0721687836487032*weight[3]*rho[5]-0.024056261216234404*weight[2]*rho[5]+0.0721687836487032*weight[1]*rho[5]-0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]-0.024056261216234404*rho[3]*weight[4]-0.0721687836487032*rho[2]*weight[4]+0.0721687836487032*rho[1]*weight[4]-0.041666666666666664*rho[0]*weight[4]-0.024056261216234404*weight[3]*rho[4]-0.0721687836487032*weight[2]*rho[4]+0.0721687836487032*weight[1]*rho[4]-0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]+0.041666666666666664*rho[2]*weight[3]-0.041666666666666664*rho[1]*weight[3]+0.0721687836487032*rho[0]*weight[3]+0.041666666666666664*weight[2]*rho[3]-0.041666666666666664*weight[1]*rho[3]+0.0721687836487032*weight[0]*rho[3]+0.125*rho[2]*weight[2]-0.041666666666666664*rho[1]*weight[2]+0.0721687836487032*rho[0]*weight[2]-0.041666666666666664*weight[1]*rho[2]+0.0721687836487032*weight[0]*rho[2]+0.125*rho[1]*weight[1]-0.0721687836487032*rho[0]*weight[1]-0.0721687836487032*weight[0]*rho[1]+0.125*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[6]] += 0.125*rho[7]*weight[7]-0.07216878364870322*rho[6]*weight[7]+0.07216878364870322*rho[5]*weight[7]+0.07216878364870322*rho[4]*weight[7]-0.041666666666666664*rho[3]*weight[7]-0.041666666666666664*rho[2]*weight[7]+0.041666666666666664*rho[1]*weight[7]-0.024056261216234404*rho[0]*weight[7]-0.07216878364870322*weight[6]*rho[7]+0.07216878364870322*weight[5]*rho[7]+0.07216878364870322*weight[4]*rho[7]-0.041666666666666664*weight[3]*rho[7]-0.041666666666666664*weight[2]*rho[7]+0.041666666666666664*weight[1]*rho[7]-0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]-0.041666666666666664*rho[5]*weight[6]-0.041666666666666664*rho[4]*weight[6]+0.07216878364870322*rho[3]*weight[6]+0.07216878364870322*rho[2]*weight[6]-0.024056261216234404*rho[1]*weight[6]+0.041666666666666664*rho[0]*weight[6]-0.041666666666666664*weight[5]*rho[6]-0.041666666666666664*weight[4]*rho[6]+0.07216878364870322*weight[3]*rho[6]+0.07216878364870322*weight[2]*rho[6]-0.024056261216234404*weight[1]*rho[6]+0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]+0.041666666666666664*rho[4]*weight[5]-0.07216878364870322*rho[3]*weight[5]-0.024056261216234404*rho[2]*weight[5]+0.07216878364870322*rho[1]*weight[5]-0.041666666666666664*rho[0]*weight[5]+0.041666666666666664*weight[4]*rho[5]-0.07216878364870322*weight[3]*rho[5]-0.024056261216234404*weight[2]*rho[5]+0.07216878364870322*weight[1]*rho[5]-0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]-0.024056261216234404*rho[3]*weight[4]-0.07216878364870322*rho[2]*weight[4]+0.07216878364870322*rho[1]*weight[4]-0.041666666666666664*rho[0]*weight[4]-0.024056261216234404*weight[3]*rho[4]-0.07216878364870322*weight[2]*rho[4]+0.07216878364870322*weight[1]*rho[4]-0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]+0.041666666666666664*rho[2]*weight[3]-0.041666666666666664*rho[1]*weight[3]+0.07216878364870322*rho[0]*weight[3]+0.041666666666666664*weight[2]*rho[3]-0.041666666666666664*weight[1]*rho[3]+0.07216878364870322*weight[0]*rho[3]+0.125*rho[2]*weight[2]-0.041666666666666664*rho[1]*weight[2]+0.07216878364870322*rho[0]*weight[2]-0.041666666666666664*weight[1]*rho[2]+0.07216878364870322*weight[0]*rho[2]+0.125*rho[1]*weight[1]-0.07216878364870322*rho[0]*weight[1]-0.07216878364870322*weight[0]*rho[1]+0.125*rho[0]*weight[0]; #endif #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[7]],0.125*rho[7]*weight[7]+0.0721687836487032*rho[6]*weight[7]+0.0721687836487032*rho[5]*weight[7]+0.0721687836487032*rho[4]*weight[7]+0.041666666666666664*rho[3]*weight[7]+0.041666666666666664*rho[2]*weight[7]+0.041666666666666664*rho[1]*weight[7]+0.024056261216234404*rho[0]*weight[7]+0.0721687836487032*weight[6]*rho[7]+0.0721687836487032*weight[5]*rho[7]+0.0721687836487032*weight[4]*rho[7]+0.041666666666666664*weight[3]*rho[7]+0.041666666666666664*weight[2]*rho[7]+0.041666666666666664*weight[1]*rho[7]+0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]+0.041666666666666664*rho[5]*weight[6]+0.041666666666666664*rho[4]*weight[6]+0.0721687836487032*rho[3]*weight[6]+0.0721687836487032*rho[2]*weight[6]+0.024056261216234404*rho[1]*weight[6]+0.041666666666666664*rho[0]*weight[6]+0.041666666666666664*weight[5]*rho[6]+0.041666666666666664*weight[4]*rho[6]+0.0721687836487032*weight[3]*rho[6]+0.0721687836487032*weight[2]*rho[6]+0.024056261216234404*weight[1]*rho[6]+0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]+0.041666666666666664*rho[4]*weight[5]+0.0721687836487032*rho[3]*weight[5]+0.024056261216234404*rho[2]*weight[5]+0.0721687836487032*rho[1]*weight[5]+0.041666666666666664*rho[0]*weight[5]+0.041666666666666664*weight[4]*rho[5]+0.0721687836487032*weight[3]*rho[5]+0.024056261216234404*weight[2]*rho[5]+0.0721687836487032*weight[1]*rho[5]+0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]+0.024056261216234404*rho[3]*weight[4]+0.0721687836487032*rho[2]*weight[4]+0.0721687836487032*rho[1]*weight[4]+0.041666666666666664*rho[0]*weight[4]+0.024056261216234404*weight[3]*rho[4]+0.0721687836487032*weight[2]*rho[4]+0.0721687836487032*weight[1]*rho[4]+0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]+0.041666666666666664*rho[2]*weight[3]+0.041666666666666664*rho[1]*weight[3]+0.0721687836487032*rho[0]*weight[3]+0.041666666666666664*weight[2]*rho[3]+0.041666666666666664*weight[1]*rho[3]+0.0721687836487032*weight[0]*rho[3]+0.125*rho[2]*weight[2]+0.041666666666666664*rho[1]*weight[2]+0.0721687836487032*rho[0]*weight[2]+0.041666666666666664*weight[1]*rho[2]+0.0721687836487032*weight[0]*rho[2]+0.125*rho[1]*weight[1]+0.0721687836487032*rho[0]*weight[1]+0.0721687836487032*weight[0]*rho[1]+0.125*rho[0]*weight[0]); + atomicAdd(&bsrc[nodeOff+globalIdxs[7]],0.125*rho[7]*weight[7]+0.07216878364870322*rho[6]*weight[7]+0.07216878364870322*rho[5]*weight[7]+0.07216878364870322*rho[4]*weight[7]+0.041666666666666664*rho[3]*weight[7]+0.041666666666666664*rho[2]*weight[7]+0.041666666666666664*rho[1]*weight[7]+0.024056261216234404*rho[0]*weight[7]+0.07216878364870322*weight[6]*rho[7]+0.07216878364870322*weight[5]*rho[7]+0.07216878364870322*weight[4]*rho[7]+0.041666666666666664*weight[3]*rho[7]+0.041666666666666664*weight[2]*rho[7]+0.041666666666666664*weight[1]*rho[7]+0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]+0.041666666666666664*rho[5]*weight[6]+0.041666666666666664*rho[4]*weight[6]+0.07216878364870322*rho[3]*weight[6]+0.07216878364870322*rho[2]*weight[6]+0.024056261216234404*rho[1]*weight[6]+0.041666666666666664*rho[0]*weight[6]+0.041666666666666664*weight[5]*rho[6]+0.041666666666666664*weight[4]*rho[6]+0.07216878364870322*weight[3]*rho[6]+0.07216878364870322*weight[2]*rho[6]+0.024056261216234404*weight[1]*rho[6]+0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]+0.041666666666666664*rho[4]*weight[5]+0.07216878364870322*rho[3]*weight[5]+0.024056261216234404*rho[2]*weight[5]+0.07216878364870322*rho[1]*weight[5]+0.041666666666666664*rho[0]*weight[5]+0.041666666666666664*weight[4]*rho[5]+0.07216878364870322*weight[3]*rho[5]+0.024056261216234404*weight[2]*rho[5]+0.07216878364870322*weight[1]*rho[5]+0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]+0.024056261216234404*rho[3]*weight[4]+0.07216878364870322*rho[2]*weight[4]+0.07216878364870322*rho[1]*weight[4]+0.041666666666666664*rho[0]*weight[4]+0.024056261216234404*weight[3]*rho[4]+0.07216878364870322*weight[2]*rho[4]+0.07216878364870322*weight[1]*rho[4]+0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]+0.041666666666666664*rho[2]*weight[3]+0.041666666666666664*rho[1]*weight[3]+0.07216878364870322*rho[0]*weight[3]+0.041666666666666664*weight[2]*rho[3]+0.041666666666666664*weight[1]*rho[3]+0.07216878364870322*weight[0]*rho[3]+0.125*rho[2]*weight[2]+0.041666666666666664*rho[1]*weight[2]+0.07216878364870322*rho[0]*weight[2]+0.041666666666666664*weight[1]*rho[2]+0.07216878364870322*weight[0]*rho[2]+0.125*rho[1]*weight[1]+0.07216878364870322*rho[0]*weight[1]+0.07216878364870322*weight[0]*rho[1]+0.125*rho[0]*weight[0]); #else - bsrc[nodeOff+globalIdxs[7]] += 0.125*rho[7]*weight[7]+0.0721687836487032*rho[6]*weight[7]+0.0721687836487032*rho[5]*weight[7]+0.0721687836487032*rho[4]*weight[7]+0.041666666666666664*rho[3]*weight[7]+0.041666666666666664*rho[2]*weight[7]+0.041666666666666664*rho[1]*weight[7]+0.024056261216234404*rho[0]*weight[7]+0.0721687836487032*weight[6]*rho[7]+0.0721687836487032*weight[5]*rho[7]+0.0721687836487032*weight[4]*rho[7]+0.041666666666666664*weight[3]*rho[7]+0.041666666666666664*weight[2]*rho[7]+0.041666666666666664*weight[1]*rho[7]+0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]+0.041666666666666664*rho[5]*weight[6]+0.041666666666666664*rho[4]*weight[6]+0.0721687836487032*rho[3]*weight[6]+0.0721687836487032*rho[2]*weight[6]+0.024056261216234404*rho[1]*weight[6]+0.041666666666666664*rho[0]*weight[6]+0.041666666666666664*weight[5]*rho[6]+0.041666666666666664*weight[4]*rho[6]+0.0721687836487032*weight[3]*rho[6]+0.0721687836487032*weight[2]*rho[6]+0.024056261216234404*weight[1]*rho[6]+0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]+0.041666666666666664*rho[4]*weight[5]+0.0721687836487032*rho[3]*weight[5]+0.024056261216234404*rho[2]*weight[5]+0.0721687836487032*rho[1]*weight[5]+0.041666666666666664*rho[0]*weight[5]+0.041666666666666664*weight[4]*rho[5]+0.0721687836487032*weight[3]*rho[5]+0.024056261216234404*weight[2]*rho[5]+0.0721687836487032*weight[1]*rho[5]+0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]+0.024056261216234404*rho[3]*weight[4]+0.0721687836487032*rho[2]*weight[4]+0.0721687836487032*rho[1]*weight[4]+0.041666666666666664*rho[0]*weight[4]+0.024056261216234404*weight[3]*rho[4]+0.0721687836487032*weight[2]*rho[4]+0.0721687836487032*weight[1]*rho[4]+0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]+0.041666666666666664*rho[2]*weight[3]+0.041666666666666664*rho[1]*weight[3]+0.0721687836487032*rho[0]*weight[3]+0.041666666666666664*weight[2]*rho[3]+0.041666666666666664*weight[1]*rho[3]+0.0721687836487032*weight[0]*rho[3]+0.125*rho[2]*weight[2]+0.041666666666666664*rho[1]*weight[2]+0.0721687836487032*rho[0]*weight[2]+0.041666666666666664*weight[1]*rho[2]+0.0721687836487032*weight[0]*rho[2]+0.125*rho[1]*weight[1]+0.0721687836487032*rho[0]*weight[1]+0.0721687836487032*weight[0]*rho[1]+0.125*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[7]] += 0.125*rho[7]*weight[7]+0.07216878364870322*rho[6]*weight[7]+0.07216878364870322*rho[5]*weight[7]+0.07216878364870322*rho[4]*weight[7]+0.041666666666666664*rho[3]*weight[7]+0.041666666666666664*rho[2]*weight[7]+0.041666666666666664*rho[1]*weight[7]+0.024056261216234404*rho[0]*weight[7]+0.07216878364870322*weight[6]*rho[7]+0.07216878364870322*weight[5]*rho[7]+0.07216878364870322*weight[4]*rho[7]+0.041666666666666664*weight[3]*rho[7]+0.041666666666666664*weight[2]*rho[7]+0.041666666666666664*weight[1]*rho[7]+0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]+0.041666666666666664*rho[5]*weight[6]+0.041666666666666664*rho[4]*weight[6]+0.07216878364870322*rho[3]*weight[6]+0.07216878364870322*rho[2]*weight[6]+0.024056261216234404*rho[1]*weight[6]+0.041666666666666664*rho[0]*weight[6]+0.041666666666666664*weight[5]*rho[6]+0.041666666666666664*weight[4]*rho[6]+0.07216878364870322*weight[3]*rho[6]+0.07216878364870322*weight[2]*rho[6]+0.024056261216234404*weight[1]*rho[6]+0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]+0.041666666666666664*rho[4]*weight[5]+0.07216878364870322*rho[3]*weight[5]+0.024056261216234404*rho[2]*weight[5]+0.07216878364870322*rho[1]*weight[5]+0.041666666666666664*rho[0]*weight[5]+0.041666666666666664*weight[4]*rho[5]+0.07216878364870322*weight[3]*rho[5]+0.024056261216234404*weight[2]*rho[5]+0.07216878364870322*weight[1]*rho[5]+0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]+0.024056261216234404*rho[3]*weight[4]+0.07216878364870322*rho[2]*weight[4]+0.07216878364870322*rho[1]*weight[4]+0.041666666666666664*rho[0]*weight[4]+0.024056261216234404*weight[3]*rho[4]+0.07216878364870322*weight[2]*rho[4]+0.07216878364870322*weight[1]*rho[4]+0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]+0.041666666666666664*rho[2]*weight[3]+0.041666666666666664*rho[1]*weight[3]+0.07216878364870322*rho[0]*weight[3]+0.041666666666666664*weight[2]*rho[3]+0.041666666666666664*weight[1]*rho[3]+0.07216878364870322*weight[0]*rho[3]+0.125*rho[2]*weight[2]+0.041666666666666664*rho[1]*weight[2]+0.07216878364870322*rho[0]*weight[2]+0.041666666666666664*weight[1]*rho[2]+0.07216878364870322*weight[0]*rho[2]+0.125*rho[1]*weight[1]+0.07216878364870322*rho[0]*weight[1]+0.07216878364870322*weight[0]*rho[1]+0.125*rho[0]*weight[0]; #endif } -GKYL_CU_DH void fem_parproj_src_stencil_weighted_3x_ser_p2_inz_nondirichletz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +GKYL_CU_DH void fem_parproj_src_stencil_weighted_3x_ser_p2_loz_nondirichletz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) { // rho: right side source. // weight: Weight in the projection operation. - // phiBC: Dirichlet boundary potential, given as a DG expansion in the ghost cell (volume). + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. // nodeOff: node offset (prob idx * global number of nodes). // globalIdxs: global linear index of each basis function/node in current cell. // bsrc: global right side source vector. @@ -2314,34 +3338,34 @@ GKYL_CU_DH void fem_parproj_src_stencil_weighted_3x_ser_p2_inz_nondirichletz(con } -GKYL_CU_DH void fem_parproj_src_stencil_weighted_3x_ser_p1_loz_nondirichletz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +GKYL_CU_DH void fem_parproj_src_stencil_weighted_3x_ser_p1_loz_dirichlet_ghostz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) { // rho: right side source. // weight: Weight in the projection operation. - // phiBC: Dirichlet boundary potential, given as a DG expansion in the ghost cell (volume). + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. // nodeOff: node offset (prob idx * global number of nodes). // globalIdxs: global linear index of each basis function/node in current cell. // bsrc: global right side source vector. #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[0]],0.125*rho[7]*weight[7]-0.07216878364870322*rho[6]*weight[7]-0.07216878364870322*rho[5]*weight[7]-0.07216878364870322*rho[4]*weight[7]+0.041666666666666664*rho[3]*weight[7]+0.041666666666666664*rho[2]*weight[7]+0.041666666666666664*rho[1]*weight[7]-0.024056261216234404*rho[0]*weight[7]-0.07216878364870322*weight[6]*rho[7]-0.07216878364870322*weight[5]*rho[7]-0.07216878364870322*weight[4]*rho[7]+0.041666666666666664*weight[3]*rho[7]+0.041666666666666664*weight[2]*rho[7]+0.041666666666666664*weight[1]*rho[7]-0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]+0.041666666666666664*rho[5]*weight[6]+0.041666666666666664*rho[4]*weight[6]-0.07216878364870322*rho[3]*weight[6]-0.07216878364870322*rho[2]*weight[6]-0.024056261216234404*rho[1]*weight[6]+0.041666666666666664*rho[0]*weight[6]+0.041666666666666664*weight[5]*rho[6]+0.041666666666666664*weight[4]*rho[6]-0.07216878364870322*weight[3]*rho[6]-0.07216878364870322*weight[2]*rho[6]-0.024056261216234404*weight[1]*rho[6]+0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]+0.041666666666666664*rho[4]*weight[5]-0.07216878364870322*rho[3]*weight[5]-0.024056261216234404*rho[2]*weight[5]-0.07216878364870322*rho[1]*weight[5]+0.041666666666666664*rho[0]*weight[5]+0.041666666666666664*weight[4]*rho[5]-0.07216878364870322*weight[3]*rho[5]-0.024056261216234404*weight[2]*rho[5]-0.07216878364870322*weight[1]*rho[5]+0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]-0.024056261216234404*rho[3]*weight[4]-0.07216878364870322*rho[2]*weight[4]-0.07216878364870322*rho[1]*weight[4]+0.041666666666666664*rho[0]*weight[4]-0.024056261216234404*weight[3]*rho[4]-0.07216878364870322*weight[2]*rho[4]-0.07216878364870322*weight[1]*rho[4]+0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]+0.041666666666666664*rho[2]*weight[3]+0.041666666666666664*rho[1]*weight[3]-0.07216878364870322*rho[0]*weight[3]+0.041666666666666664*weight[2]*rho[3]+0.041666666666666664*weight[1]*rho[3]-0.07216878364870322*weight[0]*rho[3]+0.125*rho[2]*weight[2]+0.041666666666666664*rho[1]*weight[2]-0.07216878364870322*rho[0]*weight[2]+0.041666666666666664*weight[1]*rho[2]-0.07216878364870322*weight[0]*rho[2]+0.125*rho[1]*weight[1]-0.07216878364870322*rho[0]*weight[1]-0.07216878364870322*weight[0]*rho[1]+0.125*rho[0]*weight[0]); + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[0]],__double_as_longlong(1.8371173070873836*phiBC[7]-1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); #else - bsrc[nodeOff+globalIdxs[0]] += 0.125*rho[7]*weight[7]-0.07216878364870322*rho[6]*weight[7]-0.07216878364870322*rho[5]*weight[7]-0.07216878364870322*rho[4]*weight[7]+0.041666666666666664*rho[3]*weight[7]+0.041666666666666664*rho[2]*weight[7]+0.041666666666666664*rho[1]*weight[7]-0.024056261216234404*rho[0]*weight[7]-0.07216878364870322*weight[6]*rho[7]-0.07216878364870322*weight[5]*rho[7]-0.07216878364870322*weight[4]*rho[7]+0.041666666666666664*weight[3]*rho[7]+0.041666666666666664*weight[2]*rho[7]+0.041666666666666664*weight[1]*rho[7]-0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]+0.041666666666666664*rho[5]*weight[6]+0.041666666666666664*rho[4]*weight[6]-0.07216878364870322*rho[3]*weight[6]-0.07216878364870322*rho[2]*weight[6]-0.024056261216234404*rho[1]*weight[6]+0.041666666666666664*rho[0]*weight[6]+0.041666666666666664*weight[5]*rho[6]+0.041666666666666664*weight[4]*rho[6]-0.07216878364870322*weight[3]*rho[6]-0.07216878364870322*weight[2]*rho[6]-0.024056261216234404*weight[1]*rho[6]+0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]+0.041666666666666664*rho[4]*weight[5]-0.07216878364870322*rho[3]*weight[5]-0.024056261216234404*rho[2]*weight[5]-0.07216878364870322*rho[1]*weight[5]+0.041666666666666664*rho[0]*weight[5]+0.041666666666666664*weight[4]*rho[5]-0.07216878364870322*weight[3]*rho[5]-0.024056261216234404*weight[2]*rho[5]-0.07216878364870322*weight[1]*rho[5]+0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]-0.024056261216234404*rho[3]*weight[4]-0.07216878364870322*rho[2]*weight[4]-0.07216878364870322*rho[1]*weight[4]+0.041666666666666664*rho[0]*weight[4]-0.024056261216234404*weight[3]*rho[4]-0.07216878364870322*weight[2]*rho[4]-0.07216878364870322*weight[1]*rho[4]+0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]+0.041666666666666664*rho[2]*weight[3]+0.041666666666666664*rho[1]*weight[3]-0.07216878364870322*rho[0]*weight[3]+0.041666666666666664*weight[2]*rho[3]+0.041666666666666664*weight[1]*rho[3]-0.07216878364870322*weight[0]*rho[3]+0.125*rho[2]*weight[2]+0.041666666666666664*rho[1]*weight[2]-0.07216878364870322*rho[0]*weight[2]+0.041666666666666664*weight[1]*rho[2]-0.07216878364870322*weight[0]*rho[2]+0.125*rho[1]*weight[1]-0.07216878364870322*rho[0]*weight[1]-0.07216878364870322*weight[0]*rho[1]+0.125*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[0]] = 1.8371173070873836*phiBC[7]-1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; #endif #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[1]],0.125*rho[7]*weight[7]+0.07216878364870322*rho[6]*weight[7]-0.07216878364870322*rho[5]*weight[7]-0.07216878364870322*rho[4]*weight[7]-0.041666666666666664*rho[3]*weight[7]-0.041666666666666664*rho[2]*weight[7]+0.041666666666666664*rho[1]*weight[7]+0.024056261216234404*rho[0]*weight[7]+0.07216878364870322*weight[6]*rho[7]-0.07216878364870322*weight[5]*rho[7]-0.07216878364870322*weight[4]*rho[7]-0.041666666666666664*weight[3]*rho[7]-0.041666666666666664*weight[2]*rho[7]+0.041666666666666664*weight[1]*rho[7]+0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]-0.041666666666666664*rho[5]*weight[6]-0.041666666666666664*rho[4]*weight[6]-0.07216878364870322*rho[3]*weight[6]-0.07216878364870322*rho[2]*weight[6]+0.024056261216234404*rho[1]*weight[6]+0.041666666666666664*rho[0]*weight[6]-0.041666666666666664*weight[5]*rho[6]-0.041666666666666664*weight[4]*rho[6]-0.07216878364870322*weight[3]*rho[6]-0.07216878364870322*weight[2]*rho[6]+0.024056261216234404*weight[1]*rho[6]+0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]+0.041666666666666664*rho[4]*weight[5]+0.07216878364870322*rho[3]*weight[5]+0.024056261216234404*rho[2]*weight[5]-0.07216878364870322*rho[1]*weight[5]-0.041666666666666664*rho[0]*weight[5]+0.041666666666666664*weight[4]*rho[5]+0.07216878364870322*weight[3]*rho[5]+0.024056261216234404*weight[2]*rho[5]-0.07216878364870322*weight[1]*rho[5]-0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]+0.024056261216234404*rho[3]*weight[4]+0.07216878364870322*rho[2]*weight[4]-0.07216878364870322*rho[1]*weight[4]-0.041666666666666664*rho[0]*weight[4]+0.024056261216234404*weight[3]*rho[4]+0.07216878364870322*weight[2]*rho[4]-0.07216878364870322*weight[1]*rho[4]-0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]+0.041666666666666664*rho[2]*weight[3]-0.041666666666666664*rho[1]*weight[3]-0.07216878364870322*rho[0]*weight[3]+0.041666666666666664*weight[2]*rho[3]-0.041666666666666664*weight[1]*rho[3]-0.07216878364870322*weight[0]*rho[3]+0.125*rho[2]*weight[2]-0.041666666666666664*rho[1]*weight[2]-0.07216878364870322*rho[0]*weight[2]-0.041666666666666664*weight[1]*rho[2]-0.07216878364870322*weight[0]*rho[2]+0.125*rho[1]*weight[1]+0.07216878364870322*rho[0]*weight[1]+0.07216878364870322*weight[0]*rho[1]+0.125*rho[0]*weight[0]); + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[1]],__double_as_longlong(-(1.8371173070873836*phiBC[7])-1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); #else - bsrc[nodeOff+globalIdxs[1]] += 0.125*rho[7]*weight[7]+0.07216878364870322*rho[6]*weight[7]-0.07216878364870322*rho[5]*weight[7]-0.07216878364870322*rho[4]*weight[7]-0.041666666666666664*rho[3]*weight[7]-0.041666666666666664*rho[2]*weight[7]+0.041666666666666664*rho[1]*weight[7]+0.024056261216234404*rho[0]*weight[7]+0.07216878364870322*weight[6]*rho[7]-0.07216878364870322*weight[5]*rho[7]-0.07216878364870322*weight[4]*rho[7]-0.041666666666666664*weight[3]*rho[7]-0.041666666666666664*weight[2]*rho[7]+0.041666666666666664*weight[1]*rho[7]+0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]-0.041666666666666664*rho[5]*weight[6]-0.041666666666666664*rho[4]*weight[6]-0.07216878364870322*rho[3]*weight[6]-0.07216878364870322*rho[2]*weight[6]+0.024056261216234404*rho[1]*weight[6]+0.041666666666666664*rho[0]*weight[6]-0.041666666666666664*weight[5]*rho[6]-0.041666666666666664*weight[4]*rho[6]-0.07216878364870322*weight[3]*rho[6]-0.07216878364870322*weight[2]*rho[6]+0.024056261216234404*weight[1]*rho[6]+0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]+0.041666666666666664*rho[4]*weight[5]+0.07216878364870322*rho[3]*weight[5]+0.024056261216234404*rho[2]*weight[5]-0.07216878364870322*rho[1]*weight[5]-0.041666666666666664*rho[0]*weight[5]+0.041666666666666664*weight[4]*rho[5]+0.07216878364870322*weight[3]*rho[5]+0.024056261216234404*weight[2]*rho[5]-0.07216878364870322*weight[1]*rho[5]-0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]+0.024056261216234404*rho[3]*weight[4]+0.07216878364870322*rho[2]*weight[4]-0.07216878364870322*rho[1]*weight[4]-0.041666666666666664*rho[0]*weight[4]+0.024056261216234404*weight[3]*rho[4]+0.07216878364870322*weight[2]*rho[4]-0.07216878364870322*weight[1]*rho[4]-0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]+0.041666666666666664*rho[2]*weight[3]-0.041666666666666664*rho[1]*weight[3]-0.07216878364870322*rho[0]*weight[3]+0.041666666666666664*weight[2]*rho[3]-0.041666666666666664*weight[1]*rho[3]-0.07216878364870322*weight[0]*rho[3]+0.125*rho[2]*weight[2]-0.041666666666666664*rho[1]*weight[2]-0.07216878364870322*rho[0]*weight[2]-0.041666666666666664*weight[1]*rho[2]-0.07216878364870322*weight[0]*rho[2]+0.125*rho[1]*weight[1]+0.07216878364870322*rho[0]*weight[1]+0.07216878364870322*weight[0]*rho[1]+0.125*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[1]] = -(1.8371173070873836*phiBC[7])-1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; #endif #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[2]],0.125*rho[7]*weight[7]-0.07216878364870322*rho[6]*weight[7]+0.07216878364870322*rho[5]*weight[7]-0.07216878364870322*rho[4]*weight[7]-0.041666666666666664*rho[3]*weight[7]+0.041666666666666664*rho[2]*weight[7]-0.041666666666666664*rho[1]*weight[7]+0.024056261216234404*rho[0]*weight[7]-0.07216878364870322*weight[6]*rho[7]+0.07216878364870322*weight[5]*rho[7]-0.07216878364870322*weight[4]*rho[7]-0.041666666666666664*weight[3]*rho[7]+0.041666666666666664*weight[2]*rho[7]-0.041666666666666664*weight[1]*rho[7]+0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]-0.041666666666666664*rho[5]*weight[6]+0.041666666666666664*rho[4]*weight[6]+0.07216878364870322*rho[3]*weight[6]-0.07216878364870322*rho[2]*weight[6]+0.024056261216234404*rho[1]*weight[6]-0.041666666666666664*rho[0]*weight[6]-0.041666666666666664*weight[5]*rho[6]+0.041666666666666664*weight[4]*rho[6]+0.07216878364870322*weight[3]*rho[6]-0.07216878364870322*weight[2]*rho[6]+0.024056261216234404*weight[1]*rho[6]-0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]-0.041666666666666664*rho[4]*weight[5]-0.07216878364870322*rho[3]*weight[5]+0.024056261216234404*rho[2]*weight[5]-0.07216878364870322*rho[1]*weight[5]+0.041666666666666664*rho[0]*weight[5]-0.041666666666666664*weight[4]*rho[5]-0.07216878364870322*weight[3]*rho[5]+0.024056261216234404*weight[2]*rho[5]-0.07216878364870322*weight[1]*rho[5]+0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]+0.024056261216234404*rho[3]*weight[4]-0.07216878364870322*rho[2]*weight[4]+0.07216878364870322*rho[1]*weight[4]-0.041666666666666664*rho[0]*weight[4]+0.024056261216234404*weight[3]*rho[4]-0.07216878364870322*weight[2]*rho[4]+0.07216878364870322*weight[1]*rho[4]-0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]-0.041666666666666664*rho[2]*weight[3]+0.041666666666666664*rho[1]*weight[3]-0.07216878364870322*rho[0]*weight[3]-0.041666666666666664*weight[2]*rho[3]+0.041666666666666664*weight[1]*rho[3]-0.07216878364870322*weight[0]*rho[3]+0.125*rho[2]*weight[2]-0.041666666666666664*rho[1]*weight[2]+0.07216878364870322*rho[0]*weight[2]-0.041666666666666664*weight[1]*rho[2]+0.07216878364870322*weight[0]*rho[2]+0.125*rho[1]*weight[1]-0.07216878364870322*rho[0]*weight[1]-0.07216878364870322*weight[0]*rho[1]+0.125*rho[0]*weight[0]); + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[2]],__double_as_longlong(-(1.8371173070873836*phiBC[7])+1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); #else - bsrc[nodeOff+globalIdxs[2]] += 0.125*rho[7]*weight[7]-0.07216878364870322*rho[6]*weight[7]+0.07216878364870322*rho[5]*weight[7]-0.07216878364870322*rho[4]*weight[7]-0.041666666666666664*rho[3]*weight[7]+0.041666666666666664*rho[2]*weight[7]-0.041666666666666664*rho[1]*weight[7]+0.024056261216234404*rho[0]*weight[7]-0.07216878364870322*weight[6]*rho[7]+0.07216878364870322*weight[5]*rho[7]-0.07216878364870322*weight[4]*rho[7]-0.041666666666666664*weight[3]*rho[7]+0.041666666666666664*weight[2]*rho[7]-0.041666666666666664*weight[1]*rho[7]+0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]-0.041666666666666664*rho[5]*weight[6]+0.041666666666666664*rho[4]*weight[6]+0.07216878364870322*rho[3]*weight[6]-0.07216878364870322*rho[2]*weight[6]+0.024056261216234404*rho[1]*weight[6]-0.041666666666666664*rho[0]*weight[6]-0.041666666666666664*weight[5]*rho[6]+0.041666666666666664*weight[4]*rho[6]+0.07216878364870322*weight[3]*rho[6]-0.07216878364870322*weight[2]*rho[6]+0.024056261216234404*weight[1]*rho[6]-0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]-0.041666666666666664*rho[4]*weight[5]-0.07216878364870322*rho[3]*weight[5]+0.024056261216234404*rho[2]*weight[5]-0.07216878364870322*rho[1]*weight[5]+0.041666666666666664*rho[0]*weight[5]-0.041666666666666664*weight[4]*rho[5]-0.07216878364870322*weight[3]*rho[5]+0.024056261216234404*weight[2]*rho[5]-0.07216878364870322*weight[1]*rho[5]+0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]+0.024056261216234404*rho[3]*weight[4]-0.07216878364870322*rho[2]*weight[4]+0.07216878364870322*rho[1]*weight[4]-0.041666666666666664*rho[0]*weight[4]+0.024056261216234404*weight[3]*rho[4]-0.07216878364870322*weight[2]*rho[4]+0.07216878364870322*weight[1]*rho[4]-0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]-0.041666666666666664*rho[2]*weight[3]+0.041666666666666664*rho[1]*weight[3]-0.07216878364870322*rho[0]*weight[3]-0.041666666666666664*weight[2]*rho[3]+0.041666666666666664*weight[1]*rho[3]-0.07216878364870322*weight[0]*rho[3]+0.125*rho[2]*weight[2]-0.041666666666666664*rho[1]*weight[2]+0.07216878364870322*rho[0]*weight[2]-0.041666666666666664*weight[1]*rho[2]+0.07216878364870322*weight[0]*rho[2]+0.125*rho[1]*weight[1]-0.07216878364870322*rho[0]*weight[1]-0.07216878364870322*weight[0]*rho[1]+0.125*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[2]] = -(1.8371173070873836*phiBC[7])+1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; #endif #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[3]],0.125*rho[7]*weight[7]+0.07216878364870322*rho[6]*weight[7]+0.07216878364870322*rho[5]*weight[7]-0.07216878364870322*rho[4]*weight[7]+0.041666666666666664*rho[3]*weight[7]-0.041666666666666664*rho[2]*weight[7]-0.041666666666666664*rho[1]*weight[7]-0.024056261216234404*rho[0]*weight[7]+0.07216878364870322*weight[6]*rho[7]+0.07216878364870322*weight[5]*rho[7]-0.07216878364870322*weight[4]*rho[7]+0.041666666666666664*weight[3]*rho[7]-0.041666666666666664*weight[2]*rho[7]-0.041666666666666664*weight[1]*rho[7]-0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]+0.041666666666666664*rho[5]*weight[6]-0.041666666666666664*rho[4]*weight[6]+0.07216878364870322*rho[3]*weight[6]-0.07216878364870322*rho[2]*weight[6]-0.024056261216234404*rho[1]*weight[6]-0.041666666666666664*rho[0]*weight[6]+0.041666666666666664*weight[5]*rho[6]-0.041666666666666664*weight[4]*rho[6]+0.07216878364870322*weight[3]*rho[6]-0.07216878364870322*weight[2]*rho[6]-0.024056261216234404*weight[1]*rho[6]-0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]-0.041666666666666664*rho[4]*weight[5]+0.07216878364870322*rho[3]*weight[5]-0.024056261216234404*rho[2]*weight[5]-0.07216878364870322*rho[1]*weight[5]-0.041666666666666664*rho[0]*weight[5]-0.041666666666666664*weight[4]*rho[5]+0.07216878364870322*weight[3]*rho[5]-0.024056261216234404*weight[2]*rho[5]-0.07216878364870322*weight[1]*rho[5]-0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]-0.024056261216234404*rho[3]*weight[4]+0.07216878364870322*rho[2]*weight[4]+0.07216878364870322*rho[1]*weight[4]+0.041666666666666664*rho[0]*weight[4]-0.024056261216234404*weight[3]*rho[4]+0.07216878364870322*weight[2]*rho[4]+0.07216878364870322*weight[1]*rho[4]+0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]-0.041666666666666664*rho[2]*weight[3]-0.041666666666666664*rho[1]*weight[3]-0.07216878364870322*rho[0]*weight[3]-0.041666666666666664*weight[2]*rho[3]-0.041666666666666664*weight[1]*rho[3]-0.07216878364870322*weight[0]*rho[3]+0.125*rho[2]*weight[2]+0.041666666666666664*rho[1]*weight[2]+0.07216878364870322*rho[0]*weight[2]+0.041666666666666664*weight[1]*rho[2]+0.07216878364870322*weight[0]*rho[2]+0.125*rho[1]*weight[1]+0.07216878364870322*rho[0]*weight[1]+0.07216878364870322*weight[0]*rho[1]+0.125*rho[0]*weight[0]); + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[3]],__double_as_longlong(1.8371173070873836*phiBC[7]+1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); #else - bsrc[nodeOff+globalIdxs[3]] += 0.125*rho[7]*weight[7]+0.07216878364870322*rho[6]*weight[7]+0.07216878364870322*rho[5]*weight[7]-0.07216878364870322*rho[4]*weight[7]+0.041666666666666664*rho[3]*weight[7]-0.041666666666666664*rho[2]*weight[7]-0.041666666666666664*rho[1]*weight[7]-0.024056261216234404*rho[0]*weight[7]+0.07216878364870322*weight[6]*rho[7]+0.07216878364870322*weight[5]*rho[7]-0.07216878364870322*weight[4]*rho[7]+0.041666666666666664*weight[3]*rho[7]-0.041666666666666664*weight[2]*rho[7]-0.041666666666666664*weight[1]*rho[7]-0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]+0.041666666666666664*rho[5]*weight[6]-0.041666666666666664*rho[4]*weight[6]+0.07216878364870322*rho[3]*weight[6]-0.07216878364870322*rho[2]*weight[6]-0.024056261216234404*rho[1]*weight[6]-0.041666666666666664*rho[0]*weight[6]+0.041666666666666664*weight[5]*rho[6]-0.041666666666666664*weight[4]*rho[6]+0.07216878364870322*weight[3]*rho[6]-0.07216878364870322*weight[2]*rho[6]-0.024056261216234404*weight[1]*rho[6]-0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]-0.041666666666666664*rho[4]*weight[5]+0.07216878364870322*rho[3]*weight[5]-0.024056261216234404*rho[2]*weight[5]-0.07216878364870322*rho[1]*weight[5]-0.041666666666666664*rho[0]*weight[5]-0.041666666666666664*weight[4]*rho[5]+0.07216878364870322*weight[3]*rho[5]-0.024056261216234404*weight[2]*rho[5]-0.07216878364870322*weight[1]*rho[5]-0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]-0.024056261216234404*rho[3]*weight[4]+0.07216878364870322*rho[2]*weight[4]+0.07216878364870322*rho[1]*weight[4]+0.041666666666666664*rho[0]*weight[4]-0.024056261216234404*weight[3]*rho[4]+0.07216878364870322*weight[2]*rho[4]+0.07216878364870322*weight[1]*rho[4]+0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]-0.041666666666666664*rho[2]*weight[3]-0.041666666666666664*rho[1]*weight[3]-0.07216878364870322*rho[0]*weight[3]-0.041666666666666664*weight[2]*rho[3]-0.041666666666666664*weight[1]*rho[3]-0.07216878364870322*weight[0]*rho[3]+0.125*rho[2]*weight[2]+0.041666666666666664*rho[1]*weight[2]+0.07216878364870322*rho[0]*weight[2]+0.041666666666666664*weight[1]*rho[2]+0.07216878364870322*weight[0]*rho[2]+0.125*rho[1]*weight[1]+0.07216878364870322*rho[0]*weight[1]+0.07216878364870322*weight[0]*rho[1]+0.125*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[3]] = 1.8371173070873836*phiBC[7]+1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; #endif #ifdef __CUDA_ARCH__ atomicAdd(&bsrc[nodeOff+globalIdxs[4]],0.125*rho[7]*weight[7]-0.07216878364870322*rho[6]*weight[7]-0.07216878364870322*rho[5]*weight[7]+0.07216878364870322*rho[4]*weight[7]+0.041666666666666664*rho[3]*weight[7]-0.041666666666666664*rho[2]*weight[7]-0.041666666666666664*rho[1]*weight[7]+0.024056261216234404*rho[0]*weight[7]-0.07216878364870322*weight[6]*rho[7]-0.07216878364870322*weight[5]*rho[7]+0.07216878364870322*weight[4]*rho[7]+0.041666666666666664*weight[3]*rho[7]-0.041666666666666664*weight[2]*rho[7]-0.041666666666666664*weight[1]*rho[7]+0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]+0.041666666666666664*rho[5]*weight[6]-0.041666666666666664*rho[4]*weight[6]-0.07216878364870322*rho[3]*weight[6]+0.07216878364870322*rho[2]*weight[6]+0.024056261216234404*rho[1]*weight[6]-0.041666666666666664*rho[0]*weight[6]+0.041666666666666664*weight[5]*rho[6]-0.041666666666666664*weight[4]*rho[6]-0.07216878364870322*weight[3]*rho[6]+0.07216878364870322*weight[2]*rho[6]+0.024056261216234404*weight[1]*rho[6]-0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]-0.041666666666666664*rho[4]*weight[5]-0.07216878364870322*rho[3]*weight[5]+0.024056261216234404*rho[2]*weight[5]+0.07216878364870322*rho[1]*weight[5]-0.041666666666666664*rho[0]*weight[5]-0.041666666666666664*weight[4]*rho[5]-0.07216878364870322*weight[3]*rho[5]+0.024056261216234404*weight[2]*rho[5]+0.07216878364870322*weight[1]*rho[5]-0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]+0.024056261216234404*rho[3]*weight[4]-0.07216878364870322*rho[2]*weight[4]-0.07216878364870322*rho[1]*weight[4]+0.041666666666666664*rho[0]*weight[4]+0.024056261216234404*weight[3]*rho[4]-0.07216878364870322*weight[2]*rho[4]-0.07216878364870322*weight[1]*rho[4]+0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]-0.041666666666666664*rho[2]*weight[3]-0.041666666666666664*rho[1]*weight[3]+0.07216878364870322*rho[0]*weight[3]-0.041666666666666664*weight[2]*rho[3]-0.041666666666666664*weight[1]*rho[3]+0.07216878364870322*weight[0]*rho[3]+0.125*rho[2]*weight[2]+0.041666666666666664*rho[1]*weight[2]-0.07216878364870322*rho[0]*weight[2]+0.041666666666666664*weight[1]*rho[2]-0.07216878364870322*weight[0]*rho[2]+0.125*rho[1]*weight[1]-0.07216878364870322*rho[0]*weight[1]-0.07216878364870322*weight[0]*rho[1]+0.125*rho[0]*weight[0]); @@ -2366,54 +3390,54 @@ GKYL_CU_DH void fem_parproj_src_stencil_weighted_3x_ser_p1_loz_nondirichletz(con } -GKYL_CU_DH void fem_parproj_src_stencil_weighted_3x_ser_p2_loz_nondirichletz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +GKYL_CU_DH void fem_parproj_src_stencil_weighted_3x_ser_p2_loz_dirichlet_ghostz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) { // rho: right side source. // weight: Weight in the projection operation. - // phiBC: Dirichlet boundary potential, given as a DG expansion in the ghost cell (volume). + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. // nodeOff: node offset (prob idx * global number of nodes). // globalIdxs: global linear index of each basis function/node in current cell. // bsrc: global right side source vector. #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[0]],-(0.034523809523809526*rho[19]*weight[19])+0.02*rho[18]*weight[19]+0.02*rho[17]*weight[19]-0.008935182737458497*rho[16]*weight[19]-0.008935182737458497*rho[15]*weight[19]-0.01924500897298753*rho[14]*weight[19]-0.01924500897298753*rho[13]*weight[19]-0.01924500897298753*rho[12]*weight[19]-0.01924500897298753*rho[11]*weight[19]-0.012909944487358056*rho[10]*weight[19]+0.021825396825396828*rho[9]*weight[19]+0.011111111111111112*rho[8]*weight[19]+0.011111111111111112*rho[7]*weight[19]+0.022360679774997897*rho[6]*weight[19]+0.022360679774997897*rho[5]*weight[19]+0.0372677996249965*rho[4]*weight[19]-0.02151657414559676*rho[3]*weight[19]-0.02151657414559676*rho[2]*weight[19]-0.02151657414559676*rho[1]*weight[19]+0.012422599874998833*rho[0]*weight[19]+0.02*weight[18]*rho[19]+0.02*weight[17]*rho[19]-0.008935182737458497*weight[16]*rho[19]-0.008935182737458497*weight[15]*rho[19]-0.01924500897298753*weight[14]*rho[19]-0.01924500897298753*weight[13]*rho[19]-0.01924500897298753*weight[12]*rho[19]-0.01924500897298753*weight[11]*rho[19]-0.012909944487358056*weight[10]*rho[19]+0.021825396825396828*weight[9]*rho[19]+0.011111111111111112*weight[8]*rho[19]+0.011111111111111112*weight[7]*rho[19]+0.022360679774997897*weight[6]*rho[19]+0.022360679774997897*weight[5]*rho[19]+0.0372677996249965*weight[4]*rho[19]-0.02151657414559676*weight[3]*rho[19]-0.02151657414559676*weight[2]*rho[19]-0.02151657414559676*weight[1]*rho[19]+0.012422599874998833*weight[0]*rho[19]-0.034523809523809526*rho[18]*weight[18]+0.02*rho[17]*weight[18]-0.01924500897298753*rho[16]*weight[18]-0.01924500897298753*rho[15]*weight[18]-0.008935182737458497*rho[14]*weight[18]-0.01924500897298753*rho[13]*weight[18]-0.008935182737458497*rho[12]*weight[18]-0.01924500897298753*rho[11]*weight[18]-0.012909944487358056*rho[10]*weight[18]+0.011111111111111112*rho[9]*weight[18]+0.021825396825396828*rho[8]*weight[18]+0.011111111111111112*rho[7]*weight[18]+0.022360679774997897*rho[6]*weight[18]+0.0372677996249965*rho[5]*weight[18]+0.022360679774997897*rho[4]*weight[18]-0.02151657414559676*rho[3]*weight[18]-0.02151657414559676*rho[2]*weight[18]-0.02151657414559676*rho[1]*weight[18]+0.012422599874998833*rho[0]*weight[18]+0.02*weight[17]*rho[18]-0.01924500897298753*weight[16]*rho[18]-0.01924500897298753*weight[15]*rho[18]-0.008935182737458497*weight[14]*rho[18]-0.01924500897298753*weight[13]*rho[18]-0.008935182737458497*weight[12]*rho[18]-0.01924500897298753*weight[11]*rho[18]-0.012909944487358056*weight[10]*rho[18]+0.011111111111111112*weight[9]*rho[18]+0.021825396825396828*weight[8]*rho[18]+0.011111111111111112*weight[7]*rho[18]+0.022360679774997897*weight[6]*rho[18]+0.0372677996249965*weight[5]*rho[18]+0.022360679774997897*weight[4]*rho[18]-0.02151657414559676*weight[3]*rho[18]-0.02151657414559676*weight[2]*rho[18]-0.02151657414559676*weight[1]*rho[18]+0.012422599874998833*weight[0]*rho[18]-0.034523809523809526*rho[17]*weight[17]-0.01924500897298753*rho[16]*weight[17]-0.01924500897298753*rho[15]*weight[17]-0.01924500897298753*rho[14]*weight[17]-0.008935182737458497*rho[13]*weight[17]-0.01924500897298753*rho[12]*weight[17]-0.008935182737458497*rho[11]*weight[17]-0.012909944487358056*rho[10]*weight[17]+0.011111111111111112*rho[9]*weight[17]+0.011111111111111112*rho[8]*weight[17]+0.021825396825396828*rho[7]*weight[17]+0.0372677996249965*rho[6]*weight[17]+0.022360679774997897*rho[5]*weight[17]+0.022360679774997897*rho[4]*weight[17]-0.02151657414559676*rho[3]*weight[17]-0.02151657414559676*rho[2]*weight[17]-0.02151657414559676*rho[1]*weight[17]+0.012422599874998833*rho[0]*weight[17]-0.01924500897298753*weight[16]*rho[17]-0.01924500897298753*weight[15]*rho[17]-0.01924500897298753*weight[14]*rho[17]-0.008935182737458497*weight[13]*rho[17]-0.01924500897298753*weight[12]*rho[17]-0.008935182737458497*weight[11]*rho[17]-0.012909944487358056*weight[10]*rho[17]+0.011111111111111112*weight[9]*rho[17]+0.011111111111111112*weight[8]*rho[17]+0.021825396825396828*weight[7]*rho[17]+0.0372677996249965*weight[6]*rho[17]+0.022360679774997897*weight[5]*rho[17]+0.022360679774997897*weight[4]*rho[17]-0.02151657414559676*weight[3]*rho[17]-0.02151657414559676*weight[2]*rho[17]-0.02151657414559676*weight[1]*rho[17]+0.012422599874998833*weight[0]*rho[17]-0.06785714285714287*rho[16]*weight[16]+0.021825396825396828*rho[15]*weight[16]+0.011111111111111112*rho[14]*weight[16]+0.011111111111111112*rho[13]*weight[16]+0.011111111111111112*rho[12]*weight[16]+0.022360679774997897*rho[10]*weight[16]+0.010309826235529031*rho[9]*weight[16]-0.01924500897298753*rho[8]*weight[16]+0.004303314829119352*rho[6]*weight[16]-0.021516574145596764*rho[5]*weight[16]-0.021516574145596764*rho[4]*weight[16]+0.012422599874998832*rho[3]*weight[16]+0.037267799624996496*rho[2]*weight[16]+0.012422599874998832*rho[1]*weight[16]-0.021516574145596764*rho[0]*weight[16]+0.021825396825396828*weight[15]*rho[16]+0.011111111111111112*weight[14]*rho[16]+0.011111111111111112*weight[13]*rho[16]+0.011111111111111112*weight[12]*rho[16]+0.022360679774997897*weight[10]*rho[16]+0.010309826235529031*weight[9]*rho[16]-0.01924500897298753*weight[8]*rho[16]+0.004303314829119352*weight[6]*rho[16]-0.021516574145596764*weight[5]*rho[16]-0.021516574145596764*weight[4]*rho[16]+0.012422599874998832*weight[3]*rho[16]+0.037267799624996496*weight[2]*rho[16]+0.012422599874998832*weight[1]*rho[16]-0.021516574145596764*weight[0]*rho[16]-0.06785714285714287*rho[15]*weight[15]+0.011111111111111112*rho[14]*weight[15]+0.011111111111111112*rho[13]*weight[15]+0.011111111111111112*rho[11]*weight[15]+0.022360679774997897*rho[10]*weight[15]+0.010309826235529031*rho[9]*weight[15]-0.01924500897298753*rho[7]*weight[15]-0.021516574145596764*rho[6]*weight[15]+0.004303314829119352*rho[5]*weight[15]-0.021516574145596764*rho[4]*weight[15]+0.012422599874998832*rho[3]*weight[15]+0.012422599874998832*rho[2]*weight[15]+0.037267799624996496*rho[1]*weight[15]-0.021516574145596764*rho[0]*weight[15]+0.011111111111111112*weight[14]*rho[15]+0.011111111111111112*weight[13]*rho[15]+0.011111111111111112*weight[11]*rho[15]+0.022360679774997897*weight[10]*rho[15]+0.010309826235529031*weight[9]*rho[15]-0.01924500897298753*weight[7]*rho[15]-0.021516574145596764*weight[6]*rho[15]+0.004303314829119352*weight[5]*rho[15]-0.021516574145596764*weight[4]*rho[15]+0.012422599874998832*weight[3]*rho[15]+0.012422599874998832*weight[2]*rho[15]+0.037267799624996496*weight[1]*rho[15]-0.021516574145596764*weight[0]*rho[15]-0.06785714285714287*rho[14]*weight[14]+0.021825396825396828*rho[12]*weight[14]+0.011111111111111112*rho[11]*weight[14]+0.022360679774997897*rho[10]*weight[14]-0.01924500897298753*rho[9]*weight[14]+0.010309826235529031*rho[8]*weight[14]+0.004303314829119352*rho[6]*weight[14]-0.021516574145596764*rho[5]*weight[14]-0.021516574145596764*rho[4]*weight[14]+0.037267799624996496*rho[3]*weight[14]+0.012422599874998832*rho[2]*weight[14]+0.012422599874998832*rho[1]*weight[14]-0.021516574145596764*rho[0]*weight[14]+0.021825396825396828*weight[12]*rho[14]+0.011111111111111112*weight[11]*rho[14]+0.022360679774997897*weight[10]*rho[14]-0.01924500897298753*weight[9]*rho[14]+0.010309826235529031*weight[8]*rho[14]+0.004303314829119352*weight[6]*rho[14]-0.021516574145596764*weight[5]*rho[14]-0.021516574145596764*weight[4]*rho[14]+0.037267799624996496*weight[3]*rho[14]+0.012422599874998832*weight[2]*rho[14]+0.012422599874998832*weight[1]*rho[14]-0.021516574145596764*weight[0]*rho[14]-0.06785714285714287*rho[13]*weight[13]+0.011111111111111112*rho[12]*weight[13]+0.021825396825396828*rho[11]*weight[13]+0.022360679774997897*rho[10]*weight[13]-0.01924500897298753*rho[9]*weight[13]+0.010309826235529031*rho[7]*weight[13]-0.021516574145596764*rho[6]*weight[13]+0.004303314829119352*rho[5]*weight[13]-0.021516574145596764*rho[4]*weight[13]+0.037267799624996496*rho[3]*weight[13]+0.012422599874998832*rho[2]*weight[13]+0.012422599874998832*rho[1]*weight[13]-0.021516574145596764*rho[0]*weight[13]+0.011111111111111112*weight[12]*rho[13]+0.021825396825396828*weight[11]*rho[13]+0.022360679774997897*weight[10]*rho[13]-0.01924500897298753*weight[9]*rho[13]+0.010309826235529031*weight[7]*rho[13]-0.021516574145596764*weight[6]*rho[13]+0.004303314829119352*weight[5]*rho[13]-0.021516574145596764*weight[4]*rho[13]+0.037267799624996496*weight[3]*rho[13]+0.012422599874998832*weight[2]*rho[13]+0.012422599874998832*weight[1]*rho[13]-0.021516574145596764*weight[0]*rho[13]-0.06785714285714287*rho[12]*weight[12]+0.011111111111111112*rho[11]*weight[12]+0.022360679774997897*rho[10]*weight[12]+0.010309826235529031*rho[8]*weight[12]-0.01924500897298753*rho[7]*weight[12]-0.021516574145596764*rho[6]*weight[12]-0.021516574145596764*rho[5]*weight[12]+0.004303314829119352*rho[4]*weight[12]+0.012422599874998832*rho[3]*weight[12]+0.012422599874998832*rho[2]*weight[12]+0.037267799624996496*rho[1]*weight[12]-0.021516574145596764*rho[0]*weight[12]+0.011111111111111112*weight[11]*rho[12]+0.022360679774997897*weight[10]*rho[12]+0.010309826235529031*weight[8]*rho[12]-0.01924500897298753*weight[7]*rho[12]-0.021516574145596764*weight[6]*rho[12]-0.021516574145596764*weight[5]*rho[12]+0.004303314829119352*weight[4]*rho[12]+0.012422599874998832*weight[3]*rho[12]+0.012422599874998832*weight[2]*rho[12]+0.037267799624996496*weight[1]*rho[12]-0.021516574145596764*weight[0]*rho[12]-0.06785714285714287*rho[11]*weight[11]+0.022360679774997897*rho[10]*weight[11]-0.01924500897298753*rho[8]*weight[11]+0.010309826235529031*rho[7]*weight[11]-0.021516574145596764*rho[6]*weight[11]-0.021516574145596764*rho[5]*weight[11]+0.004303314829119352*rho[4]*weight[11]+0.012422599874998832*rho[3]*weight[11]+0.037267799624996496*rho[2]*weight[11]+0.012422599874998832*rho[1]*weight[11]-0.021516574145596764*rho[0]*weight[11]+0.022360679774997897*weight[10]*rho[11]-0.01924500897298753*weight[8]*rho[11]+0.010309826235529031*weight[7]*rho[11]-0.021516574145596764*weight[6]*rho[11]-0.021516574145596764*weight[5]*rho[11]+0.004303314829119352*weight[4]*rho[11]+0.012422599874998832*weight[3]*rho[11]+0.037267799624996496*weight[2]*rho[11]+0.012422599874998832*weight[1]*rho[11]-0.021516574145596764*weight[0]*rho[11]-0.025*rho[10]*weight[10]-0.02151657414559676*rho[9]*weight[10]-0.02151657414559676*rho[8]*weight[10]-0.02151657414559676*rho[7]*weight[10]-0.014433756729740645*rho[6]*weight[10]-0.014433756729740645*rho[5]*weight[10]-0.014433756729740645*rho[4]*weight[10]+0.025*rho[3]*weight[10]+0.025*rho[2]*weight[10]+0.025*rho[1]*weight[10]-0.024056261216234404*rho[0]*weight[10]-0.02151657414559676*weight[9]*rho[10]-0.02151657414559676*weight[8]*rho[10]-0.02151657414559676*weight[7]*rho[10]-0.014433756729740645*weight[6]*rho[10]-0.014433756729740645*weight[5]*rho[10]-0.014433756729740645*weight[4]*rho[10]+0.025*weight[3]*rho[10]+0.025*weight[2]*rho[10]+0.025*weight[1]*rho[10]-0.024056261216234404*weight[0]*rho[10]-0.10119047619047619*rho[9]*weight[9]+0.012422599874998833*rho[6]*weight[9]+0.012422599874998833*rho[5]*weight[9]+0.012422599874998833*rho[4]*weight[9]+0.02151657414559676*rho[3]*weight[9]-0.02151657414559676*rho[2]*weight[9]-0.02151657414559676*rho[1]*weight[9]+0.0372677996249965*rho[0]*weight[9]+0.012422599874998833*weight[6]*rho[9]+0.012422599874998833*weight[5]*rho[9]+0.012422599874998833*weight[4]*rho[9]+0.02151657414559676*weight[3]*rho[9]-0.02151657414559676*weight[2]*rho[9]-0.02151657414559676*weight[1]*rho[9]+0.0372677996249965*weight[0]*rho[9]-0.10119047619047619*rho[8]*weight[8]+0.012422599874998833*rho[6]*weight[8]+0.012422599874998833*rho[5]*weight[8]+0.012422599874998833*rho[4]*weight[8]-0.02151657414559676*rho[3]*weight[8]+0.02151657414559676*rho[2]*weight[8]-0.02151657414559676*rho[1]*weight[8]+0.0372677996249965*rho[0]*weight[8]+0.012422599874998833*weight[6]*rho[8]+0.012422599874998833*weight[5]*rho[8]+0.012422599874998833*weight[4]*rho[8]-0.02151657414559676*weight[3]*rho[8]+0.02151657414559676*weight[2]*rho[8]-0.02151657414559676*weight[1]*rho[8]+0.0372677996249965*weight[0]*rho[8]-0.10119047619047619*rho[7]*weight[7]+0.012422599874998833*rho[6]*weight[7]+0.012422599874998833*rho[5]*weight[7]+0.012422599874998833*rho[4]*weight[7]-0.02151657414559676*rho[3]*weight[7]-0.02151657414559676*rho[2]*weight[7]+0.02151657414559676*rho[1]*weight[7]+0.0372677996249965*rho[0]*weight[7]+0.012422599874998833*weight[6]*rho[7]+0.012422599874998833*weight[5]*rho[7]+0.012422599874998833*weight[4]*rho[7]-0.02151657414559676*weight[3]*rho[7]-0.02151657414559676*weight[2]*rho[7]+0.02151657414559676*weight[1]*rho[7]+0.0372677996249965*weight[0]*rho[7]-0.058333333333333334*rho[6]*weight[6]+0.025*rho[5]*weight[6]+0.025*rho[4]*weight[6]+0.004811252243246881*rho[3]*weight[6]+0.004811252243246881*rho[2]*weight[6]-0.024056261216234404*rho[1]*weight[6]+0.01388888888888889*rho[0]*weight[6]+0.025*weight[5]*rho[6]+0.025*weight[4]*rho[6]+0.004811252243246881*weight[3]*rho[6]+0.004811252243246881*weight[2]*rho[6]-0.024056261216234404*weight[1]*rho[6]+0.01388888888888889*weight[0]*rho[6]-0.058333333333333334*rho[5]*weight[5]+0.025*rho[4]*weight[5]+0.004811252243246881*rho[3]*weight[5]-0.024056261216234404*rho[2]*weight[5]+0.004811252243246881*rho[1]*weight[5]+0.01388888888888889*rho[0]*weight[5]+0.025*weight[4]*rho[5]+0.004811252243246881*weight[3]*rho[5]-0.024056261216234404*weight[2]*rho[5]+0.004811252243246881*weight[1]*rho[5]+0.01388888888888889*weight[0]*rho[5]-0.058333333333333334*rho[4]*weight[4]-0.024056261216234404*rho[3]*weight[4]+0.004811252243246881*rho[2]*weight[4]+0.004811252243246881*rho[1]*weight[4]+0.01388888888888889*rho[0]*weight[4]-0.024056261216234404*weight[3]*rho[4]+0.004811252243246881*weight[2]*rho[4]+0.004811252243246881*weight[1]*rho[4]+0.01388888888888889*weight[0]*rho[4]-0.09166666666666667*rho[3]*weight[3]+0.01388888888888889*rho[2]*weight[3]+0.01388888888888889*rho[1]*weight[3]+0.024056261216234404*rho[0]*weight[3]+0.01388888888888889*weight[2]*rho[3]+0.01388888888888889*weight[1]*rho[3]+0.024056261216234404*weight[0]*rho[3]-0.09166666666666667*rho[2]*weight[2]+0.01388888888888889*rho[1]*weight[2]+0.024056261216234404*rho[0]*weight[2]+0.01388888888888889*weight[1]*rho[2]+0.024056261216234404*weight[0]*rho[2]-0.09166666666666667*rho[1]*weight[1]+0.024056261216234404*rho[0]*weight[1]+0.024056261216234404*weight[0]*rho[1]-0.125*rho[0]*weight[0]); + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[0]],__double_as_longlong(2.3717082451262845*phiBC[19]-2.3717082451262845*phiBC[18]-2.3717082451262845*phiBC[17]-1.3693063937629155*phiBC[16]-1.3693063937629155*phiBC[15]+1.3693063937629155*phiBC[14]+1.3693063937629155*phiBC[13]-1.3693063937629155*phiBC[12]-1.3693063937629155*phiBC[11]+1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]-1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); #else - bsrc[nodeOff+globalIdxs[0]] += -(0.034523809523809526*rho[19]*weight[19])+0.02*rho[18]*weight[19]+0.02*rho[17]*weight[19]-0.008935182737458497*rho[16]*weight[19]-0.008935182737458497*rho[15]*weight[19]-0.01924500897298753*rho[14]*weight[19]-0.01924500897298753*rho[13]*weight[19]-0.01924500897298753*rho[12]*weight[19]-0.01924500897298753*rho[11]*weight[19]-0.012909944487358056*rho[10]*weight[19]+0.021825396825396828*rho[9]*weight[19]+0.011111111111111112*rho[8]*weight[19]+0.011111111111111112*rho[7]*weight[19]+0.022360679774997897*rho[6]*weight[19]+0.022360679774997897*rho[5]*weight[19]+0.0372677996249965*rho[4]*weight[19]-0.02151657414559676*rho[3]*weight[19]-0.02151657414559676*rho[2]*weight[19]-0.02151657414559676*rho[1]*weight[19]+0.012422599874998833*rho[0]*weight[19]+0.02*weight[18]*rho[19]+0.02*weight[17]*rho[19]-0.008935182737458497*weight[16]*rho[19]-0.008935182737458497*weight[15]*rho[19]-0.01924500897298753*weight[14]*rho[19]-0.01924500897298753*weight[13]*rho[19]-0.01924500897298753*weight[12]*rho[19]-0.01924500897298753*weight[11]*rho[19]-0.012909944487358056*weight[10]*rho[19]+0.021825396825396828*weight[9]*rho[19]+0.011111111111111112*weight[8]*rho[19]+0.011111111111111112*weight[7]*rho[19]+0.022360679774997897*weight[6]*rho[19]+0.022360679774997897*weight[5]*rho[19]+0.0372677996249965*weight[4]*rho[19]-0.02151657414559676*weight[3]*rho[19]-0.02151657414559676*weight[2]*rho[19]-0.02151657414559676*weight[1]*rho[19]+0.012422599874998833*weight[0]*rho[19]-0.034523809523809526*rho[18]*weight[18]+0.02*rho[17]*weight[18]-0.01924500897298753*rho[16]*weight[18]-0.01924500897298753*rho[15]*weight[18]-0.008935182737458497*rho[14]*weight[18]-0.01924500897298753*rho[13]*weight[18]-0.008935182737458497*rho[12]*weight[18]-0.01924500897298753*rho[11]*weight[18]-0.012909944487358056*rho[10]*weight[18]+0.011111111111111112*rho[9]*weight[18]+0.021825396825396828*rho[8]*weight[18]+0.011111111111111112*rho[7]*weight[18]+0.022360679774997897*rho[6]*weight[18]+0.0372677996249965*rho[5]*weight[18]+0.022360679774997897*rho[4]*weight[18]-0.02151657414559676*rho[3]*weight[18]-0.02151657414559676*rho[2]*weight[18]-0.02151657414559676*rho[1]*weight[18]+0.012422599874998833*rho[0]*weight[18]+0.02*weight[17]*rho[18]-0.01924500897298753*weight[16]*rho[18]-0.01924500897298753*weight[15]*rho[18]-0.008935182737458497*weight[14]*rho[18]-0.01924500897298753*weight[13]*rho[18]-0.008935182737458497*weight[12]*rho[18]-0.01924500897298753*weight[11]*rho[18]-0.012909944487358056*weight[10]*rho[18]+0.011111111111111112*weight[9]*rho[18]+0.021825396825396828*weight[8]*rho[18]+0.011111111111111112*weight[7]*rho[18]+0.022360679774997897*weight[6]*rho[18]+0.0372677996249965*weight[5]*rho[18]+0.022360679774997897*weight[4]*rho[18]-0.02151657414559676*weight[3]*rho[18]-0.02151657414559676*weight[2]*rho[18]-0.02151657414559676*weight[1]*rho[18]+0.012422599874998833*weight[0]*rho[18]-0.034523809523809526*rho[17]*weight[17]-0.01924500897298753*rho[16]*weight[17]-0.01924500897298753*rho[15]*weight[17]-0.01924500897298753*rho[14]*weight[17]-0.008935182737458497*rho[13]*weight[17]-0.01924500897298753*rho[12]*weight[17]-0.008935182737458497*rho[11]*weight[17]-0.012909944487358056*rho[10]*weight[17]+0.011111111111111112*rho[9]*weight[17]+0.011111111111111112*rho[8]*weight[17]+0.021825396825396828*rho[7]*weight[17]+0.0372677996249965*rho[6]*weight[17]+0.022360679774997897*rho[5]*weight[17]+0.022360679774997897*rho[4]*weight[17]-0.02151657414559676*rho[3]*weight[17]-0.02151657414559676*rho[2]*weight[17]-0.02151657414559676*rho[1]*weight[17]+0.012422599874998833*rho[0]*weight[17]-0.01924500897298753*weight[16]*rho[17]-0.01924500897298753*weight[15]*rho[17]-0.01924500897298753*weight[14]*rho[17]-0.008935182737458497*weight[13]*rho[17]-0.01924500897298753*weight[12]*rho[17]-0.008935182737458497*weight[11]*rho[17]-0.012909944487358056*weight[10]*rho[17]+0.011111111111111112*weight[9]*rho[17]+0.011111111111111112*weight[8]*rho[17]+0.021825396825396828*weight[7]*rho[17]+0.0372677996249965*weight[6]*rho[17]+0.022360679774997897*weight[5]*rho[17]+0.022360679774997897*weight[4]*rho[17]-0.02151657414559676*weight[3]*rho[17]-0.02151657414559676*weight[2]*rho[17]-0.02151657414559676*weight[1]*rho[17]+0.012422599874998833*weight[0]*rho[17]-0.06785714285714287*rho[16]*weight[16]+0.021825396825396828*rho[15]*weight[16]+0.011111111111111112*rho[14]*weight[16]+0.011111111111111112*rho[13]*weight[16]+0.011111111111111112*rho[12]*weight[16]+0.022360679774997897*rho[10]*weight[16]+0.010309826235529031*rho[9]*weight[16]-0.01924500897298753*rho[8]*weight[16]+0.004303314829119352*rho[6]*weight[16]-0.021516574145596764*rho[5]*weight[16]-0.021516574145596764*rho[4]*weight[16]+0.012422599874998832*rho[3]*weight[16]+0.037267799624996496*rho[2]*weight[16]+0.012422599874998832*rho[1]*weight[16]-0.021516574145596764*rho[0]*weight[16]+0.021825396825396828*weight[15]*rho[16]+0.011111111111111112*weight[14]*rho[16]+0.011111111111111112*weight[13]*rho[16]+0.011111111111111112*weight[12]*rho[16]+0.022360679774997897*weight[10]*rho[16]+0.010309826235529031*weight[9]*rho[16]-0.01924500897298753*weight[8]*rho[16]+0.004303314829119352*weight[6]*rho[16]-0.021516574145596764*weight[5]*rho[16]-0.021516574145596764*weight[4]*rho[16]+0.012422599874998832*weight[3]*rho[16]+0.037267799624996496*weight[2]*rho[16]+0.012422599874998832*weight[1]*rho[16]-0.021516574145596764*weight[0]*rho[16]-0.06785714285714287*rho[15]*weight[15]+0.011111111111111112*rho[14]*weight[15]+0.011111111111111112*rho[13]*weight[15]+0.011111111111111112*rho[11]*weight[15]+0.022360679774997897*rho[10]*weight[15]+0.010309826235529031*rho[9]*weight[15]-0.01924500897298753*rho[7]*weight[15]-0.021516574145596764*rho[6]*weight[15]+0.004303314829119352*rho[5]*weight[15]-0.021516574145596764*rho[4]*weight[15]+0.012422599874998832*rho[3]*weight[15]+0.012422599874998832*rho[2]*weight[15]+0.037267799624996496*rho[1]*weight[15]-0.021516574145596764*rho[0]*weight[15]+0.011111111111111112*weight[14]*rho[15]+0.011111111111111112*weight[13]*rho[15]+0.011111111111111112*weight[11]*rho[15]+0.022360679774997897*weight[10]*rho[15]+0.010309826235529031*weight[9]*rho[15]-0.01924500897298753*weight[7]*rho[15]-0.021516574145596764*weight[6]*rho[15]+0.004303314829119352*weight[5]*rho[15]-0.021516574145596764*weight[4]*rho[15]+0.012422599874998832*weight[3]*rho[15]+0.012422599874998832*weight[2]*rho[15]+0.037267799624996496*weight[1]*rho[15]-0.021516574145596764*weight[0]*rho[15]-0.06785714285714287*rho[14]*weight[14]+0.021825396825396828*rho[12]*weight[14]+0.011111111111111112*rho[11]*weight[14]+0.022360679774997897*rho[10]*weight[14]-0.01924500897298753*rho[9]*weight[14]+0.010309826235529031*rho[8]*weight[14]+0.004303314829119352*rho[6]*weight[14]-0.021516574145596764*rho[5]*weight[14]-0.021516574145596764*rho[4]*weight[14]+0.037267799624996496*rho[3]*weight[14]+0.012422599874998832*rho[2]*weight[14]+0.012422599874998832*rho[1]*weight[14]-0.021516574145596764*rho[0]*weight[14]+0.021825396825396828*weight[12]*rho[14]+0.011111111111111112*weight[11]*rho[14]+0.022360679774997897*weight[10]*rho[14]-0.01924500897298753*weight[9]*rho[14]+0.010309826235529031*weight[8]*rho[14]+0.004303314829119352*weight[6]*rho[14]-0.021516574145596764*weight[5]*rho[14]-0.021516574145596764*weight[4]*rho[14]+0.037267799624996496*weight[3]*rho[14]+0.012422599874998832*weight[2]*rho[14]+0.012422599874998832*weight[1]*rho[14]-0.021516574145596764*weight[0]*rho[14]-0.06785714285714287*rho[13]*weight[13]+0.011111111111111112*rho[12]*weight[13]+0.021825396825396828*rho[11]*weight[13]+0.022360679774997897*rho[10]*weight[13]-0.01924500897298753*rho[9]*weight[13]+0.010309826235529031*rho[7]*weight[13]-0.021516574145596764*rho[6]*weight[13]+0.004303314829119352*rho[5]*weight[13]-0.021516574145596764*rho[4]*weight[13]+0.037267799624996496*rho[3]*weight[13]+0.012422599874998832*rho[2]*weight[13]+0.012422599874998832*rho[1]*weight[13]-0.021516574145596764*rho[0]*weight[13]+0.011111111111111112*weight[12]*rho[13]+0.021825396825396828*weight[11]*rho[13]+0.022360679774997897*weight[10]*rho[13]-0.01924500897298753*weight[9]*rho[13]+0.010309826235529031*weight[7]*rho[13]-0.021516574145596764*weight[6]*rho[13]+0.004303314829119352*weight[5]*rho[13]-0.021516574145596764*weight[4]*rho[13]+0.037267799624996496*weight[3]*rho[13]+0.012422599874998832*weight[2]*rho[13]+0.012422599874998832*weight[1]*rho[13]-0.021516574145596764*weight[0]*rho[13]-0.06785714285714287*rho[12]*weight[12]+0.011111111111111112*rho[11]*weight[12]+0.022360679774997897*rho[10]*weight[12]+0.010309826235529031*rho[8]*weight[12]-0.01924500897298753*rho[7]*weight[12]-0.021516574145596764*rho[6]*weight[12]-0.021516574145596764*rho[5]*weight[12]+0.004303314829119352*rho[4]*weight[12]+0.012422599874998832*rho[3]*weight[12]+0.012422599874998832*rho[2]*weight[12]+0.037267799624996496*rho[1]*weight[12]-0.021516574145596764*rho[0]*weight[12]+0.011111111111111112*weight[11]*rho[12]+0.022360679774997897*weight[10]*rho[12]+0.010309826235529031*weight[8]*rho[12]-0.01924500897298753*weight[7]*rho[12]-0.021516574145596764*weight[6]*rho[12]-0.021516574145596764*weight[5]*rho[12]+0.004303314829119352*weight[4]*rho[12]+0.012422599874998832*weight[3]*rho[12]+0.012422599874998832*weight[2]*rho[12]+0.037267799624996496*weight[1]*rho[12]-0.021516574145596764*weight[0]*rho[12]-0.06785714285714287*rho[11]*weight[11]+0.022360679774997897*rho[10]*weight[11]-0.01924500897298753*rho[8]*weight[11]+0.010309826235529031*rho[7]*weight[11]-0.021516574145596764*rho[6]*weight[11]-0.021516574145596764*rho[5]*weight[11]+0.004303314829119352*rho[4]*weight[11]+0.012422599874998832*rho[3]*weight[11]+0.037267799624996496*rho[2]*weight[11]+0.012422599874998832*rho[1]*weight[11]-0.021516574145596764*rho[0]*weight[11]+0.022360679774997897*weight[10]*rho[11]-0.01924500897298753*weight[8]*rho[11]+0.010309826235529031*weight[7]*rho[11]-0.021516574145596764*weight[6]*rho[11]-0.021516574145596764*weight[5]*rho[11]+0.004303314829119352*weight[4]*rho[11]+0.012422599874998832*weight[3]*rho[11]+0.037267799624996496*weight[2]*rho[11]+0.012422599874998832*weight[1]*rho[11]-0.021516574145596764*weight[0]*rho[11]-0.025*rho[10]*weight[10]-0.02151657414559676*rho[9]*weight[10]-0.02151657414559676*rho[8]*weight[10]-0.02151657414559676*rho[7]*weight[10]-0.014433756729740645*rho[6]*weight[10]-0.014433756729740645*rho[5]*weight[10]-0.014433756729740645*rho[4]*weight[10]+0.025*rho[3]*weight[10]+0.025*rho[2]*weight[10]+0.025*rho[1]*weight[10]-0.024056261216234404*rho[0]*weight[10]-0.02151657414559676*weight[9]*rho[10]-0.02151657414559676*weight[8]*rho[10]-0.02151657414559676*weight[7]*rho[10]-0.014433756729740645*weight[6]*rho[10]-0.014433756729740645*weight[5]*rho[10]-0.014433756729740645*weight[4]*rho[10]+0.025*weight[3]*rho[10]+0.025*weight[2]*rho[10]+0.025*weight[1]*rho[10]-0.024056261216234404*weight[0]*rho[10]-0.10119047619047619*rho[9]*weight[9]+0.012422599874998833*rho[6]*weight[9]+0.012422599874998833*rho[5]*weight[9]+0.012422599874998833*rho[4]*weight[9]+0.02151657414559676*rho[3]*weight[9]-0.02151657414559676*rho[2]*weight[9]-0.02151657414559676*rho[1]*weight[9]+0.0372677996249965*rho[0]*weight[9]+0.012422599874998833*weight[6]*rho[9]+0.012422599874998833*weight[5]*rho[9]+0.012422599874998833*weight[4]*rho[9]+0.02151657414559676*weight[3]*rho[9]-0.02151657414559676*weight[2]*rho[9]-0.02151657414559676*weight[1]*rho[9]+0.0372677996249965*weight[0]*rho[9]-0.10119047619047619*rho[8]*weight[8]+0.012422599874998833*rho[6]*weight[8]+0.012422599874998833*rho[5]*weight[8]+0.012422599874998833*rho[4]*weight[8]-0.02151657414559676*rho[3]*weight[8]+0.02151657414559676*rho[2]*weight[8]-0.02151657414559676*rho[1]*weight[8]+0.0372677996249965*rho[0]*weight[8]+0.012422599874998833*weight[6]*rho[8]+0.012422599874998833*weight[5]*rho[8]+0.012422599874998833*weight[4]*rho[8]-0.02151657414559676*weight[3]*rho[8]+0.02151657414559676*weight[2]*rho[8]-0.02151657414559676*weight[1]*rho[8]+0.0372677996249965*weight[0]*rho[8]-0.10119047619047619*rho[7]*weight[7]+0.012422599874998833*rho[6]*weight[7]+0.012422599874998833*rho[5]*weight[7]+0.012422599874998833*rho[4]*weight[7]-0.02151657414559676*rho[3]*weight[7]-0.02151657414559676*rho[2]*weight[7]+0.02151657414559676*rho[1]*weight[7]+0.0372677996249965*rho[0]*weight[7]+0.012422599874998833*weight[6]*rho[7]+0.012422599874998833*weight[5]*rho[7]+0.012422599874998833*weight[4]*rho[7]-0.02151657414559676*weight[3]*rho[7]-0.02151657414559676*weight[2]*rho[7]+0.02151657414559676*weight[1]*rho[7]+0.0372677996249965*weight[0]*rho[7]-0.058333333333333334*rho[6]*weight[6]+0.025*rho[5]*weight[6]+0.025*rho[4]*weight[6]+0.004811252243246881*rho[3]*weight[6]+0.004811252243246881*rho[2]*weight[6]-0.024056261216234404*rho[1]*weight[6]+0.01388888888888889*rho[0]*weight[6]+0.025*weight[5]*rho[6]+0.025*weight[4]*rho[6]+0.004811252243246881*weight[3]*rho[6]+0.004811252243246881*weight[2]*rho[6]-0.024056261216234404*weight[1]*rho[6]+0.01388888888888889*weight[0]*rho[6]-0.058333333333333334*rho[5]*weight[5]+0.025*rho[4]*weight[5]+0.004811252243246881*rho[3]*weight[5]-0.024056261216234404*rho[2]*weight[5]+0.004811252243246881*rho[1]*weight[5]+0.01388888888888889*rho[0]*weight[5]+0.025*weight[4]*rho[5]+0.004811252243246881*weight[3]*rho[5]-0.024056261216234404*weight[2]*rho[5]+0.004811252243246881*weight[1]*rho[5]+0.01388888888888889*weight[0]*rho[5]-0.058333333333333334*rho[4]*weight[4]-0.024056261216234404*rho[3]*weight[4]+0.004811252243246881*rho[2]*weight[4]+0.004811252243246881*rho[1]*weight[4]+0.01388888888888889*rho[0]*weight[4]-0.024056261216234404*weight[3]*rho[4]+0.004811252243246881*weight[2]*rho[4]+0.004811252243246881*weight[1]*rho[4]+0.01388888888888889*weight[0]*rho[4]-0.09166666666666667*rho[3]*weight[3]+0.01388888888888889*rho[2]*weight[3]+0.01388888888888889*rho[1]*weight[3]+0.024056261216234404*rho[0]*weight[3]+0.01388888888888889*weight[2]*rho[3]+0.01388888888888889*weight[1]*rho[3]+0.024056261216234404*weight[0]*rho[3]-0.09166666666666667*rho[2]*weight[2]+0.01388888888888889*rho[1]*weight[2]+0.024056261216234404*rho[0]*weight[2]+0.01388888888888889*weight[1]*rho[2]+0.024056261216234404*weight[0]*rho[2]-0.09166666666666667*rho[1]*weight[1]+0.024056261216234404*rho[0]*weight[1]+0.024056261216234404*weight[0]*rho[1]-0.125*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[0]] = 2.3717082451262845*phiBC[19]-2.3717082451262845*phiBC[18]-2.3717082451262845*phiBC[17]-1.3693063937629155*phiBC[16]-1.3693063937629155*phiBC[15]+1.3693063937629155*phiBC[14]+1.3693063937629155*phiBC[13]-1.3693063937629155*phiBC[12]-1.3693063937629155*phiBC[11]+1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]-1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; #endif #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[1]],0.1*rho[19]*weight[19]+0.02666666666666667*rho[18]*weight[19]-0.05773502691896258*rho[15]*weight[19]-0.051639777949432225*rho[10]*weight[19]+0.029814239699997195*rho[5]*weight[19]+0.02666666666666667*weight[18]*rho[19]-0.05773502691896258*weight[15]*rho[19]-0.051639777949432225*weight[10]*rho[19]+0.029814239699997195*weight[5]*rho[19]+0.1*rho[18]*weight[18]-0.05773502691896258*rho[12]*weight[18]-0.051639777949432225*rho[10]*weight[18]+0.029814239699997195*rho[4]*weight[18]-0.05773502691896258*weight[12]*rho[18]-0.051639777949432225*weight[10]*rho[18]+0.029814239699997195*weight[4]*rho[18]+0.11904761904761905*rho[17]*weight[17]+0.03849001794597506*rho[16]*weight[17]+0.03849001794597506*rho[14]*weight[17]-0.06873217490352689*rho[13]*weight[17]-0.06873217490352689*rho[11]*weight[17]-0.022222222222222223*rho[9]*weight[17]-0.022222222222222223*rho[8]*weight[17]+0.03968253968253969*rho[7]*weight[17]-0.074535599249993*rho[6]*weight[17]+0.04303314829119352*rho[3]*weight[17]+0.04303314829119352*rho[2]*weight[17]-0.024845199749997667*rho[0]*weight[17]+0.03849001794597506*weight[16]*rho[17]+0.03849001794597506*weight[14]*rho[17]-0.06873217490352689*weight[13]*rho[17]-0.06873217490352689*weight[11]*rho[17]-0.022222222222222223*weight[9]*rho[17]-0.022222222222222223*weight[8]*rho[17]+0.03968253968253969*weight[7]*rho[17]-0.074535599249993*weight[6]*rho[17]+0.04303314829119352*weight[3]*rho[17]+0.04303314829119352*weight[2]*rho[17]-0.024845199749997667*weight[0]*rho[17]+0.16666666666666669*rho[16]*weight[16]+0.044444444444444446*rho[14]*weight[16]-0.022222222222222223*rho[13]*weight[16]-0.09622504486493764*rho[9]*weight[16]-0.08606629658238706*rho[6]*weight[16]+0.049690399499995326*rho[3]*weight[16]+0.044444444444444446*weight[14]*rho[16]-0.022222222222222223*weight[13]*rho[16]-0.09622504486493764*weight[9]*rho[16]-0.08606629658238706*weight[6]*rho[16]+0.049690399499995326*weight[3]*rho[16]+0.1*rho[15]*weight[15]+0.029814239699997195*rho[10]*weight[15]-0.05163977794943223*rho[5]*weight[15]+0.029814239699997195*weight[10]*rho[15]-0.05163977794943223*weight[5]*rho[15]+0.16666666666666669*rho[14]*weight[14]-0.022222222222222223*rho[11]*weight[14]-0.09622504486493764*rho[8]*weight[14]-0.08606629658238706*rho[6]*weight[14]+0.049690399499995326*rho[2]*weight[14]-0.022222222222222223*weight[11]*rho[14]-0.09622504486493764*weight[8]*rho[14]-0.08606629658238706*weight[6]*rho[14]+0.049690399499995326*weight[2]*rho[14]+0.11904761904761905*rho[13]*weight[13]+0.03968253968253969*rho[11]*weight[13]+0.03849001794597506*rho[9]*weight[13]-0.06873217490352689*rho[7]*weight[13]+0.04303314829119353*rho[6]*weight[13]-0.07453559924999299*rho[3]*weight[13]-0.024845199749997663*rho[2]*weight[13]+0.04303314829119353*rho[0]*weight[13]+0.03968253968253969*weight[11]*rho[13]+0.03849001794597506*weight[9]*rho[13]-0.06873217490352689*weight[7]*rho[13]+0.04303314829119353*weight[6]*rho[13]-0.07453559924999299*weight[3]*rho[13]-0.024845199749997663*weight[2]*rho[13]+0.04303314829119353*weight[0]*rho[13]+0.1*rho[12]*weight[12]+0.029814239699997195*rho[10]*weight[12]-0.05163977794943223*rho[4]*weight[12]+0.029814239699997195*weight[10]*rho[12]-0.05163977794943223*weight[4]*rho[12]+0.11904761904761905*rho[11]*weight[11]+0.03849001794597506*rho[8]*weight[11]-0.06873217490352689*rho[7]*weight[11]+0.04303314829119353*rho[6]*weight[11]-0.024845199749997663*rho[3]*weight[11]-0.07453559924999299*rho[2]*weight[11]+0.04303314829119353*rho[0]*weight[11]+0.03849001794597506*weight[8]*rho[11]-0.06873217490352689*weight[7]*rho[11]+0.04303314829119353*weight[6]*rho[11]-0.024845199749997663*weight[3]*rho[11]-0.07453559924999299*weight[2]*rho[11]+0.04303314829119353*weight[0]*rho[11]+0.1*rho[10]*weight[10]-0.05773502691896258*rho[5]*weight[10]-0.05773502691896258*rho[4]*weight[10]+0.03333333333333333*rho[1]*weight[10]-0.05773502691896258*weight[5]*rho[10]-0.05773502691896258*weight[4]*rho[10]+0.03333333333333333*weight[1]*rho[10]+0.16666666666666669*rho[9]*weight[9]+0.04969039949999533*rho[6]*weight[9]-0.08606629658238704*rho[3]*weight[9]+0.04969039949999533*weight[6]*rho[9]-0.08606629658238704*weight[3]*rho[9]+0.16666666666666669*rho[8]*weight[8]+0.04969039949999533*rho[6]*weight[8]-0.08606629658238704*rho[2]*weight[8]+0.04969039949999533*weight[6]*rho[8]-0.08606629658238704*weight[2]*rho[8]+0.11904761904761905*rho[7]*weight[7]-0.024845199749997667*rho[6]*weight[7]+0.04303314829119352*rho[3]*weight[7]+0.04303314829119352*rho[2]*weight[7]-0.074535599249993*rho[0]*weight[7]-0.024845199749997667*weight[6]*rho[7]+0.04303314829119352*weight[3]*rho[7]+0.04303314829119352*weight[2]*rho[7]-0.074535599249993*weight[0]*rho[7]+0.16666666666666669*rho[6]*weight[6]-0.09622504486493762*rho[3]*weight[6]-0.09622504486493762*rho[2]*weight[6]+0.05555555555555556*rho[0]*weight[6]-0.09622504486493762*weight[3]*rho[6]-0.09622504486493762*weight[2]*rho[6]+0.05555555555555556*weight[0]*rho[6]+0.1*rho[5]*weight[5]+0.03333333333333333*rho[4]*weight[5]-0.05773502691896258*rho[1]*weight[5]+0.03333333333333333*weight[4]*rho[5]-0.05773502691896258*weight[1]*rho[5]+0.1*rho[4]*weight[4]-0.05773502691896258*rho[1]*weight[4]-0.05773502691896258*weight[1]*rho[4]+0.16666666666666669*rho[3]*weight[3]+0.05555555555555556*rho[2]*weight[3]-0.09622504486493762*rho[0]*weight[3]+0.05555555555555556*weight[2]*rho[3]-0.09622504486493762*weight[0]*rho[3]+0.16666666666666669*rho[2]*weight[2]-0.09622504486493762*rho[0]*weight[2]-0.09622504486493762*weight[0]*rho[2]+0.1*rho[1]*weight[1]+0.16666666666666669*rho[0]*weight[0]); + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[1]],__double_as_longlong(1.1858541225631423*phiBC[17]-1.3693063937629155*phiBC[16]+1.3693063937629155*phiBC[14]-0.6846531968814578*phiBC[13]+0.6846531968814578*phiBC[11]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]-0.39528470752104744*phiBC[7]-1.0606601717798214*phiBC[6]+0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]+0.3535533905932738*phiBC[0])); #else - bsrc[nodeOff+globalIdxs[1]] += 0.1*rho[19]*weight[19]+0.02666666666666667*rho[18]*weight[19]-0.05773502691896258*rho[15]*weight[19]-0.051639777949432225*rho[10]*weight[19]+0.029814239699997195*rho[5]*weight[19]+0.02666666666666667*weight[18]*rho[19]-0.05773502691896258*weight[15]*rho[19]-0.051639777949432225*weight[10]*rho[19]+0.029814239699997195*weight[5]*rho[19]+0.1*rho[18]*weight[18]-0.05773502691896258*rho[12]*weight[18]-0.051639777949432225*rho[10]*weight[18]+0.029814239699997195*rho[4]*weight[18]-0.05773502691896258*weight[12]*rho[18]-0.051639777949432225*weight[10]*rho[18]+0.029814239699997195*weight[4]*rho[18]+0.11904761904761905*rho[17]*weight[17]+0.03849001794597506*rho[16]*weight[17]+0.03849001794597506*rho[14]*weight[17]-0.06873217490352689*rho[13]*weight[17]-0.06873217490352689*rho[11]*weight[17]-0.022222222222222223*rho[9]*weight[17]-0.022222222222222223*rho[8]*weight[17]+0.03968253968253969*rho[7]*weight[17]-0.074535599249993*rho[6]*weight[17]+0.04303314829119352*rho[3]*weight[17]+0.04303314829119352*rho[2]*weight[17]-0.024845199749997667*rho[0]*weight[17]+0.03849001794597506*weight[16]*rho[17]+0.03849001794597506*weight[14]*rho[17]-0.06873217490352689*weight[13]*rho[17]-0.06873217490352689*weight[11]*rho[17]-0.022222222222222223*weight[9]*rho[17]-0.022222222222222223*weight[8]*rho[17]+0.03968253968253969*weight[7]*rho[17]-0.074535599249993*weight[6]*rho[17]+0.04303314829119352*weight[3]*rho[17]+0.04303314829119352*weight[2]*rho[17]-0.024845199749997667*weight[0]*rho[17]+0.16666666666666669*rho[16]*weight[16]+0.044444444444444446*rho[14]*weight[16]-0.022222222222222223*rho[13]*weight[16]-0.09622504486493764*rho[9]*weight[16]-0.08606629658238706*rho[6]*weight[16]+0.049690399499995326*rho[3]*weight[16]+0.044444444444444446*weight[14]*rho[16]-0.022222222222222223*weight[13]*rho[16]-0.09622504486493764*weight[9]*rho[16]-0.08606629658238706*weight[6]*rho[16]+0.049690399499995326*weight[3]*rho[16]+0.1*rho[15]*weight[15]+0.029814239699997195*rho[10]*weight[15]-0.05163977794943223*rho[5]*weight[15]+0.029814239699997195*weight[10]*rho[15]-0.05163977794943223*weight[5]*rho[15]+0.16666666666666669*rho[14]*weight[14]-0.022222222222222223*rho[11]*weight[14]-0.09622504486493764*rho[8]*weight[14]-0.08606629658238706*rho[6]*weight[14]+0.049690399499995326*rho[2]*weight[14]-0.022222222222222223*weight[11]*rho[14]-0.09622504486493764*weight[8]*rho[14]-0.08606629658238706*weight[6]*rho[14]+0.049690399499995326*weight[2]*rho[14]+0.11904761904761905*rho[13]*weight[13]+0.03968253968253969*rho[11]*weight[13]+0.03849001794597506*rho[9]*weight[13]-0.06873217490352689*rho[7]*weight[13]+0.04303314829119353*rho[6]*weight[13]-0.07453559924999299*rho[3]*weight[13]-0.024845199749997663*rho[2]*weight[13]+0.04303314829119353*rho[0]*weight[13]+0.03968253968253969*weight[11]*rho[13]+0.03849001794597506*weight[9]*rho[13]-0.06873217490352689*weight[7]*rho[13]+0.04303314829119353*weight[6]*rho[13]-0.07453559924999299*weight[3]*rho[13]-0.024845199749997663*weight[2]*rho[13]+0.04303314829119353*weight[0]*rho[13]+0.1*rho[12]*weight[12]+0.029814239699997195*rho[10]*weight[12]-0.05163977794943223*rho[4]*weight[12]+0.029814239699997195*weight[10]*rho[12]-0.05163977794943223*weight[4]*rho[12]+0.11904761904761905*rho[11]*weight[11]+0.03849001794597506*rho[8]*weight[11]-0.06873217490352689*rho[7]*weight[11]+0.04303314829119353*rho[6]*weight[11]-0.024845199749997663*rho[3]*weight[11]-0.07453559924999299*rho[2]*weight[11]+0.04303314829119353*rho[0]*weight[11]+0.03849001794597506*weight[8]*rho[11]-0.06873217490352689*weight[7]*rho[11]+0.04303314829119353*weight[6]*rho[11]-0.024845199749997663*weight[3]*rho[11]-0.07453559924999299*weight[2]*rho[11]+0.04303314829119353*weight[0]*rho[11]+0.1*rho[10]*weight[10]-0.05773502691896258*rho[5]*weight[10]-0.05773502691896258*rho[4]*weight[10]+0.03333333333333333*rho[1]*weight[10]-0.05773502691896258*weight[5]*rho[10]-0.05773502691896258*weight[4]*rho[10]+0.03333333333333333*weight[1]*rho[10]+0.16666666666666669*rho[9]*weight[9]+0.04969039949999533*rho[6]*weight[9]-0.08606629658238704*rho[3]*weight[9]+0.04969039949999533*weight[6]*rho[9]-0.08606629658238704*weight[3]*rho[9]+0.16666666666666669*rho[8]*weight[8]+0.04969039949999533*rho[6]*weight[8]-0.08606629658238704*rho[2]*weight[8]+0.04969039949999533*weight[6]*rho[8]-0.08606629658238704*weight[2]*rho[8]+0.11904761904761905*rho[7]*weight[7]-0.024845199749997667*rho[6]*weight[7]+0.04303314829119352*rho[3]*weight[7]+0.04303314829119352*rho[2]*weight[7]-0.074535599249993*rho[0]*weight[7]-0.024845199749997667*weight[6]*rho[7]+0.04303314829119352*weight[3]*rho[7]+0.04303314829119352*weight[2]*rho[7]-0.074535599249993*weight[0]*rho[7]+0.16666666666666669*rho[6]*weight[6]-0.09622504486493762*rho[3]*weight[6]-0.09622504486493762*rho[2]*weight[6]+0.05555555555555556*rho[0]*weight[6]-0.09622504486493762*weight[3]*rho[6]-0.09622504486493762*weight[2]*rho[6]+0.05555555555555556*weight[0]*rho[6]+0.1*rho[5]*weight[5]+0.03333333333333333*rho[4]*weight[5]-0.05773502691896258*rho[1]*weight[5]+0.03333333333333333*weight[4]*rho[5]-0.05773502691896258*weight[1]*rho[5]+0.1*rho[4]*weight[4]-0.05773502691896258*rho[1]*weight[4]-0.05773502691896258*weight[1]*rho[4]+0.16666666666666669*rho[3]*weight[3]+0.05555555555555556*rho[2]*weight[3]-0.09622504486493762*rho[0]*weight[3]+0.05555555555555556*weight[2]*rho[3]-0.09622504486493762*weight[0]*rho[3]+0.16666666666666669*rho[2]*weight[2]-0.09622504486493762*rho[0]*weight[2]-0.09622504486493762*weight[0]*rho[2]+0.1*rho[1]*weight[1]+0.16666666666666669*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[1]] = 1.1858541225631423*phiBC[17]-1.3693063937629155*phiBC[16]+1.3693063937629155*phiBC[14]-0.6846531968814578*phiBC[13]+0.6846531968814578*phiBC[11]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]-0.39528470752104744*phiBC[7]-1.0606601717798214*phiBC[6]+0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]+0.3535533905932738*phiBC[0]; #endif #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[2]],-(0.034523809523809526*rho[19]*weight[19])+0.02*rho[18]*weight[19]-0.02*rho[17]*weight[19]+0.008935182737458497*rho[16]*weight[19]-0.008935182737458497*rho[15]*weight[19]+0.01924500897298753*rho[14]*weight[19]+0.01924500897298753*rho[13]*weight[19]-0.01924500897298753*rho[12]*weight[19]+0.01924500897298753*rho[11]*weight[19]-0.012909944487358056*rho[10]*weight[19]-0.021825396825396828*rho[9]*weight[19]-0.011111111111111112*rho[8]*weight[19]-0.011111111111111112*rho[7]*weight[19]-0.022360679774997897*rho[6]*weight[19]+0.022360679774997897*rho[5]*weight[19]+0.0372677996249965*rho[4]*weight[19]+0.02151657414559676*rho[3]*weight[19]+0.02151657414559676*rho[2]*weight[19]-0.02151657414559676*rho[1]*weight[19]-0.012422599874998833*rho[0]*weight[19]+0.02*weight[18]*rho[19]-0.02*weight[17]*rho[19]+0.008935182737458497*weight[16]*rho[19]-0.008935182737458497*weight[15]*rho[19]+0.01924500897298753*weight[14]*rho[19]+0.01924500897298753*weight[13]*rho[19]-0.01924500897298753*weight[12]*rho[19]+0.01924500897298753*weight[11]*rho[19]-0.012909944487358056*weight[10]*rho[19]-0.021825396825396828*weight[9]*rho[19]-0.011111111111111112*weight[8]*rho[19]-0.011111111111111112*weight[7]*rho[19]-0.022360679774997897*weight[6]*rho[19]+0.022360679774997897*weight[5]*rho[19]+0.0372677996249965*weight[4]*rho[19]+0.02151657414559676*weight[3]*rho[19]+0.02151657414559676*weight[2]*rho[19]-0.02151657414559676*weight[1]*rho[19]-0.012422599874998833*weight[0]*rho[19]-0.034523809523809526*rho[18]*weight[18]-0.02*rho[17]*weight[18]+0.01924500897298753*rho[16]*weight[18]-0.01924500897298753*rho[15]*weight[18]+0.008935182737458497*rho[14]*weight[18]+0.01924500897298753*rho[13]*weight[18]-0.008935182737458497*rho[12]*weight[18]+0.01924500897298753*rho[11]*weight[18]-0.012909944487358056*rho[10]*weight[18]-0.011111111111111112*rho[9]*weight[18]-0.021825396825396828*rho[8]*weight[18]-0.011111111111111112*rho[7]*weight[18]-0.022360679774997897*rho[6]*weight[18]+0.0372677996249965*rho[5]*weight[18]+0.022360679774997897*rho[4]*weight[18]+0.02151657414559676*rho[3]*weight[18]+0.02151657414559676*rho[2]*weight[18]-0.02151657414559676*rho[1]*weight[18]-0.012422599874998833*rho[0]*weight[18]-0.02*weight[17]*rho[18]+0.01924500897298753*weight[16]*rho[18]-0.01924500897298753*weight[15]*rho[18]+0.008935182737458497*weight[14]*rho[18]+0.01924500897298753*weight[13]*rho[18]-0.008935182737458497*weight[12]*rho[18]+0.01924500897298753*weight[11]*rho[18]-0.012909944487358056*weight[10]*rho[18]-0.011111111111111112*weight[9]*rho[18]-0.021825396825396828*weight[8]*rho[18]-0.011111111111111112*weight[7]*rho[18]-0.022360679774997897*weight[6]*rho[18]+0.0372677996249965*weight[5]*rho[18]+0.022360679774997897*weight[4]*rho[18]+0.02151657414559676*weight[3]*rho[18]+0.02151657414559676*weight[2]*rho[18]-0.02151657414559676*weight[1]*rho[18]-0.012422599874998833*weight[0]*rho[18]-0.034523809523809526*rho[17]*weight[17]-0.01924500897298753*rho[16]*weight[17]+0.01924500897298753*rho[15]*weight[17]-0.01924500897298753*rho[14]*weight[17]-0.008935182737458497*rho[13]*weight[17]+0.01924500897298753*rho[12]*weight[17]-0.008935182737458497*rho[11]*weight[17]+0.012909944487358056*rho[10]*weight[17]+0.011111111111111112*rho[9]*weight[17]+0.011111111111111112*rho[8]*weight[17]+0.021825396825396828*rho[7]*weight[17]+0.0372677996249965*rho[6]*weight[17]-0.022360679774997897*rho[5]*weight[17]-0.022360679774997897*rho[4]*weight[17]-0.02151657414559676*rho[3]*weight[17]-0.02151657414559676*rho[2]*weight[17]+0.02151657414559676*rho[1]*weight[17]+0.012422599874998833*rho[0]*weight[17]-0.01924500897298753*weight[16]*rho[17]+0.01924500897298753*weight[15]*rho[17]-0.01924500897298753*weight[14]*rho[17]-0.008935182737458497*weight[13]*rho[17]+0.01924500897298753*weight[12]*rho[17]-0.008935182737458497*weight[11]*rho[17]+0.012909944487358056*weight[10]*rho[17]+0.011111111111111112*weight[9]*rho[17]+0.011111111111111112*weight[8]*rho[17]+0.021825396825396828*weight[7]*rho[17]+0.0372677996249965*weight[6]*rho[17]-0.022360679774997897*weight[5]*rho[17]-0.022360679774997897*weight[4]*rho[17]-0.02151657414559676*weight[3]*rho[17]-0.02151657414559676*weight[2]*rho[17]+0.02151657414559676*weight[1]*rho[17]+0.012422599874998833*weight[0]*rho[17]-0.06785714285714287*rho[16]*weight[16]-0.021825396825396828*rho[15]*weight[16]+0.011111111111111112*rho[14]*weight[16]+0.011111111111111112*rho[13]*weight[16]-0.011111111111111112*rho[12]*weight[16]-0.022360679774997897*rho[10]*weight[16]+0.010309826235529031*rho[9]*weight[16]-0.01924500897298753*rho[8]*weight[16]+0.004303314829119352*rho[6]*weight[16]+0.021516574145596764*rho[5]*weight[16]+0.021516574145596764*rho[4]*weight[16]+0.012422599874998832*rho[3]*weight[16]+0.037267799624996496*rho[2]*weight[16]-0.012422599874998832*rho[1]*weight[16]-0.021516574145596764*rho[0]*weight[16]-0.021825396825396828*weight[15]*rho[16]+0.011111111111111112*weight[14]*rho[16]+0.011111111111111112*weight[13]*rho[16]-0.011111111111111112*weight[12]*rho[16]-0.022360679774997897*weight[10]*rho[16]+0.010309826235529031*weight[9]*rho[16]-0.01924500897298753*weight[8]*rho[16]+0.004303314829119352*weight[6]*rho[16]+0.021516574145596764*weight[5]*rho[16]+0.021516574145596764*weight[4]*rho[16]+0.012422599874998832*weight[3]*rho[16]+0.037267799624996496*weight[2]*rho[16]-0.012422599874998832*weight[1]*rho[16]-0.021516574145596764*weight[0]*rho[16]-0.06785714285714287*rho[15]*weight[15]-0.011111111111111112*rho[14]*weight[15]-0.011111111111111112*rho[13]*weight[15]-0.011111111111111112*rho[11]*weight[15]+0.022360679774997897*rho[10]*weight[15]-0.010309826235529031*rho[9]*weight[15]+0.01924500897298753*rho[7]*weight[15]+0.021516574145596764*rho[6]*weight[15]+0.004303314829119352*rho[5]*weight[15]-0.021516574145596764*rho[4]*weight[15]-0.012422599874998832*rho[3]*weight[15]-0.012422599874998832*rho[2]*weight[15]+0.037267799624996496*rho[1]*weight[15]+0.021516574145596764*rho[0]*weight[15]-0.011111111111111112*weight[14]*rho[15]-0.011111111111111112*weight[13]*rho[15]-0.011111111111111112*weight[11]*rho[15]+0.022360679774997897*weight[10]*rho[15]-0.010309826235529031*weight[9]*rho[15]+0.01924500897298753*weight[7]*rho[15]+0.021516574145596764*weight[6]*rho[15]+0.004303314829119352*weight[5]*rho[15]-0.021516574145596764*weight[4]*rho[15]-0.012422599874998832*weight[3]*rho[15]-0.012422599874998832*weight[2]*rho[15]+0.037267799624996496*weight[1]*rho[15]+0.021516574145596764*weight[0]*rho[15]-0.06785714285714287*rho[14]*weight[14]-0.021825396825396828*rho[12]*weight[14]+0.011111111111111112*rho[11]*weight[14]-0.022360679774997897*rho[10]*weight[14]-0.01924500897298753*rho[9]*weight[14]+0.010309826235529031*rho[8]*weight[14]+0.004303314829119352*rho[6]*weight[14]+0.021516574145596764*rho[5]*weight[14]+0.021516574145596764*rho[4]*weight[14]+0.037267799624996496*rho[3]*weight[14]+0.012422599874998832*rho[2]*weight[14]-0.012422599874998832*rho[1]*weight[14]-0.021516574145596764*rho[0]*weight[14]-0.021825396825396828*weight[12]*rho[14]+0.011111111111111112*weight[11]*rho[14]-0.022360679774997897*weight[10]*rho[14]-0.01924500897298753*weight[9]*rho[14]+0.010309826235529031*weight[8]*rho[14]+0.004303314829119352*weight[6]*rho[14]+0.021516574145596764*weight[5]*rho[14]+0.021516574145596764*weight[4]*rho[14]+0.037267799624996496*weight[3]*rho[14]+0.012422599874998832*weight[2]*rho[14]-0.012422599874998832*weight[1]*rho[14]-0.021516574145596764*weight[0]*rho[14]-0.06785714285714287*rho[13]*weight[13]-0.011111111111111112*rho[12]*weight[13]+0.021825396825396828*rho[11]*weight[13]-0.022360679774997897*rho[10]*weight[13]-0.01924500897298753*rho[9]*weight[13]+0.010309826235529031*rho[7]*weight[13]-0.021516574145596764*rho[6]*weight[13]-0.004303314829119352*rho[5]*weight[13]+0.021516574145596764*rho[4]*weight[13]+0.037267799624996496*rho[3]*weight[13]+0.012422599874998832*rho[2]*weight[13]-0.012422599874998832*rho[1]*weight[13]-0.021516574145596764*rho[0]*weight[13]-0.011111111111111112*weight[12]*rho[13]+0.021825396825396828*weight[11]*rho[13]-0.022360679774997897*weight[10]*rho[13]-0.01924500897298753*weight[9]*rho[13]+0.010309826235529031*weight[7]*rho[13]-0.021516574145596764*weight[6]*rho[13]-0.004303314829119352*weight[5]*rho[13]+0.021516574145596764*weight[4]*rho[13]+0.037267799624996496*weight[3]*rho[13]+0.012422599874998832*weight[2]*rho[13]-0.012422599874998832*weight[1]*rho[13]-0.021516574145596764*weight[0]*rho[13]-0.06785714285714287*rho[12]*weight[12]-0.011111111111111112*rho[11]*weight[12]+0.022360679774997897*rho[10]*weight[12]-0.010309826235529031*rho[8]*weight[12]+0.01924500897298753*rho[7]*weight[12]+0.021516574145596764*rho[6]*weight[12]-0.021516574145596764*rho[5]*weight[12]+0.004303314829119352*rho[4]*weight[12]-0.012422599874998832*rho[3]*weight[12]-0.012422599874998832*rho[2]*weight[12]+0.037267799624996496*rho[1]*weight[12]+0.021516574145596764*rho[0]*weight[12]-0.011111111111111112*weight[11]*rho[12]+0.022360679774997897*weight[10]*rho[12]-0.010309826235529031*weight[8]*rho[12]+0.01924500897298753*weight[7]*rho[12]+0.021516574145596764*weight[6]*rho[12]-0.021516574145596764*weight[5]*rho[12]+0.004303314829119352*weight[4]*rho[12]-0.012422599874998832*weight[3]*rho[12]-0.012422599874998832*weight[2]*rho[12]+0.037267799624996496*weight[1]*rho[12]+0.021516574145596764*weight[0]*rho[12]-0.06785714285714287*rho[11]*weight[11]-0.022360679774997897*rho[10]*weight[11]-0.01924500897298753*rho[8]*weight[11]+0.010309826235529031*rho[7]*weight[11]-0.021516574145596764*rho[6]*weight[11]+0.021516574145596764*rho[5]*weight[11]-0.004303314829119352*rho[4]*weight[11]+0.012422599874998832*rho[3]*weight[11]+0.037267799624996496*rho[2]*weight[11]-0.012422599874998832*rho[1]*weight[11]-0.021516574145596764*rho[0]*weight[11]-0.022360679774997897*weight[10]*rho[11]-0.01924500897298753*weight[8]*rho[11]+0.010309826235529031*weight[7]*rho[11]-0.021516574145596764*weight[6]*rho[11]+0.021516574145596764*weight[5]*rho[11]-0.004303314829119352*weight[4]*rho[11]+0.012422599874998832*weight[3]*rho[11]+0.037267799624996496*weight[2]*rho[11]-0.012422599874998832*weight[1]*rho[11]-0.021516574145596764*weight[0]*rho[11]-0.025*rho[10]*weight[10]+0.02151657414559676*rho[9]*weight[10]+0.02151657414559676*rho[8]*weight[10]+0.02151657414559676*rho[7]*weight[10]+0.014433756729740645*rho[6]*weight[10]-0.014433756729740645*rho[5]*weight[10]-0.014433756729740645*rho[4]*weight[10]-0.025*rho[3]*weight[10]-0.025*rho[2]*weight[10]+0.025*rho[1]*weight[10]+0.024056261216234404*rho[0]*weight[10]+0.02151657414559676*weight[9]*rho[10]+0.02151657414559676*weight[8]*rho[10]+0.02151657414559676*weight[7]*rho[10]+0.014433756729740645*weight[6]*rho[10]-0.014433756729740645*weight[5]*rho[10]-0.014433756729740645*weight[4]*rho[10]-0.025*weight[3]*rho[10]-0.025*weight[2]*rho[10]+0.025*weight[1]*rho[10]+0.024056261216234404*weight[0]*rho[10]-0.10119047619047619*rho[9]*weight[9]+0.012422599874998833*rho[6]*weight[9]-0.012422599874998833*rho[5]*weight[9]-0.012422599874998833*rho[4]*weight[9]+0.02151657414559676*rho[3]*weight[9]-0.02151657414559676*rho[2]*weight[9]+0.02151657414559676*rho[1]*weight[9]+0.0372677996249965*rho[0]*weight[9]+0.012422599874998833*weight[6]*rho[9]-0.012422599874998833*weight[5]*rho[9]-0.012422599874998833*weight[4]*rho[9]+0.02151657414559676*weight[3]*rho[9]-0.02151657414559676*weight[2]*rho[9]+0.02151657414559676*weight[1]*rho[9]+0.0372677996249965*weight[0]*rho[9]-0.10119047619047619*rho[8]*weight[8]+0.012422599874998833*rho[6]*weight[8]-0.012422599874998833*rho[5]*weight[8]-0.012422599874998833*rho[4]*weight[8]-0.02151657414559676*rho[3]*weight[8]+0.02151657414559676*rho[2]*weight[8]+0.02151657414559676*rho[1]*weight[8]+0.0372677996249965*rho[0]*weight[8]+0.012422599874998833*weight[6]*rho[8]-0.012422599874998833*weight[5]*rho[8]-0.012422599874998833*weight[4]*rho[8]-0.02151657414559676*weight[3]*rho[8]+0.02151657414559676*weight[2]*rho[8]+0.02151657414559676*weight[1]*rho[8]+0.0372677996249965*weight[0]*rho[8]-0.10119047619047619*rho[7]*weight[7]+0.012422599874998833*rho[6]*weight[7]-0.012422599874998833*rho[5]*weight[7]-0.012422599874998833*rho[4]*weight[7]-0.02151657414559676*rho[3]*weight[7]-0.02151657414559676*rho[2]*weight[7]-0.02151657414559676*rho[1]*weight[7]+0.0372677996249965*rho[0]*weight[7]+0.012422599874998833*weight[6]*rho[7]-0.012422599874998833*weight[5]*rho[7]-0.012422599874998833*weight[4]*rho[7]-0.02151657414559676*weight[3]*rho[7]-0.02151657414559676*weight[2]*rho[7]-0.02151657414559676*weight[1]*rho[7]+0.0372677996249965*weight[0]*rho[7]-0.058333333333333334*rho[6]*weight[6]-0.025*rho[5]*weight[6]-0.025*rho[4]*weight[6]+0.004811252243246881*rho[3]*weight[6]+0.004811252243246881*rho[2]*weight[6]+0.024056261216234404*rho[1]*weight[6]+0.01388888888888889*rho[0]*weight[6]-0.025*weight[5]*rho[6]-0.025*weight[4]*rho[6]+0.004811252243246881*weight[3]*rho[6]+0.004811252243246881*weight[2]*rho[6]+0.024056261216234404*weight[1]*rho[6]+0.01388888888888889*weight[0]*rho[6]-0.058333333333333334*rho[5]*weight[5]+0.025*rho[4]*weight[5]-0.004811252243246881*rho[3]*weight[5]+0.024056261216234404*rho[2]*weight[5]+0.004811252243246881*rho[1]*weight[5]-0.01388888888888889*rho[0]*weight[5]+0.025*weight[4]*rho[5]-0.004811252243246881*weight[3]*rho[5]+0.024056261216234404*weight[2]*rho[5]+0.004811252243246881*weight[1]*rho[5]-0.01388888888888889*weight[0]*rho[5]-0.058333333333333334*rho[4]*weight[4]+0.024056261216234404*rho[3]*weight[4]-0.004811252243246881*rho[2]*weight[4]+0.004811252243246881*rho[1]*weight[4]-0.01388888888888889*rho[0]*weight[4]+0.024056261216234404*weight[3]*rho[4]-0.004811252243246881*weight[2]*rho[4]+0.004811252243246881*weight[1]*rho[4]-0.01388888888888889*weight[0]*rho[4]-0.09166666666666667*rho[3]*weight[3]+0.01388888888888889*rho[2]*weight[3]-0.01388888888888889*rho[1]*weight[3]+0.024056261216234404*rho[0]*weight[3]+0.01388888888888889*weight[2]*rho[3]-0.01388888888888889*weight[1]*rho[3]+0.024056261216234404*weight[0]*rho[3]-0.09166666666666667*rho[2]*weight[2]-0.01388888888888889*rho[1]*weight[2]+0.024056261216234404*rho[0]*weight[2]-0.01388888888888889*weight[1]*rho[2]+0.024056261216234404*weight[0]*rho[2]-0.09166666666666667*rho[1]*weight[1]-0.024056261216234404*rho[0]*weight[1]-0.024056261216234404*weight[0]*rho[1]-0.125*rho[0]*weight[0]); + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[2]],__double_as_longlong(-(2.3717082451262845*phiBC[19])+2.3717082451262845*phiBC[18]-2.3717082451262845*phiBC[17]-1.3693063937629155*phiBC[16]+1.3693063937629155*phiBC[15]+1.3693063937629155*phiBC[14]+1.3693063937629155*phiBC[13]+1.3693063937629155*phiBC[12]-1.3693063937629155*phiBC[11]-1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]-1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); #else - bsrc[nodeOff+globalIdxs[2]] += -(0.034523809523809526*rho[19]*weight[19])+0.02*rho[18]*weight[19]-0.02*rho[17]*weight[19]+0.008935182737458497*rho[16]*weight[19]-0.008935182737458497*rho[15]*weight[19]+0.01924500897298753*rho[14]*weight[19]+0.01924500897298753*rho[13]*weight[19]-0.01924500897298753*rho[12]*weight[19]+0.01924500897298753*rho[11]*weight[19]-0.012909944487358056*rho[10]*weight[19]-0.021825396825396828*rho[9]*weight[19]-0.011111111111111112*rho[8]*weight[19]-0.011111111111111112*rho[7]*weight[19]-0.022360679774997897*rho[6]*weight[19]+0.022360679774997897*rho[5]*weight[19]+0.0372677996249965*rho[4]*weight[19]+0.02151657414559676*rho[3]*weight[19]+0.02151657414559676*rho[2]*weight[19]-0.02151657414559676*rho[1]*weight[19]-0.012422599874998833*rho[0]*weight[19]+0.02*weight[18]*rho[19]-0.02*weight[17]*rho[19]+0.008935182737458497*weight[16]*rho[19]-0.008935182737458497*weight[15]*rho[19]+0.01924500897298753*weight[14]*rho[19]+0.01924500897298753*weight[13]*rho[19]-0.01924500897298753*weight[12]*rho[19]+0.01924500897298753*weight[11]*rho[19]-0.012909944487358056*weight[10]*rho[19]-0.021825396825396828*weight[9]*rho[19]-0.011111111111111112*weight[8]*rho[19]-0.011111111111111112*weight[7]*rho[19]-0.022360679774997897*weight[6]*rho[19]+0.022360679774997897*weight[5]*rho[19]+0.0372677996249965*weight[4]*rho[19]+0.02151657414559676*weight[3]*rho[19]+0.02151657414559676*weight[2]*rho[19]-0.02151657414559676*weight[1]*rho[19]-0.012422599874998833*weight[0]*rho[19]-0.034523809523809526*rho[18]*weight[18]-0.02*rho[17]*weight[18]+0.01924500897298753*rho[16]*weight[18]-0.01924500897298753*rho[15]*weight[18]+0.008935182737458497*rho[14]*weight[18]+0.01924500897298753*rho[13]*weight[18]-0.008935182737458497*rho[12]*weight[18]+0.01924500897298753*rho[11]*weight[18]-0.012909944487358056*rho[10]*weight[18]-0.011111111111111112*rho[9]*weight[18]-0.021825396825396828*rho[8]*weight[18]-0.011111111111111112*rho[7]*weight[18]-0.022360679774997897*rho[6]*weight[18]+0.0372677996249965*rho[5]*weight[18]+0.022360679774997897*rho[4]*weight[18]+0.02151657414559676*rho[3]*weight[18]+0.02151657414559676*rho[2]*weight[18]-0.02151657414559676*rho[1]*weight[18]-0.012422599874998833*rho[0]*weight[18]-0.02*weight[17]*rho[18]+0.01924500897298753*weight[16]*rho[18]-0.01924500897298753*weight[15]*rho[18]+0.008935182737458497*weight[14]*rho[18]+0.01924500897298753*weight[13]*rho[18]-0.008935182737458497*weight[12]*rho[18]+0.01924500897298753*weight[11]*rho[18]-0.012909944487358056*weight[10]*rho[18]-0.011111111111111112*weight[9]*rho[18]-0.021825396825396828*weight[8]*rho[18]-0.011111111111111112*weight[7]*rho[18]-0.022360679774997897*weight[6]*rho[18]+0.0372677996249965*weight[5]*rho[18]+0.022360679774997897*weight[4]*rho[18]+0.02151657414559676*weight[3]*rho[18]+0.02151657414559676*weight[2]*rho[18]-0.02151657414559676*weight[1]*rho[18]-0.012422599874998833*weight[0]*rho[18]-0.034523809523809526*rho[17]*weight[17]-0.01924500897298753*rho[16]*weight[17]+0.01924500897298753*rho[15]*weight[17]-0.01924500897298753*rho[14]*weight[17]-0.008935182737458497*rho[13]*weight[17]+0.01924500897298753*rho[12]*weight[17]-0.008935182737458497*rho[11]*weight[17]+0.012909944487358056*rho[10]*weight[17]+0.011111111111111112*rho[9]*weight[17]+0.011111111111111112*rho[8]*weight[17]+0.021825396825396828*rho[7]*weight[17]+0.0372677996249965*rho[6]*weight[17]-0.022360679774997897*rho[5]*weight[17]-0.022360679774997897*rho[4]*weight[17]-0.02151657414559676*rho[3]*weight[17]-0.02151657414559676*rho[2]*weight[17]+0.02151657414559676*rho[1]*weight[17]+0.012422599874998833*rho[0]*weight[17]-0.01924500897298753*weight[16]*rho[17]+0.01924500897298753*weight[15]*rho[17]-0.01924500897298753*weight[14]*rho[17]-0.008935182737458497*weight[13]*rho[17]+0.01924500897298753*weight[12]*rho[17]-0.008935182737458497*weight[11]*rho[17]+0.012909944487358056*weight[10]*rho[17]+0.011111111111111112*weight[9]*rho[17]+0.011111111111111112*weight[8]*rho[17]+0.021825396825396828*weight[7]*rho[17]+0.0372677996249965*weight[6]*rho[17]-0.022360679774997897*weight[5]*rho[17]-0.022360679774997897*weight[4]*rho[17]-0.02151657414559676*weight[3]*rho[17]-0.02151657414559676*weight[2]*rho[17]+0.02151657414559676*weight[1]*rho[17]+0.012422599874998833*weight[0]*rho[17]-0.06785714285714287*rho[16]*weight[16]-0.021825396825396828*rho[15]*weight[16]+0.011111111111111112*rho[14]*weight[16]+0.011111111111111112*rho[13]*weight[16]-0.011111111111111112*rho[12]*weight[16]-0.022360679774997897*rho[10]*weight[16]+0.010309826235529031*rho[9]*weight[16]-0.01924500897298753*rho[8]*weight[16]+0.004303314829119352*rho[6]*weight[16]+0.021516574145596764*rho[5]*weight[16]+0.021516574145596764*rho[4]*weight[16]+0.012422599874998832*rho[3]*weight[16]+0.037267799624996496*rho[2]*weight[16]-0.012422599874998832*rho[1]*weight[16]-0.021516574145596764*rho[0]*weight[16]-0.021825396825396828*weight[15]*rho[16]+0.011111111111111112*weight[14]*rho[16]+0.011111111111111112*weight[13]*rho[16]-0.011111111111111112*weight[12]*rho[16]-0.022360679774997897*weight[10]*rho[16]+0.010309826235529031*weight[9]*rho[16]-0.01924500897298753*weight[8]*rho[16]+0.004303314829119352*weight[6]*rho[16]+0.021516574145596764*weight[5]*rho[16]+0.021516574145596764*weight[4]*rho[16]+0.012422599874998832*weight[3]*rho[16]+0.037267799624996496*weight[2]*rho[16]-0.012422599874998832*weight[1]*rho[16]-0.021516574145596764*weight[0]*rho[16]-0.06785714285714287*rho[15]*weight[15]-0.011111111111111112*rho[14]*weight[15]-0.011111111111111112*rho[13]*weight[15]-0.011111111111111112*rho[11]*weight[15]+0.022360679774997897*rho[10]*weight[15]-0.010309826235529031*rho[9]*weight[15]+0.01924500897298753*rho[7]*weight[15]+0.021516574145596764*rho[6]*weight[15]+0.004303314829119352*rho[5]*weight[15]-0.021516574145596764*rho[4]*weight[15]-0.012422599874998832*rho[3]*weight[15]-0.012422599874998832*rho[2]*weight[15]+0.037267799624996496*rho[1]*weight[15]+0.021516574145596764*rho[0]*weight[15]-0.011111111111111112*weight[14]*rho[15]-0.011111111111111112*weight[13]*rho[15]-0.011111111111111112*weight[11]*rho[15]+0.022360679774997897*weight[10]*rho[15]-0.010309826235529031*weight[9]*rho[15]+0.01924500897298753*weight[7]*rho[15]+0.021516574145596764*weight[6]*rho[15]+0.004303314829119352*weight[5]*rho[15]-0.021516574145596764*weight[4]*rho[15]-0.012422599874998832*weight[3]*rho[15]-0.012422599874998832*weight[2]*rho[15]+0.037267799624996496*weight[1]*rho[15]+0.021516574145596764*weight[0]*rho[15]-0.06785714285714287*rho[14]*weight[14]-0.021825396825396828*rho[12]*weight[14]+0.011111111111111112*rho[11]*weight[14]-0.022360679774997897*rho[10]*weight[14]-0.01924500897298753*rho[9]*weight[14]+0.010309826235529031*rho[8]*weight[14]+0.004303314829119352*rho[6]*weight[14]+0.021516574145596764*rho[5]*weight[14]+0.021516574145596764*rho[4]*weight[14]+0.037267799624996496*rho[3]*weight[14]+0.012422599874998832*rho[2]*weight[14]-0.012422599874998832*rho[1]*weight[14]-0.021516574145596764*rho[0]*weight[14]-0.021825396825396828*weight[12]*rho[14]+0.011111111111111112*weight[11]*rho[14]-0.022360679774997897*weight[10]*rho[14]-0.01924500897298753*weight[9]*rho[14]+0.010309826235529031*weight[8]*rho[14]+0.004303314829119352*weight[6]*rho[14]+0.021516574145596764*weight[5]*rho[14]+0.021516574145596764*weight[4]*rho[14]+0.037267799624996496*weight[3]*rho[14]+0.012422599874998832*weight[2]*rho[14]-0.012422599874998832*weight[1]*rho[14]-0.021516574145596764*weight[0]*rho[14]-0.06785714285714287*rho[13]*weight[13]-0.011111111111111112*rho[12]*weight[13]+0.021825396825396828*rho[11]*weight[13]-0.022360679774997897*rho[10]*weight[13]-0.01924500897298753*rho[9]*weight[13]+0.010309826235529031*rho[7]*weight[13]-0.021516574145596764*rho[6]*weight[13]-0.004303314829119352*rho[5]*weight[13]+0.021516574145596764*rho[4]*weight[13]+0.037267799624996496*rho[3]*weight[13]+0.012422599874998832*rho[2]*weight[13]-0.012422599874998832*rho[1]*weight[13]-0.021516574145596764*rho[0]*weight[13]-0.011111111111111112*weight[12]*rho[13]+0.021825396825396828*weight[11]*rho[13]-0.022360679774997897*weight[10]*rho[13]-0.01924500897298753*weight[9]*rho[13]+0.010309826235529031*weight[7]*rho[13]-0.021516574145596764*weight[6]*rho[13]-0.004303314829119352*weight[5]*rho[13]+0.021516574145596764*weight[4]*rho[13]+0.037267799624996496*weight[3]*rho[13]+0.012422599874998832*weight[2]*rho[13]-0.012422599874998832*weight[1]*rho[13]-0.021516574145596764*weight[0]*rho[13]-0.06785714285714287*rho[12]*weight[12]-0.011111111111111112*rho[11]*weight[12]+0.022360679774997897*rho[10]*weight[12]-0.010309826235529031*rho[8]*weight[12]+0.01924500897298753*rho[7]*weight[12]+0.021516574145596764*rho[6]*weight[12]-0.021516574145596764*rho[5]*weight[12]+0.004303314829119352*rho[4]*weight[12]-0.012422599874998832*rho[3]*weight[12]-0.012422599874998832*rho[2]*weight[12]+0.037267799624996496*rho[1]*weight[12]+0.021516574145596764*rho[0]*weight[12]-0.011111111111111112*weight[11]*rho[12]+0.022360679774997897*weight[10]*rho[12]-0.010309826235529031*weight[8]*rho[12]+0.01924500897298753*weight[7]*rho[12]+0.021516574145596764*weight[6]*rho[12]-0.021516574145596764*weight[5]*rho[12]+0.004303314829119352*weight[4]*rho[12]-0.012422599874998832*weight[3]*rho[12]-0.012422599874998832*weight[2]*rho[12]+0.037267799624996496*weight[1]*rho[12]+0.021516574145596764*weight[0]*rho[12]-0.06785714285714287*rho[11]*weight[11]-0.022360679774997897*rho[10]*weight[11]-0.01924500897298753*rho[8]*weight[11]+0.010309826235529031*rho[7]*weight[11]-0.021516574145596764*rho[6]*weight[11]+0.021516574145596764*rho[5]*weight[11]-0.004303314829119352*rho[4]*weight[11]+0.012422599874998832*rho[3]*weight[11]+0.037267799624996496*rho[2]*weight[11]-0.012422599874998832*rho[1]*weight[11]-0.021516574145596764*rho[0]*weight[11]-0.022360679774997897*weight[10]*rho[11]-0.01924500897298753*weight[8]*rho[11]+0.010309826235529031*weight[7]*rho[11]-0.021516574145596764*weight[6]*rho[11]+0.021516574145596764*weight[5]*rho[11]-0.004303314829119352*weight[4]*rho[11]+0.012422599874998832*weight[3]*rho[11]+0.037267799624996496*weight[2]*rho[11]-0.012422599874998832*weight[1]*rho[11]-0.021516574145596764*weight[0]*rho[11]-0.025*rho[10]*weight[10]+0.02151657414559676*rho[9]*weight[10]+0.02151657414559676*rho[8]*weight[10]+0.02151657414559676*rho[7]*weight[10]+0.014433756729740645*rho[6]*weight[10]-0.014433756729740645*rho[5]*weight[10]-0.014433756729740645*rho[4]*weight[10]-0.025*rho[3]*weight[10]-0.025*rho[2]*weight[10]+0.025*rho[1]*weight[10]+0.024056261216234404*rho[0]*weight[10]+0.02151657414559676*weight[9]*rho[10]+0.02151657414559676*weight[8]*rho[10]+0.02151657414559676*weight[7]*rho[10]+0.014433756729740645*weight[6]*rho[10]-0.014433756729740645*weight[5]*rho[10]-0.014433756729740645*weight[4]*rho[10]-0.025*weight[3]*rho[10]-0.025*weight[2]*rho[10]+0.025*weight[1]*rho[10]+0.024056261216234404*weight[0]*rho[10]-0.10119047619047619*rho[9]*weight[9]+0.012422599874998833*rho[6]*weight[9]-0.012422599874998833*rho[5]*weight[9]-0.012422599874998833*rho[4]*weight[9]+0.02151657414559676*rho[3]*weight[9]-0.02151657414559676*rho[2]*weight[9]+0.02151657414559676*rho[1]*weight[9]+0.0372677996249965*rho[0]*weight[9]+0.012422599874998833*weight[6]*rho[9]-0.012422599874998833*weight[5]*rho[9]-0.012422599874998833*weight[4]*rho[9]+0.02151657414559676*weight[3]*rho[9]-0.02151657414559676*weight[2]*rho[9]+0.02151657414559676*weight[1]*rho[9]+0.0372677996249965*weight[0]*rho[9]-0.10119047619047619*rho[8]*weight[8]+0.012422599874998833*rho[6]*weight[8]-0.012422599874998833*rho[5]*weight[8]-0.012422599874998833*rho[4]*weight[8]-0.02151657414559676*rho[3]*weight[8]+0.02151657414559676*rho[2]*weight[8]+0.02151657414559676*rho[1]*weight[8]+0.0372677996249965*rho[0]*weight[8]+0.012422599874998833*weight[6]*rho[8]-0.012422599874998833*weight[5]*rho[8]-0.012422599874998833*weight[4]*rho[8]-0.02151657414559676*weight[3]*rho[8]+0.02151657414559676*weight[2]*rho[8]+0.02151657414559676*weight[1]*rho[8]+0.0372677996249965*weight[0]*rho[8]-0.10119047619047619*rho[7]*weight[7]+0.012422599874998833*rho[6]*weight[7]-0.012422599874998833*rho[5]*weight[7]-0.012422599874998833*rho[4]*weight[7]-0.02151657414559676*rho[3]*weight[7]-0.02151657414559676*rho[2]*weight[7]-0.02151657414559676*rho[1]*weight[7]+0.0372677996249965*rho[0]*weight[7]+0.012422599874998833*weight[6]*rho[7]-0.012422599874998833*weight[5]*rho[7]-0.012422599874998833*weight[4]*rho[7]-0.02151657414559676*weight[3]*rho[7]-0.02151657414559676*weight[2]*rho[7]-0.02151657414559676*weight[1]*rho[7]+0.0372677996249965*weight[0]*rho[7]-0.058333333333333334*rho[6]*weight[6]-0.025*rho[5]*weight[6]-0.025*rho[4]*weight[6]+0.004811252243246881*rho[3]*weight[6]+0.004811252243246881*rho[2]*weight[6]+0.024056261216234404*rho[1]*weight[6]+0.01388888888888889*rho[0]*weight[6]-0.025*weight[5]*rho[6]-0.025*weight[4]*rho[6]+0.004811252243246881*weight[3]*rho[6]+0.004811252243246881*weight[2]*rho[6]+0.024056261216234404*weight[1]*rho[6]+0.01388888888888889*weight[0]*rho[6]-0.058333333333333334*rho[5]*weight[5]+0.025*rho[4]*weight[5]-0.004811252243246881*rho[3]*weight[5]+0.024056261216234404*rho[2]*weight[5]+0.004811252243246881*rho[1]*weight[5]-0.01388888888888889*rho[0]*weight[5]+0.025*weight[4]*rho[5]-0.004811252243246881*weight[3]*rho[5]+0.024056261216234404*weight[2]*rho[5]+0.004811252243246881*weight[1]*rho[5]-0.01388888888888889*weight[0]*rho[5]-0.058333333333333334*rho[4]*weight[4]+0.024056261216234404*rho[3]*weight[4]-0.004811252243246881*rho[2]*weight[4]+0.004811252243246881*rho[1]*weight[4]-0.01388888888888889*rho[0]*weight[4]+0.024056261216234404*weight[3]*rho[4]-0.004811252243246881*weight[2]*rho[4]+0.004811252243246881*weight[1]*rho[4]-0.01388888888888889*weight[0]*rho[4]-0.09166666666666667*rho[3]*weight[3]+0.01388888888888889*rho[2]*weight[3]-0.01388888888888889*rho[1]*weight[3]+0.024056261216234404*rho[0]*weight[3]+0.01388888888888889*weight[2]*rho[3]-0.01388888888888889*weight[1]*rho[3]+0.024056261216234404*weight[0]*rho[3]-0.09166666666666667*rho[2]*weight[2]-0.01388888888888889*rho[1]*weight[2]+0.024056261216234404*rho[0]*weight[2]-0.01388888888888889*weight[1]*rho[2]+0.024056261216234404*weight[0]*rho[2]-0.09166666666666667*rho[1]*weight[1]-0.024056261216234404*rho[0]*weight[1]-0.024056261216234404*weight[0]*rho[1]-0.125*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[2]] = -(2.3717082451262845*phiBC[19])+2.3717082451262845*phiBC[18]-2.3717082451262845*phiBC[17]-1.3693063937629155*phiBC[16]+1.3693063937629155*phiBC[15]+1.3693063937629155*phiBC[14]+1.3693063937629155*phiBC[13]+1.3693063937629155*phiBC[12]-1.3693063937629155*phiBC[11]-1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]-1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; #endif #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[3]],0.1*rho[19]*weight[19]+0.02666666666666667*rho[17]*weight[19]-0.05773502691896258*rho[16]*weight[19]-0.051639777949432225*rho[10]*weight[19]+0.029814239699997195*rho[6]*weight[19]+0.02666666666666667*weight[17]*rho[19]-0.05773502691896258*weight[16]*rho[19]-0.051639777949432225*weight[10]*rho[19]+0.029814239699997195*weight[6]*rho[19]+0.11904761904761905*rho[18]*weight[18]+0.03849001794597506*rho[15]*weight[18]-0.06873217490352689*rho[14]*weight[18]+0.03849001794597506*rho[13]*weight[18]-0.06873217490352689*rho[12]*weight[18]-0.022222222222222223*rho[9]*weight[18]+0.03968253968253969*rho[8]*weight[18]-0.022222222222222223*rho[7]*weight[18]-0.074535599249993*rho[5]*weight[18]+0.04303314829119352*rho[3]*weight[18]+0.04303314829119352*rho[1]*weight[18]-0.024845199749997667*rho[0]*weight[18]+0.03849001794597506*weight[15]*rho[18]-0.06873217490352689*weight[14]*rho[18]+0.03849001794597506*weight[13]*rho[18]-0.06873217490352689*weight[12]*rho[18]-0.022222222222222223*weight[9]*rho[18]+0.03968253968253969*weight[8]*rho[18]-0.022222222222222223*weight[7]*rho[18]-0.074535599249993*weight[5]*rho[18]+0.04303314829119352*weight[3]*rho[18]+0.04303314829119352*weight[1]*rho[18]-0.024845199749997667*weight[0]*rho[18]+0.1*rho[17]*weight[17]-0.05773502691896258*rho[11]*weight[17]-0.051639777949432225*rho[10]*weight[17]+0.029814239699997195*rho[4]*weight[17]-0.05773502691896258*weight[11]*rho[17]-0.051639777949432225*weight[10]*rho[17]+0.029814239699997195*weight[4]*rho[17]+0.1*rho[16]*weight[16]+0.029814239699997195*rho[10]*weight[16]-0.05163977794943223*rho[6]*weight[16]+0.029814239699997195*weight[10]*rho[16]-0.05163977794943223*weight[6]*rho[16]+0.16666666666666669*rho[15]*weight[15]-0.022222222222222223*rho[14]*weight[15]+0.044444444444444446*rho[13]*weight[15]-0.09622504486493764*rho[9]*weight[15]-0.08606629658238706*rho[5]*weight[15]+0.049690399499995326*rho[3]*weight[15]-0.022222222222222223*weight[14]*rho[15]+0.044444444444444446*weight[13]*rho[15]-0.09622504486493764*weight[9]*rho[15]-0.08606629658238706*weight[5]*rho[15]+0.049690399499995326*weight[3]*rho[15]+0.11904761904761905*rho[14]*weight[14]+0.03968253968253969*rho[12]*weight[14]+0.03849001794597506*rho[9]*weight[14]-0.06873217490352689*rho[8]*weight[14]+0.04303314829119353*rho[5]*weight[14]-0.07453559924999299*rho[3]*weight[14]-0.024845199749997663*rho[1]*weight[14]+0.04303314829119353*rho[0]*weight[14]+0.03968253968253969*weight[12]*rho[14]+0.03849001794597506*weight[9]*rho[14]-0.06873217490352689*weight[8]*rho[14]+0.04303314829119353*weight[5]*rho[14]-0.07453559924999299*weight[3]*rho[14]-0.024845199749997663*weight[1]*rho[14]+0.04303314829119353*weight[0]*rho[14]+0.16666666666666669*rho[13]*weight[13]-0.022222222222222223*rho[12]*weight[13]-0.09622504486493764*rho[7]*weight[13]-0.08606629658238706*rho[5]*weight[13]+0.049690399499995326*rho[1]*weight[13]-0.022222222222222223*weight[12]*rho[13]-0.09622504486493764*weight[7]*rho[13]-0.08606629658238706*weight[5]*rho[13]+0.049690399499995326*weight[1]*rho[13]+0.11904761904761905*rho[12]*weight[12]-0.06873217490352689*rho[8]*weight[12]+0.03849001794597506*rho[7]*weight[12]+0.04303314829119353*rho[5]*weight[12]-0.024845199749997663*rho[3]*weight[12]-0.07453559924999299*rho[1]*weight[12]+0.04303314829119353*rho[0]*weight[12]-0.06873217490352689*weight[8]*rho[12]+0.03849001794597506*weight[7]*rho[12]+0.04303314829119353*weight[5]*rho[12]-0.024845199749997663*weight[3]*rho[12]-0.07453559924999299*weight[1]*rho[12]+0.04303314829119353*weight[0]*rho[12]+0.1*rho[11]*weight[11]+0.029814239699997195*rho[10]*weight[11]-0.05163977794943223*rho[4]*weight[11]+0.029814239699997195*weight[10]*rho[11]-0.05163977794943223*weight[4]*rho[11]+0.1*rho[10]*weight[10]-0.05773502691896258*rho[6]*weight[10]-0.05773502691896258*rho[4]*weight[10]+0.03333333333333333*rho[2]*weight[10]-0.05773502691896258*weight[6]*rho[10]-0.05773502691896258*weight[4]*rho[10]+0.03333333333333333*weight[2]*rho[10]+0.16666666666666669*rho[9]*weight[9]+0.04969039949999533*rho[5]*weight[9]-0.08606629658238704*rho[3]*weight[9]+0.04969039949999533*weight[5]*rho[9]-0.08606629658238704*weight[3]*rho[9]+0.11904761904761905*rho[8]*weight[8]-0.024845199749997667*rho[5]*weight[8]+0.04303314829119352*rho[3]*weight[8]+0.04303314829119352*rho[1]*weight[8]-0.074535599249993*rho[0]*weight[8]-0.024845199749997667*weight[5]*rho[8]+0.04303314829119352*weight[3]*rho[8]+0.04303314829119352*weight[1]*rho[8]-0.074535599249993*weight[0]*rho[8]+0.16666666666666669*rho[7]*weight[7]+0.04969039949999533*rho[5]*weight[7]-0.08606629658238704*rho[1]*weight[7]+0.04969039949999533*weight[5]*rho[7]-0.08606629658238704*weight[1]*rho[7]+0.1*rho[6]*weight[6]+0.03333333333333333*rho[4]*weight[6]-0.05773502691896258*rho[2]*weight[6]+0.03333333333333333*weight[4]*rho[6]-0.05773502691896258*weight[2]*rho[6]+0.16666666666666669*rho[5]*weight[5]-0.09622504486493762*rho[3]*weight[5]-0.09622504486493762*rho[1]*weight[5]+0.05555555555555556*rho[0]*weight[5]-0.09622504486493762*weight[3]*rho[5]-0.09622504486493762*weight[1]*rho[5]+0.05555555555555556*weight[0]*rho[5]+0.1*rho[4]*weight[4]-0.05773502691896258*rho[2]*weight[4]-0.05773502691896258*weight[2]*rho[4]+0.16666666666666669*rho[3]*weight[3]+0.05555555555555556*rho[1]*weight[3]-0.09622504486493762*rho[0]*weight[3]+0.05555555555555556*weight[1]*rho[3]-0.09622504486493762*weight[0]*rho[3]+0.1*rho[2]*weight[2]+0.16666666666666669*rho[1]*weight[1]-0.09622504486493762*rho[0]*weight[1]-0.09622504486493762*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]); + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[3]],__double_as_longlong(1.1858541225631423*phiBC[18]-1.3693063937629155*phiBC[15]-0.6846531968814578*phiBC[14]+1.3693063937629155*phiBC[13]+0.6846531968814578*phiBC[12]+0.7905694150420949*phiBC[9]-0.39528470752104744*phiBC[8]+0.7905694150420949*phiBC[7]-1.0606601717798214*phiBC[5]+0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); #else - bsrc[nodeOff+globalIdxs[3]] += 0.1*rho[19]*weight[19]+0.02666666666666667*rho[17]*weight[19]-0.05773502691896258*rho[16]*weight[19]-0.051639777949432225*rho[10]*weight[19]+0.029814239699997195*rho[6]*weight[19]+0.02666666666666667*weight[17]*rho[19]-0.05773502691896258*weight[16]*rho[19]-0.051639777949432225*weight[10]*rho[19]+0.029814239699997195*weight[6]*rho[19]+0.11904761904761905*rho[18]*weight[18]+0.03849001794597506*rho[15]*weight[18]-0.06873217490352689*rho[14]*weight[18]+0.03849001794597506*rho[13]*weight[18]-0.06873217490352689*rho[12]*weight[18]-0.022222222222222223*rho[9]*weight[18]+0.03968253968253969*rho[8]*weight[18]-0.022222222222222223*rho[7]*weight[18]-0.074535599249993*rho[5]*weight[18]+0.04303314829119352*rho[3]*weight[18]+0.04303314829119352*rho[1]*weight[18]-0.024845199749997667*rho[0]*weight[18]+0.03849001794597506*weight[15]*rho[18]-0.06873217490352689*weight[14]*rho[18]+0.03849001794597506*weight[13]*rho[18]-0.06873217490352689*weight[12]*rho[18]-0.022222222222222223*weight[9]*rho[18]+0.03968253968253969*weight[8]*rho[18]-0.022222222222222223*weight[7]*rho[18]-0.074535599249993*weight[5]*rho[18]+0.04303314829119352*weight[3]*rho[18]+0.04303314829119352*weight[1]*rho[18]-0.024845199749997667*weight[0]*rho[18]+0.1*rho[17]*weight[17]-0.05773502691896258*rho[11]*weight[17]-0.051639777949432225*rho[10]*weight[17]+0.029814239699997195*rho[4]*weight[17]-0.05773502691896258*weight[11]*rho[17]-0.051639777949432225*weight[10]*rho[17]+0.029814239699997195*weight[4]*rho[17]+0.1*rho[16]*weight[16]+0.029814239699997195*rho[10]*weight[16]-0.05163977794943223*rho[6]*weight[16]+0.029814239699997195*weight[10]*rho[16]-0.05163977794943223*weight[6]*rho[16]+0.16666666666666669*rho[15]*weight[15]-0.022222222222222223*rho[14]*weight[15]+0.044444444444444446*rho[13]*weight[15]-0.09622504486493764*rho[9]*weight[15]-0.08606629658238706*rho[5]*weight[15]+0.049690399499995326*rho[3]*weight[15]-0.022222222222222223*weight[14]*rho[15]+0.044444444444444446*weight[13]*rho[15]-0.09622504486493764*weight[9]*rho[15]-0.08606629658238706*weight[5]*rho[15]+0.049690399499995326*weight[3]*rho[15]+0.11904761904761905*rho[14]*weight[14]+0.03968253968253969*rho[12]*weight[14]+0.03849001794597506*rho[9]*weight[14]-0.06873217490352689*rho[8]*weight[14]+0.04303314829119353*rho[5]*weight[14]-0.07453559924999299*rho[3]*weight[14]-0.024845199749997663*rho[1]*weight[14]+0.04303314829119353*rho[0]*weight[14]+0.03968253968253969*weight[12]*rho[14]+0.03849001794597506*weight[9]*rho[14]-0.06873217490352689*weight[8]*rho[14]+0.04303314829119353*weight[5]*rho[14]-0.07453559924999299*weight[3]*rho[14]-0.024845199749997663*weight[1]*rho[14]+0.04303314829119353*weight[0]*rho[14]+0.16666666666666669*rho[13]*weight[13]-0.022222222222222223*rho[12]*weight[13]-0.09622504486493764*rho[7]*weight[13]-0.08606629658238706*rho[5]*weight[13]+0.049690399499995326*rho[1]*weight[13]-0.022222222222222223*weight[12]*rho[13]-0.09622504486493764*weight[7]*rho[13]-0.08606629658238706*weight[5]*rho[13]+0.049690399499995326*weight[1]*rho[13]+0.11904761904761905*rho[12]*weight[12]-0.06873217490352689*rho[8]*weight[12]+0.03849001794597506*rho[7]*weight[12]+0.04303314829119353*rho[5]*weight[12]-0.024845199749997663*rho[3]*weight[12]-0.07453559924999299*rho[1]*weight[12]+0.04303314829119353*rho[0]*weight[12]-0.06873217490352689*weight[8]*rho[12]+0.03849001794597506*weight[7]*rho[12]+0.04303314829119353*weight[5]*rho[12]-0.024845199749997663*weight[3]*rho[12]-0.07453559924999299*weight[1]*rho[12]+0.04303314829119353*weight[0]*rho[12]+0.1*rho[11]*weight[11]+0.029814239699997195*rho[10]*weight[11]-0.05163977794943223*rho[4]*weight[11]+0.029814239699997195*weight[10]*rho[11]-0.05163977794943223*weight[4]*rho[11]+0.1*rho[10]*weight[10]-0.05773502691896258*rho[6]*weight[10]-0.05773502691896258*rho[4]*weight[10]+0.03333333333333333*rho[2]*weight[10]-0.05773502691896258*weight[6]*rho[10]-0.05773502691896258*weight[4]*rho[10]+0.03333333333333333*weight[2]*rho[10]+0.16666666666666669*rho[9]*weight[9]+0.04969039949999533*rho[5]*weight[9]-0.08606629658238704*rho[3]*weight[9]+0.04969039949999533*weight[5]*rho[9]-0.08606629658238704*weight[3]*rho[9]+0.11904761904761905*rho[8]*weight[8]-0.024845199749997667*rho[5]*weight[8]+0.04303314829119352*rho[3]*weight[8]+0.04303314829119352*rho[1]*weight[8]-0.074535599249993*rho[0]*weight[8]-0.024845199749997667*weight[5]*rho[8]+0.04303314829119352*weight[3]*rho[8]+0.04303314829119352*weight[1]*rho[8]-0.074535599249993*weight[0]*rho[8]+0.16666666666666669*rho[7]*weight[7]+0.04969039949999533*rho[5]*weight[7]-0.08606629658238704*rho[1]*weight[7]+0.04969039949999533*weight[5]*rho[7]-0.08606629658238704*weight[1]*rho[7]+0.1*rho[6]*weight[6]+0.03333333333333333*rho[4]*weight[6]-0.05773502691896258*rho[2]*weight[6]+0.03333333333333333*weight[4]*rho[6]-0.05773502691896258*weight[2]*rho[6]+0.16666666666666669*rho[5]*weight[5]-0.09622504486493762*rho[3]*weight[5]-0.09622504486493762*rho[1]*weight[5]+0.05555555555555556*rho[0]*weight[5]-0.09622504486493762*weight[3]*rho[5]-0.09622504486493762*weight[1]*rho[5]+0.05555555555555556*weight[0]*rho[5]+0.1*rho[4]*weight[4]-0.05773502691896258*rho[2]*weight[4]-0.05773502691896258*weight[2]*rho[4]+0.16666666666666669*rho[3]*weight[3]+0.05555555555555556*rho[1]*weight[3]-0.09622504486493762*rho[0]*weight[3]+0.05555555555555556*weight[1]*rho[3]-0.09622504486493762*weight[0]*rho[3]+0.1*rho[2]*weight[2]+0.16666666666666669*rho[1]*weight[1]-0.09622504486493762*rho[0]*weight[1]-0.09622504486493762*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[3]] = 1.1858541225631423*phiBC[18]-1.3693063937629155*phiBC[15]-0.6846531968814578*phiBC[14]+1.3693063937629155*phiBC[13]+0.6846531968814578*phiBC[12]+0.7905694150420949*phiBC[9]-0.39528470752104744*phiBC[8]+0.7905694150420949*phiBC[7]-1.0606601717798214*phiBC[5]+0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; #endif #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[4]],0.1*rho[19]*weight[19]-0.02666666666666667*rho[17]*weight[19]+0.05773502691896258*rho[16]*weight[19]-0.051639777949432225*rho[10]*weight[19]-0.029814239699997195*rho[6]*weight[19]-0.02666666666666667*weight[17]*rho[19]+0.05773502691896258*weight[16]*rho[19]-0.051639777949432225*weight[10]*rho[19]-0.029814239699997195*weight[6]*rho[19]+0.11904761904761905*rho[18]*weight[18]+0.03849001794597506*rho[15]*weight[18]+0.06873217490352689*rho[14]*weight[18]-0.03849001794597506*rho[13]*weight[18]-0.06873217490352689*rho[12]*weight[18]+0.022222222222222223*rho[9]*weight[18]-0.03968253968253969*rho[8]*weight[18]+0.022222222222222223*rho[7]*weight[18]-0.074535599249993*rho[5]*weight[18]-0.04303314829119352*rho[3]*weight[18]+0.04303314829119352*rho[1]*weight[18]+0.024845199749997667*rho[0]*weight[18]+0.03849001794597506*weight[15]*rho[18]+0.06873217490352689*weight[14]*rho[18]-0.03849001794597506*weight[13]*rho[18]-0.06873217490352689*weight[12]*rho[18]+0.022222222222222223*weight[9]*rho[18]-0.03968253968253969*weight[8]*rho[18]+0.022222222222222223*weight[7]*rho[18]-0.074535599249993*weight[5]*rho[18]-0.04303314829119352*weight[3]*rho[18]+0.04303314829119352*weight[1]*rho[18]+0.024845199749997667*weight[0]*rho[18]+0.1*rho[17]*weight[17]-0.05773502691896258*rho[11]*weight[17]+0.051639777949432225*rho[10]*weight[17]-0.029814239699997195*rho[4]*weight[17]-0.05773502691896258*weight[11]*rho[17]+0.051639777949432225*weight[10]*rho[17]-0.029814239699997195*weight[4]*rho[17]+0.1*rho[16]*weight[16]-0.029814239699997195*rho[10]*weight[16]-0.05163977794943223*rho[6]*weight[16]-0.029814239699997195*weight[10]*rho[16]-0.05163977794943223*weight[6]*rho[16]+0.16666666666666669*rho[15]*weight[15]+0.022222222222222223*rho[14]*weight[15]-0.044444444444444446*rho[13]*weight[15]+0.09622504486493764*rho[9]*weight[15]-0.08606629658238706*rho[5]*weight[15]-0.049690399499995326*rho[3]*weight[15]+0.022222222222222223*weight[14]*rho[15]-0.044444444444444446*weight[13]*rho[15]+0.09622504486493764*weight[9]*rho[15]-0.08606629658238706*weight[5]*rho[15]-0.049690399499995326*weight[3]*rho[15]+0.11904761904761905*rho[14]*weight[14]-0.03968253968253969*rho[12]*weight[14]+0.03849001794597506*rho[9]*weight[14]-0.06873217490352689*rho[8]*weight[14]-0.04303314829119353*rho[5]*weight[14]-0.07453559924999299*rho[3]*weight[14]+0.024845199749997663*rho[1]*weight[14]+0.04303314829119353*rho[0]*weight[14]-0.03968253968253969*weight[12]*rho[14]+0.03849001794597506*weight[9]*rho[14]-0.06873217490352689*weight[8]*rho[14]-0.04303314829119353*weight[5]*rho[14]-0.07453559924999299*weight[3]*rho[14]+0.024845199749997663*weight[1]*rho[14]+0.04303314829119353*weight[0]*rho[14]+0.16666666666666669*rho[13]*weight[13]+0.022222222222222223*rho[12]*weight[13]-0.09622504486493764*rho[7]*weight[13]+0.08606629658238706*rho[5]*weight[13]-0.049690399499995326*rho[1]*weight[13]+0.022222222222222223*weight[12]*rho[13]-0.09622504486493764*weight[7]*rho[13]+0.08606629658238706*weight[5]*rho[13]-0.049690399499995326*weight[1]*rho[13]+0.11904761904761905*rho[12]*weight[12]+0.06873217490352689*rho[8]*weight[12]-0.03849001794597506*rho[7]*weight[12]+0.04303314829119353*rho[5]*weight[12]+0.024845199749997663*rho[3]*weight[12]-0.07453559924999299*rho[1]*weight[12]-0.04303314829119353*rho[0]*weight[12]+0.06873217490352689*weight[8]*rho[12]-0.03849001794597506*weight[7]*rho[12]+0.04303314829119353*weight[5]*rho[12]+0.024845199749997663*weight[3]*rho[12]-0.07453559924999299*weight[1]*rho[12]-0.04303314829119353*weight[0]*rho[12]+0.1*rho[11]*weight[11]-0.029814239699997195*rho[10]*weight[11]+0.05163977794943223*rho[4]*weight[11]-0.029814239699997195*weight[10]*rho[11]+0.05163977794943223*weight[4]*rho[11]+0.1*rho[10]*weight[10]+0.05773502691896258*rho[6]*weight[10]-0.05773502691896258*rho[4]*weight[10]-0.03333333333333333*rho[2]*weight[10]+0.05773502691896258*weight[6]*rho[10]-0.05773502691896258*weight[4]*rho[10]-0.03333333333333333*weight[2]*rho[10]+0.16666666666666669*rho[9]*weight[9]-0.04969039949999533*rho[5]*weight[9]-0.08606629658238704*rho[3]*weight[9]-0.04969039949999533*weight[5]*rho[9]-0.08606629658238704*weight[3]*rho[9]+0.11904761904761905*rho[8]*weight[8]+0.024845199749997667*rho[5]*weight[8]+0.04303314829119352*rho[3]*weight[8]-0.04303314829119352*rho[1]*weight[8]-0.074535599249993*rho[0]*weight[8]+0.024845199749997667*weight[5]*rho[8]+0.04303314829119352*weight[3]*rho[8]-0.04303314829119352*weight[1]*rho[8]-0.074535599249993*weight[0]*rho[8]+0.16666666666666669*rho[7]*weight[7]-0.04969039949999533*rho[5]*weight[7]+0.08606629658238704*rho[1]*weight[7]-0.04969039949999533*weight[5]*rho[7]+0.08606629658238704*weight[1]*rho[7]+0.1*rho[6]*weight[6]-0.03333333333333333*rho[4]*weight[6]-0.05773502691896258*rho[2]*weight[6]-0.03333333333333333*weight[4]*rho[6]-0.05773502691896258*weight[2]*rho[6]+0.16666666666666669*rho[5]*weight[5]+0.09622504486493762*rho[3]*weight[5]-0.09622504486493762*rho[1]*weight[5]-0.05555555555555556*rho[0]*weight[5]+0.09622504486493762*weight[3]*rho[5]-0.09622504486493762*weight[1]*rho[5]-0.05555555555555556*weight[0]*rho[5]+0.1*rho[4]*weight[4]+0.05773502691896258*rho[2]*weight[4]+0.05773502691896258*weight[2]*rho[4]+0.16666666666666669*rho[3]*weight[3]-0.05555555555555556*rho[1]*weight[3]-0.09622504486493762*rho[0]*weight[3]-0.05555555555555556*weight[1]*rho[3]-0.09622504486493762*weight[0]*rho[3]+0.1*rho[2]*weight[2]+0.16666666666666669*rho[1]*weight[1]+0.09622504486493762*rho[0]*weight[1]+0.09622504486493762*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]); + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[4]],__double_as_longlong(-(1.1858541225631423*phiBC[18])+1.3693063937629155*phiBC[15]-0.6846531968814578*phiBC[14]+1.3693063937629155*phiBC[13]-0.6846531968814578*phiBC[12]+0.7905694150420949*phiBC[9]-0.39528470752104744*phiBC[8]+0.7905694150420949*phiBC[7]+1.0606601717798214*phiBC[5]+0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); #else - bsrc[nodeOff+globalIdxs[4]] += 0.1*rho[19]*weight[19]-0.02666666666666667*rho[17]*weight[19]+0.05773502691896258*rho[16]*weight[19]-0.051639777949432225*rho[10]*weight[19]-0.029814239699997195*rho[6]*weight[19]-0.02666666666666667*weight[17]*rho[19]+0.05773502691896258*weight[16]*rho[19]-0.051639777949432225*weight[10]*rho[19]-0.029814239699997195*weight[6]*rho[19]+0.11904761904761905*rho[18]*weight[18]+0.03849001794597506*rho[15]*weight[18]+0.06873217490352689*rho[14]*weight[18]-0.03849001794597506*rho[13]*weight[18]-0.06873217490352689*rho[12]*weight[18]+0.022222222222222223*rho[9]*weight[18]-0.03968253968253969*rho[8]*weight[18]+0.022222222222222223*rho[7]*weight[18]-0.074535599249993*rho[5]*weight[18]-0.04303314829119352*rho[3]*weight[18]+0.04303314829119352*rho[1]*weight[18]+0.024845199749997667*rho[0]*weight[18]+0.03849001794597506*weight[15]*rho[18]+0.06873217490352689*weight[14]*rho[18]-0.03849001794597506*weight[13]*rho[18]-0.06873217490352689*weight[12]*rho[18]+0.022222222222222223*weight[9]*rho[18]-0.03968253968253969*weight[8]*rho[18]+0.022222222222222223*weight[7]*rho[18]-0.074535599249993*weight[5]*rho[18]-0.04303314829119352*weight[3]*rho[18]+0.04303314829119352*weight[1]*rho[18]+0.024845199749997667*weight[0]*rho[18]+0.1*rho[17]*weight[17]-0.05773502691896258*rho[11]*weight[17]+0.051639777949432225*rho[10]*weight[17]-0.029814239699997195*rho[4]*weight[17]-0.05773502691896258*weight[11]*rho[17]+0.051639777949432225*weight[10]*rho[17]-0.029814239699997195*weight[4]*rho[17]+0.1*rho[16]*weight[16]-0.029814239699997195*rho[10]*weight[16]-0.05163977794943223*rho[6]*weight[16]-0.029814239699997195*weight[10]*rho[16]-0.05163977794943223*weight[6]*rho[16]+0.16666666666666669*rho[15]*weight[15]+0.022222222222222223*rho[14]*weight[15]-0.044444444444444446*rho[13]*weight[15]+0.09622504486493764*rho[9]*weight[15]-0.08606629658238706*rho[5]*weight[15]-0.049690399499995326*rho[3]*weight[15]+0.022222222222222223*weight[14]*rho[15]-0.044444444444444446*weight[13]*rho[15]+0.09622504486493764*weight[9]*rho[15]-0.08606629658238706*weight[5]*rho[15]-0.049690399499995326*weight[3]*rho[15]+0.11904761904761905*rho[14]*weight[14]-0.03968253968253969*rho[12]*weight[14]+0.03849001794597506*rho[9]*weight[14]-0.06873217490352689*rho[8]*weight[14]-0.04303314829119353*rho[5]*weight[14]-0.07453559924999299*rho[3]*weight[14]+0.024845199749997663*rho[1]*weight[14]+0.04303314829119353*rho[0]*weight[14]-0.03968253968253969*weight[12]*rho[14]+0.03849001794597506*weight[9]*rho[14]-0.06873217490352689*weight[8]*rho[14]-0.04303314829119353*weight[5]*rho[14]-0.07453559924999299*weight[3]*rho[14]+0.024845199749997663*weight[1]*rho[14]+0.04303314829119353*weight[0]*rho[14]+0.16666666666666669*rho[13]*weight[13]+0.022222222222222223*rho[12]*weight[13]-0.09622504486493764*rho[7]*weight[13]+0.08606629658238706*rho[5]*weight[13]-0.049690399499995326*rho[1]*weight[13]+0.022222222222222223*weight[12]*rho[13]-0.09622504486493764*weight[7]*rho[13]+0.08606629658238706*weight[5]*rho[13]-0.049690399499995326*weight[1]*rho[13]+0.11904761904761905*rho[12]*weight[12]+0.06873217490352689*rho[8]*weight[12]-0.03849001794597506*rho[7]*weight[12]+0.04303314829119353*rho[5]*weight[12]+0.024845199749997663*rho[3]*weight[12]-0.07453559924999299*rho[1]*weight[12]-0.04303314829119353*rho[0]*weight[12]+0.06873217490352689*weight[8]*rho[12]-0.03849001794597506*weight[7]*rho[12]+0.04303314829119353*weight[5]*rho[12]+0.024845199749997663*weight[3]*rho[12]-0.07453559924999299*weight[1]*rho[12]-0.04303314829119353*weight[0]*rho[12]+0.1*rho[11]*weight[11]-0.029814239699997195*rho[10]*weight[11]+0.05163977794943223*rho[4]*weight[11]-0.029814239699997195*weight[10]*rho[11]+0.05163977794943223*weight[4]*rho[11]+0.1*rho[10]*weight[10]+0.05773502691896258*rho[6]*weight[10]-0.05773502691896258*rho[4]*weight[10]-0.03333333333333333*rho[2]*weight[10]+0.05773502691896258*weight[6]*rho[10]-0.05773502691896258*weight[4]*rho[10]-0.03333333333333333*weight[2]*rho[10]+0.16666666666666669*rho[9]*weight[9]-0.04969039949999533*rho[5]*weight[9]-0.08606629658238704*rho[3]*weight[9]-0.04969039949999533*weight[5]*rho[9]-0.08606629658238704*weight[3]*rho[9]+0.11904761904761905*rho[8]*weight[8]+0.024845199749997667*rho[5]*weight[8]+0.04303314829119352*rho[3]*weight[8]-0.04303314829119352*rho[1]*weight[8]-0.074535599249993*rho[0]*weight[8]+0.024845199749997667*weight[5]*rho[8]+0.04303314829119352*weight[3]*rho[8]-0.04303314829119352*weight[1]*rho[8]-0.074535599249993*weight[0]*rho[8]+0.16666666666666669*rho[7]*weight[7]-0.04969039949999533*rho[5]*weight[7]+0.08606629658238704*rho[1]*weight[7]-0.04969039949999533*weight[5]*rho[7]+0.08606629658238704*weight[1]*rho[7]+0.1*rho[6]*weight[6]-0.03333333333333333*rho[4]*weight[6]-0.05773502691896258*rho[2]*weight[6]-0.03333333333333333*weight[4]*rho[6]-0.05773502691896258*weight[2]*rho[6]+0.16666666666666669*rho[5]*weight[5]+0.09622504486493762*rho[3]*weight[5]-0.09622504486493762*rho[1]*weight[5]-0.05555555555555556*rho[0]*weight[5]+0.09622504486493762*weight[3]*rho[5]-0.09622504486493762*weight[1]*rho[5]-0.05555555555555556*weight[0]*rho[5]+0.1*rho[4]*weight[4]+0.05773502691896258*rho[2]*weight[4]+0.05773502691896258*weight[2]*rho[4]+0.16666666666666669*rho[3]*weight[3]-0.05555555555555556*rho[1]*weight[3]-0.09622504486493762*rho[0]*weight[3]-0.05555555555555556*weight[1]*rho[3]-0.09622504486493762*weight[0]*rho[3]+0.1*rho[2]*weight[2]+0.16666666666666669*rho[1]*weight[1]+0.09622504486493762*rho[0]*weight[1]+0.09622504486493762*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[4]] = -(1.1858541225631423*phiBC[18])+1.3693063937629155*phiBC[15]-0.6846531968814578*phiBC[14]+1.3693063937629155*phiBC[13]-0.6846531968814578*phiBC[12]+0.7905694150420949*phiBC[9]-0.39528470752104744*phiBC[8]+0.7905694150420949*phiBC[7]+1.0606601717798214*phiBC[5]+0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; #endif #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[5]],-(0.034523809523809526*rho[19]*weight[19])-0.02*rho[18]*weight[19]+0.02*rho[17]*weight[19]-0.008935182737458497*rho[16]*weight[19]+0.008935182737458497*rho[15]*weight[19]+0.01924500897298753*rho[14]*weight[19]+0.01924500897298753*rho[13]*weight[19]+0.01924500897298753*rho[12]*weight[19]-0.01924500897298753*rho[11]*weight[19]-0.012909944487358056*rho[10]*weight[19]-0.021825396825396828*rho[9]*weight[19]-0.011111111111111112*rho[8]*weight[19]-0.011111111111111112*rho[7]*weight[19]+0.022360679774997897*rho[6]*weight[19]-0.022360679774997897*rho[5]*weight[19]+0.0372677996249965*rho[4]*weight[19]+0.02151657414559676*rho[3]*weight[19]-0.02151657414559676*rho[2]*weight[19]+0.02151657414559676*rho[1]*weight[19]-0.012422599874998833*rho[0]*weight[19]-0.02*weight[18]*rho[19]+0.02*weight[17]*rho[19]-0.008935182737458497*weight[16]*rho[19]+0.008935182737458497*weight[15]*rho[19]+0.01924500897298753*weight[14]*rho[19]+0.01924500897298753*weight[13]*rho[19]+0.01924500897298753*weight[12]*rho[19]-0.01924500897298753*weight[11]*rho[19]-0.012909944487358056*weight[10]*rho[19]-0.021825396825396828*weight[9]*rho[19]-0.011111111111111112*weight[8]*rho[19]-0.011111111111111112*weight[7]*rho[19]+0.022360679774997897*weight[6]*rho[19]-0.022360679774997897*weight[5]*rho[19]+0.0372677996249965*weight[4]*rho[19]+0.02151657414559676*weight[3]*rho[19]-0.02151657414559676*weight[2]*rho[19]+0.02151657414559676*weight[1]*rho[19]-0.012422599874998833*weight[0]*rho[19]-0.034523809523809526*rho[18]*weight[18]-0.02*rho[17]*weight[18]+0.01924500897298753*rho[16]*weight[18]-0.01924500897298753*rho[15]*weight[18]-0.008935182737458497*rho[14]*weight[18]-0.01924500897298753*rho[13]*weight[18]-0.008935182737458497*rho[12]*weight[18]+0.01924500897298753*rho[11]*weight[18]+0.012909944487358056*rho[10]*weight[18]+0.011111111111111112*rho[9]*weight[18]+0.021825396825396828*rho[8]*weight[18]+0.011111111111111112*rho[7]*weight[18]-0.022360679774997897*rho[6]*weight[18]+0.0372677996249965*rho[5]*weight[18]-0.022360679774997897*rho[4]*weight[18]-0.02151657414559676*rho[3]*weight[18]+0.02151657414559676*rho[2]*weight[18]-0.02151657414559676*rho[1]*weight[18]+0.012422599874998833*rho[0]*weight[18]-0.02*weight[17]*rho[18]+0.01924500897298753*weight[16]*rho[18]-0.01924500897298753*weight[15]*rho[18]-0.008935182737458497*weight[14]*rho[18]-0.01924500897298753*weight[13]*rho[18]-0.008935182737458497*weight[12]*rho[18]+0.01924500897298753*weight[11]*rho[18]+0.012909944487358056*weight[10]*rho[18]+0.011111111111111112*weight[9]*rho[18]+0.021825396825396828*weight[8]*rho[18]+0.011111111111111112*weight[7]*rho[18]-0.022360679774997897*weight[6]*rho[18]+0.0372677996249965*weight[5]*rho[18]-0.022360679774997897*weight[4]*rho[18]-0.02151657414559676*weight[3]*rho[18]+0.02151657414559676*weight[2]*rho[18]-0.02151657414559676*weight[1]*rho[18]+0.012422599874998833*weight[0]*rho[18]-0.034523809523809526*rho[17]*weight[17]-0.01924500897298753*rho[16]*weight[17]+0.01924500897298753*rho[15]*weight[17]+0.01924500897298753*rho[14]*weight[17]+0.008935182737458497*rho[13]*weight[17]+0.01924500897298753*rho[12]*weight[17]-0.008935182737458497*rho[11]*weight[17]-0.012909944487358056*rho[10]*weight[17]-0.011111111111111112*rho[9]*weight[17]-0.011111111111111112*rho[8]*weight[17]-0.021825396825396828*rho[7]*weight[17]+0.0372677996249965*rho[6]*weight[17]-0.022360679774997897*rho[5]*weight[17]+0.022360679774997897*rho[4]*weight[17]+0.02151657414559676*rho[3]*weight[17]-0.02151657414559676*rho[2]*weight[17]+0.02151657414559676*rho[1]*weight[17]-0.012422599874998833*rho[0]*weight[17]-0.01924500897298753*weight[16]*rho[17]+0.01924500897298753*weight[15]*rho[17]+0.01924500897298753*weight[14]*rho[17]+0.008935182737458497*weight[13]*rho[17]+0.01924500897298753*weight[12]*rho[17]-0.008935182737458497*weight[11]*rho[17]-0.012909944487358056*weight[10]*rho[17]-0.011111111111111112*weight[9]*rho[17]-0.011111111111111112*weight[8]*rho[17]-0.021825396825396828*weight[7]*rho[17]+0.0372677996249965*weight[6]*rho[17]-0.022360679774997897*weight[5]*rho[17]+0.022360679774997897*weight[4]*rho[17]+0.02151657414559676*weight[3]*rho[17]-0.02151657414559676*weight[2]*rho[17]+0.02151657414559676*weight[1]*rho[17]-0.012422599874998833*weight[0]*rho[17]-0.06785714285714287*rho[16]*weight[16]-0.021825396825396828*rho[15]*weight[16]-0.011111111111111112*rho[14]*weight[16]-0.011111111111111112*rho[13]*weight[16]-0.011111111111111112*rho[12]*weight[16]+0.022360679774997897*rho[10]*weight[16]-0.010309826235529031*rho[9]*weight[16]+0.01924500897298753*rho[8]*weight[16]+0.004303314829119352*rho[6]*weight[16]+0.021516574145596764*rho[5]*weight[16]-0.021516574145596764*rho[4]*weight[16]-0.012422599874998832*rho[3]*weight[16]+0.037267799624996496*rho[2]*weight[16]-0.012422599874998832*rho[1]*weight[16]+0.021516574145596764*rho[0]*weight[16]-0.021825396825396828*weight[15]*rho[16]-0.011111111111111112*weight[14]*rho[16]-0.011111111111111112*weight[13]*rho[16]-0.011111111111111112*weight[12]*rho[16]+0.022360679774997897*weight[10]*rho[16]-0.010309826235529031*weight[9]*rho[16]+0.01924500897298753*weight[8]*rho[16]+0.004303314829119352*weight[6]*rho[16]+0.021516574145596764*weight[5]*rho[16]-0.021516574145596764*weight[4]*rho[16]-0.012422599874998832*weight[3]*rho[16]+0.037267799624996496*weight[2]*rho[16]-0.012422599874998832*weight[1]*rho[16]+0.021516574145596764*weight[0]*rho[16]-0.06785714285714287*rho[15]*weight[15]+0.011111111111111112*rho[14]*weight[15]+0.011111111111111112*rho[13]*weight[15]-0.011111111111111112*rho[11]*weight[15]-0.022360679774997897*rho[10]*weight[15]+0.010309826235529031*rho[9]*weight[15]-0.01924500897298753*rho[7]*weight[15]+0.021516574145596764*rho[6]*weight[15]+0.004303314829119352*rho[5]*weight[15]+0.021516574145596764*rho[4]*weight[15]+0.012422599874998832*rho[3]*weight[15]-0.012422599874998832*rho[2]*weight[15]+0.037267799624996496*rho[1]*weight[15]-0.021516574145596764*rho[0]*weight[15]+0.011111111111111112*weight[14]*rho[15]+0.011111111111111112*weight[13]*rho[15]-0.011111111111111112*weight[11]*rho[15]-0.022360679774997897*weight[10]*rho[15]+0.010309826235529031*weight[9]*rho[15]-0.01924500897298753*weight[7]*rho[15]+0.021516574145596764*weight[6]*rho[15]+0.004303314829119352*weight[5]*rho[15]+0.021516574145596764*weight[4]*rho[15]+0.012422599874998832*weight[3]*rho[15]-0.012422599874998832*weight[2]*rho[15]+0.037267799624996496*weight[1]*rho[15]-0.021516574145596764*weight[0]*rho[15]-0.06785714285714287*rho[14]*weight[14]+0.021825396825396828*rho[12]*weight[14]-0.011111111111111112*rho[11]*weight[14]-0.022360679774997897*rho[10]*weight[14]-0.01924500897298753*rho[9]*weight[14]+0.010309826235529031*rho[8]*weight[14]-0.004303314829119352*rho[6]*weight[14]-0.021516574145596764*rho[5]*weight[14]+0.021516574145596764*rho[4]*weight[14]+0.037267799624996496*rho[3]*weight[14]-0.012422599874998832*rho[2]*weight[14]+0.012422599874998832*rho[1]*weight[14]-0.021516574145596764*rho[0]*weight[14]+0.021825396825396828*weight[12]*rho[14]-0.011111111111111112*weight[11]*rho[14]-0.022360679774997897*weight[10]*rho[14]-0.01924500897298753*weight[9]*rho[14]+0.010309826235529031*weight[8]*rho[14]-0.004303314829119352*weight[6]*rho[14]-0.021516574145596764*weight[5]*rho[14]+0.021516574145596764*weight[4]*rho[14]+0.037267799624996496*weight[3]*rho[14]-0.012422599874998832*weight[2]*rho[14]+0.012422599874998832*weight[1]*rho[14]-0.021516574145596764*weight[0]*rho[14]-0.06785714285714287*rho[13]*weight[13]+0.011111111111111112*rho[12]*weight[13]-0.021825396825396828*rho[11]*weight[13]-0.022360679774997897*rho[10]*weight[13]-0.01924500897298753*rho[9]*weight[13]+0.010309826235529031*rho[7]*weight[13]+0.021516574145596764*rho[6]*weight[13]+0.004303314829119352*rho[5]*weight[13]+0.021516574145596764*rho[4]*weight[13]+0.037267799624996496*rho[3]*weight[13]-0.012422599874998832*rho[2]*weight[13]+0.012422599874998832*rho[1]*weight[13]-0.021516574145596764*rho[0]*weight[13]+0.011111111111111112*weight[12]*rho[13]-0.021825396825396828*weight[11]*rho[13]-0.022360679774997897*weight[10]*rho[13]-0.01924500897298753*weight[9]*rho[13]+0.010309826235529031*weight[7]*rho[13]+0.021516574145596764*weight[6]*rho[13]+0.004303314829119352*weight[5]*rho[13]+0.021516574145596764*weight[4]*rho[13]+0.037267799624996496*weight[3]*rho[13]-0.012422599874998832*weight[2]*rho[13]+0.012422599874998832*weight[1]*rho[13]-0.021516574145596764*weight[0]*rho[13]-0.06785714285714287*rho[12]*weight[12]-0.011111111111111112*rho[11]*weight[12]-0.022360679774997897*rho[10]*weight[12]+0.010309826235529031*rho[8]*weight[12]-0.01924500897298753*rho[7]*weight[12]+0.021516574145596764*rho[6]*weight[12]-0.021516574145596764*rho[5]*weight[12]-0.004303314829119352*rho[4]*weight[12]+0.012422599874998832*rho[3]*weight[12]-0.012422599874998832*rho[2]*weight[12]+0.037267799624996496*rho[1]*weight[12]-0.021516574145596764*rho[0]*weight[12]-0.011111111111111112*weight[11]*rho[12]-0.022360679774997897*weight[10]*rho[12]+0.010309826235529031*weight[8]*rho[12]-0.01924500897298753*weight[7]*rho[12]+0.021516574145596764*weight[6]*rho[12]-0.021516574145596764*weight[5]*rho[12]-0.004303314829119352*weight[4]*rho[12]+0.012422599874998832*weight[3]*rho[12]-0.012422599874998832*weight[2]*rho[12]+0.037267799624996496*weight[1]*rho[12]-0.021516574145596764*weight[0]*rho[12]-0.06785714285714287*rho[11]*weight[11]+0.022360679774997897*rho[10]*weight[11]+0.01924500897298753*rho[8]*weight[11]-0.010309826235529031*rho[7]*weight[11]-0.021516574145596764*rho[6]*weight[11]+0.021516574145596764*rho[5]*weight[11]+0.004303314829119352*rho[4]*weight[11]-0.012422599874998832*rho[3]*weight[11]+0.037267799624996496*rho[2]*weight[11]-0.012422599874998832*rho[1]*weight[11]+0.021516574145596764*rho[0]*weight[11]+0.022360679774997897*weight[10]*rho[11]+0.01924500897298753*weight[8]*rho[11]-0.010309826235529031*weight[7]*rho[11]-0.021516574145596764*weight[6]*rho[11]+0.021516574145596764*weight[5]*rho[11]+0.004303314829119352*weight[4]*rho[11]-0.012422599874998832*weight[3]*rho[11]+0.037267799624996496*weight[2]*rho[11]-0.012422599874998832*weight[1]*rho[11]+0.021516574145596764*weight[0]*rho[11]-0.025*rho[10]*weight[10]+0.02151657414559676*rho[9]*weight[10]+0.02151657414559676*rho[8]*weight[10]+0.02151657414559676*rho[7]*weight[10]-0.014433756729740645*rho[6]*weight[10]+0.014433756729740645*rho[5]*weight[10]-0.014433756729740645*rho[4]*weight[10]-0.025*rho[3]*weight[10]+0.025*rho[2]*weight[10]-0.025*rho[1]*weight[10]+0.024056261216234404*rho[0]*weight[10]+0.02151657414559676*weight[9]*rho[10]+0.02151657414559676*weight[8]*rho[10]+0.02151657414559676*weight[7]*rho[10]-0.014433756729740645*weight[6]*rho[10]+0.014433756729740645*weight[5]*rho[10]-0.014433756729740645*weight[4]*rho[10]-0.025*weight[3]*rho[10]+0.025*weight[2]*rho[10]-0.025*weight[1]*rho[10]+0.024056261216234404*weight[0]*rho[10]-0.10119047619047619*rho[9]*weight[9]-0.012422599874998833*rho[6]*weight[9]+0.012422599874998833*rho[5]*weight[9]-0.012422599874998833*rho[4]*weight[9]+0.02151657414559676*rho[3]*weight[9]+0.02151657414559676*rho[2]*weight[9]-0.02151657414559676*rho[1]*weight[9]+0.0372677996249965*rho[0]*weight[9]-0.012422599874998833*weight[6]*rho[9]+0.012422599874998833*weight[5]*rho[9]-0.012422599874998833*weight[4]*rho[9]+0.02151657414559676*weight[3]*rho[9]+0.02151657414559676*weight[2]*rho[9]-0.02151657414559676*weight[1]*rho[9]+0.0372677996249965*weight[0]*rho[9]-0.10119047619047619*rho[8]*weight[8]-0.012422599874998833*rho[6]*weight[8]+0.012422599874998833*rho[5]*weight[8]-0.012422599874998833*rho[4]*weight[8]-0.02151657414559676*rho[3]*weight[8]-0.02151657414559676*rho[2]*weight[8]-0.02151657414559676*rho[1]*weight[8]+0.0372677996249965*rho[0]*weight[8]-0.012422599874998833*weight[6]*rho[8]+0.012422599874998833*weight[5]*rho[8]-0.012422599874998833*weight[4]*rho[8]-0.02151657414559676*weight[3]*rho[8]-0.02151657414559676*weight[2]*rho[8]-0.02151657414559676*weight[1]*rho[8]+0.0372677996249965*weight[0]*rho[8]-0.10119047619047619*rho[7]*weight[7]-0.012422599874998833*rho[6]*weight[7]+0.012422599874998833*rho[5]*weight[7]-0.012422599874998833*rho[4]*weight[7]-0.02151657414559676*rho[3]*weight[7]+0.02151657414559676*rho[2]*weight[7]+0.02151657414559676*rho[1]*weight[7]+0.0372677996249965*rho[0]*weight[7]-0.012422599874998833*weight[6]*rho[7]+0.012422599874998833*weight[5]*rho[7]-0.012422599874998833*weight[4]*rho[7]-0.02151657414559676*weight[3]*rho[7]+0.02151657414559676*weight[2]*rho[7]+0.02151657414559676*weight[1]*rho[7]+0.0372677996249965*weight[0]*rho[7]-0.058333333333333334*rho[6]*weight[6]-0.025*rho[5]*weight[6]+0.025*rho[4]*weight[6]-0.004811252243246881*rho[3]*weight[6]+0.004811252243246881*rho[2]*weight[6]+0.024056261216234404*rho[1]*weight[6]-0.01388888888888889*rho[0]*weight[6]-0.025*weight[5]*rho[6]+0.025*weight[4]*rho[6]-0.004811252243246881*weight[3]*rho[6]+0.004811252243246881*weight[2]*rho[6]+0.024056261216234404*weight[1]*rho[6]-0.01388888888888889*weight[0]*rho[6]-0.058333333333333334*rho[5]*weight[5]-0.025*rho[4]*weight[5]+0.004811252243246881*rho[3]*weight[5]+0.024056261216234404*rho[2]*weight[5]+0.004811252243246881*rho[1]*weight[5]+0.01388888888888889*rho[0]*weight[5]-0.025*weight[4]*rho[5]+0.004811252243246881*weight[3]*rho[5]+0.024056261216234404*weight[2]*rho[5]+0.004811252243246881*weight[1]*rho[5]+0.01388888888888889*weight[0]*rho[5]-0.058333333333333334*rho[4]*weight[4]+0.024056261216234404*rho[3]*weight[4]+0.004811252243246881*rho[2]*weight[4]-0.004811252243246881*rho[1]*weight[4]-0.01388888888888889*rho[0]*weight[4]+0.024056261216234404*weight[3]*rho[4]+0.004811252243246881*weight[2]*rho[4]-0.004811252243246881*weight[1]*rho[4]-0.01388888888888889*weight[0]*rho[4]-0.09166666666666667*rho[3]*weight[3]-0.01388888888888889*rho[2]*weight[3]+0.01388888888888889*rho[1]*weight[3]+0.024056261216234404*rho[0]*weight[3]-0.01388888888888889*weight[2]*rho[3]+0.01388888888888889*weight[1]*rho[3]+0.024056261216234404*weight[0]*rho[3]-0.09166666666666667*rho[2]*weight[2]-0.01388888888888889*rho[1]*weight[2]-0.024056261216234404*rho[0]*weight[2]-0.01388888888888889*weight[1]*rho[2]-0.024056261216234404*weight[0]*rho[2]-0.09166666666666667*rho[1]*weight[1]+0.024056261216234404*rho[0]*weight[1]+0.024056261216234404*weight[0]*rho[1]-0.125*rho[0]*weight[0]); + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[5]],__double_as_longlong(-(2.3717082451262845*phiBC[19])-2.3717082451262845*phiBC[18]+2.3717082451262845*phiBC[17]+1.3693063937629155*phiBC[16]-1.3693063937629155*phiBC[15]+1.3693063937629155*phiBC[14]+1.3693063937629155*phiBC[13]-1.3693063937629155*phiBC[12]+1.3693063937629155*phiBC[11]-1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]+1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); #else - bsrc[nodeOff+globalIdxs[5]] += -(0.034523809523809526*rho[19]*weight[19])-0.02*rho[18]*weight[19]+0.02*rho[17]*weight[19]-0.008935182737458497*rho[16]*weight[19]+0.008935182737458497*rho[15]*weight[19]+0.01924500897298753*rho[14]*weight[19]+0.01924500897298753*rho[13]*weight[19]+0.01924500897298753*rho[12]*weight[19]-0.01924500897298753*rho[11]*weight[19]-0.012909944487358056*rho[10]*weight[19]-0.021825396825396828*rho[9]*weight[19]-0.011111111111111112*rho[8]*weight[19]-0.011111111111111112*rho[7]*weight[19]+0.022360679774997897*rho[6]*weight[19]-0.022360679774997897*rho[5]*weight[19]+0.0372677996249965*rho[4]*weight[19]+0.02151657414559676*rho[3]*weight[19]-0.02151657414559676*rho[2]*weight[19]+0.02151657414559676*rho[1]*weight[19]-0.012422599874998833*rho[0]*weight[19]-0.02*weight[18]*rho[19]+0.02*weight[17]*rho[19]-0.008935182737458497*weight[16]*rho[19]+0.008935182737458497*weight[15]*rho[19]+0.01924500897298753*weight[14]*rho[19]+0.01924500897298753*weight[13]*rho[19]+0.01924500897298753*weight[12]*rho[19]-0.01924500897298753*weight[11]*rho[19]-0.012909944487358056*weight[10]*rho[19]-0.021825396825396828*weight[9]*rho[19]-0.011111111111111112*weight[8]*rho[19]-0.011111111111111112*weight[7]*rho[19]+0.022360679774997897*weight[6]*rho[19]-0.022360679774997897*weight[5]*rho[19]+0.0372677996249965*weight[4]*rho[19]+0.02151657414559676*weight[3]*rho[19]-0.02151657414559676*weight[2]*rho[19]+0.02151657414559676*weight[1]*rho[19]-0.012422599874998833*weight[0]*rho[19]-0.034523809523809526*rho[18]*weight[18]-0.02*rho[17]*weight[18]+0.01924500897298753*rho[16]*weight[18]-0.01924500897298753*rho[15]*weight[18]-0.008935182737458497*rho[14]*weight[18]-0.01924500897298753*rho[13]*weight[18]-0.008935182737458497*rho[12]*weight[18]+0.01924500897298753*rho[11]*weight[18]+0.012909944487358056*rho[10]*weight[18]+0.011111111111111112*rho[9]*weight[18]+0.021825396825396828*rho[8]*weight[18]+0.011111111111111112*rho[7]*weight[18]-0.022360679774997897*rho[6]*weight[18]+0.0372677996249965*rho[5]*weight[18]-0.022360679774997897*rho[4]*weight[18]-0.02151657414559676*rho[3]*weight[18]+0.02151657414559676*rho[2]*weight[18]-0.02151657414559676*rho[1]*weight[18]+0.012422599874998833*rho[0]*weight[18]-0.02*weight[17]*rho[18]+0.01924500897298753*weight[16]*rho[18]-0.01924500897298753*weight[15]*rho[18]-0.008935182737458497*weight[14]*rho[18]-0.01924500897298753*weight[13]*rho[18]-0.008935182737458497*weight[12]*rho[18]+0.01924500897298753*weight[11]*rho[18]+0.012909944487358056*weight[10]*rho[18]+0.011111111111111112*weight[9]*rho[18]+0.021825396825396828*weight[8]*rho[18]+0.011111111111111112*weight[7]*rho[18]-0.022360679774997897*weight[6]*rho[18]+0.0372677996249965*weight[5]*rho[18]-0.022360679774997897*weight[4]*rho[18]-0.02151657414559676*weight[3]*rho[18]+0.02151657414559676*weight[2]*rho[18]-0.02151657414559676*weight[1]*rho[18]+0.012422599874998833*weight[0]*rho[18]-0.034523809523809526*rho[17]*weight[17]-0.01924500897298753*rho[16]*weight[17]+0.01924500897298753*rho[15]*weight[17]+0.01924500897298753*rho[14]*weight[17]+0.008935182737458497*rho[13]*weight[17]+0.01924500897298753*rho[12]*weight[17]-0.008935182737458497*rho[11]*weight[17]-0.012909944487358056*rho[10]*weight[17]-0.011111111111111112*rho[9]*weight[17]-0.011111111111111112*rho[8]*weight[17]-0.021825396825396828*rho[7]*weight[17]+0.0372677996249965*rho[6]*weight[17]-0.022360679774997897*rho[5]*weight[17]+0.022360679774997897*rho[4]*weight[17]+0.02151657414559676*rho[3]*weight[17]-0.02151657414559676*rho[2]*weight[17]+0.02151657414559676*rho[1]*weight[17]-0.012422599874998833*rho[0]*weight[17]-0.01924500897298753*weight[16]*rho[17]+0.01924500897298753*weight[15]*rho[17]+0.01924500897298753*weight[14]*rho[17]+0.008935182737458497*weight[13]*rho[17]+0.01924500897298753*weight[12]*rho[17]-0.008935182737458497*weight[11]*rho[17]-0.012909944487358056*weight[10]*rho[17]-0.011111111111111112*weight[9]*rho[17]-0.011111111111111112*weight[8]*rho[17]-0.021825396825396828*weight[7]*rho[17]+0.0372677996249965*weight[6]*rho[17]-0.022360679774997897*weight[5]*rho[17]+0.022360679774997897*weight[4]*rho[17]+0.02151657414559676*weight[3]*rho[17]-0.02151657414559676*weight[2]*rho[17]+0.02151657414559676*weight[1]*rho[17]-0.012422599874998833*weight[0]*rho[17]-0.06785714285714287*rho[16]*weight[16]-0.021825396825396828*rho[15]*weight[16]-0.011111111111111112*rho[14]*weight[16]-0.011111111111111112*rho[13]*weight[16]-0.011111111111111112*rho[12]*weight[16]+0.022360679774997897*rho[10]*weight[16]-0.010309826235529031*rho[9]*weight[16]+0.01924500897298753*rho[8]*weight[16]+0.004303314829119352*rho[6]*weight[16]+0.021516574145596764*rho[5]*weight[16]-0.021516574145596764*rho[4]*weight[16]-0.012422599874998832*rho[3]*weight[16]+0.037267799624996496*rho[2]*weight[16]-0.012422599874998832*rho[1]*weight[16]+0.021516574145596764*rho[0]*weight[16]-0.021825396825396828*weight[15]*rho[16]-0.011111111111111112*weight[14]*rho[16]-0.011111111111111112*weight[13]*rho[16]-0.011111111111111112*weight[12]*rho[16]+0.022360679774997897*weight[10]*rho[16]-0.010309826235529031*weight[9]*rho[16]+0.01924500897298753*weight[8]*rho[16]+0.004303314829119352*weight[6]*rho[16]+0.021516574145596764*weight[5]*rho[16]-0.021516574145596764*weight[4]*rho[16]-0.012422599874998832*weight[3]*rho[16]+0.037267799624996496*weight[2]*rho[16]-0.012422599874998832*weight[1]*rho[16]+0.021516574145596764*weight[0]*rho[16]-0.06785714285714287*rho[15]*weight[15]+0.011111111111111112*rho[14]*weight[15]+0.011111111111111112*rho[13]*weight[15]-0.011111111111111112*rho[11]*weight[15]-0.022360679774997897*rho[10]*weight[15]+0.010309826235529031*rho[9]*weight[15]-0.01924500897298753*rho[7]*weight[15]+0.021516574145596764*rho[6]*weight[15]+0.004303314829119352*rho[5]*weight[15]+0.021516574145596764*rho[4]*weight[15]+0.012422599874998832*rho[3]*weight[15]-0.012422599874998832*rho[2]*weight[15]+0.037267799624996496*rho[1]*weight[15]-0.021516574145596764*rho[0]*weight[15]+0.011111111111111112*weight[14]*rho[15]+0.011111111111111112*weight[13]*rho[15]-0.011111111111111112*weight[11]*rho[15]-0.022360679774997897*weight[10]*rho[15]+0.010309826235529031*weight[9]*rho[15]-0.01924500897298753*weight[7]*rho[15]+0.021516574145596764*weight[6]*rho[15]+0.004303314829119352*weight[5]*rho[15]+0.021516574145596764*weight[4]*rho[15]+0.012422599874998832*weight[3]*rho[15]-0.012422599874998832*weight[2]*rho[15]+0.037267799624996496*weight[1]*rho[15]-0.021516574145596764*weight[0]*rho[15]-0.06785714285714287*rho[14]*weight[14]+0.021825396825396828*rho[12]*weight[14]-0.011111111111111112*rho[11]*weight[14]-0.022360679774997897*rho[10]*weight[14]-0.01924500897298753*rho[9]*weight[14]+0.010309826235529031*rho[8]*weight[14]-0.004303314829119352*rho[6]*weight[14]-0.021516574145596764*rho[5]*weight[14]+0.021516574145596764*rho[4]*weight[14]+0.037267799624996496*rho[3]*weight[14]-0.012422599874998832*rho[2]*weight[14]+0.012422599874998832*rho[1]*weight[14]-0.021516574145596764*rho[0]*weight[14]+0.021825396825396828*weight[12]*rho[14]-0.011111111111111112*weight[11]*rho[14]-0.022360679774997897*weight[10]*rho[14]-0.01924500897298753*weight[9]*rho[14]+0.010309826235529031*weight[8]*rho[14]-0.004303314829119352*weight[6]*rho[14]-0.021516574145596764*weight[5]*rho[14]+0.021516574145596764*weight[4]*rho[14]+0.037267799624996496*weight[3]*rho[14]-0.012422599874998832*weight[2]*rho[14]+0.012422599874998832*weight[1]*rho[14]-0.021516574145596764*weight[0]*rho[14]-0.06785714285714287*rho[13]*weight[13]+0.011111111111111112*rho[12]*weight[13]-0.021825396825396828*rho[11]*weight[13]-0.022360679774997897*rho[10]*weight[13]-0.01924500897298753*rho[9]*weight[13]+0.010309826235529031*rho[7]*weight[13]+0.021516574145596764*rho[6]*weight[13]+0.004303314829119352*rho[5]*weight[13]+0.021516574145596764*rho[4]*weight[13]+0.037267799624996496*rho[3]*weight[13]-0.012422599874998832*rho[2]*weight[13]+0.012422599874998832*rho[1]*weight[13]-0.021516574145596764*rho[0]*weight[13]+0.011111111111111112*weight[12]*rho[13]-0.021825396825396828*weight[11]*rho[13]-0.022360679774997897*weight[10]*rho[13]-0.01924500897298753*weight[9]*rho[13]+0.010309826235529031*weight[7]*rho[13]+0.021516574145596764*weight[6]*rho[13]+0.004303314829119352*weight[5]*rho[13]+0.021516574145596764*weight[4]*rho[13]+0.037267799624996496*weight[3]*rho[13]-0.012422599874998832*weight[2]*rho[13]+0.012422599874998832*weight[1]*rho[13]-0.021516574145596764*weight[0]*rho[13]-0.06785714285714287*rho[12]*weight[12]-0.011111111111111112*rho[11]*weight[12]-0.022360679774997897*rho[10]*weight[12]+0.010309826235529031*rho[8]*weight[12]-0.01924500897298753*rho[7]*weight[12]+0.021516574145596764*rho[6]*weight[12]-0.021516574145596764*rho[5]*weight[12]-0.004303314829119352*rho[4]*weight[12]+0.012422599874998832*rho[3]*weight[12]-0.012422599874998832*rho[2]*weight[12]+0.037267799624996496*rho[1]*weight[12]-0.021516574145596764*rho[0]*weight[12]-0.011111111111111112*weight[11]*rho[12]-0.022360679774997897*weight[10]*rho[12]+0.010309826235529031*weight[8]*rho[12]-0.01924500897298753*weight[7]*rho[12]+0.021516574145596764*weight[6]*rho[12]-0.021516574145596764*weight[5]*rho[12]-0.004303314829119352*weight[4]*rho[12]+0.012422599874998832*weight[3]*rho[12]-0.012422599874998832*weight[2]*rho[12]+0.037267799624996496*weight[1]*rho[12]-0.021516574145596764*weight[0]*rho[12]-0.06785714285714287*rho[11]*weight[11]+0.022360679774997897*rho[10]*weight[11]+0.01924500897298753*rho[8]*weight[11]-0.010309826235529031*rho[7]*weight[11]-0.021516574145596764*rho[6]*weight[11]+0.021516574145596764*rho[5]*weight[11]+0.004303314829119352*rho[4]*weight[11]-0.012422599874998832*rho[3]*weight[11]+0.037267799624996496*rho[2]*weight[11]-0.012422599874998832*rho[1]*weight[11]+0.021516574145596764*rho[0]*weight[11]+0.022360679774997897*weight[10]*rho[11]+0.01924500897298753*weight[8]*rho[11]-0.010309826235529031*weight[7]*rho[11]-0.021516574145596764*weight[6]*rho[11]+0.021516574145596764*weight[5]*rho[11]+0.004303314829119352*weight[4]*rho[11]-0.012422599874998832*weight[3]*rho[11]+0.037267799624996496*weight[2]*rho[11]-0.012422599874998832*weight[1]*rho[11]+0.021516574145596764*weight[0]*rho[11]-0.025*rho[10]*weight[10]+0.02151657414559676*rho[9]*weight[10]+0.02151657414559676*rho[8]*weight[10]+0.02151657414559676*rho[7]*weight[10]-0.014433756729740645*rho[6]*weight[10]+0.014433756729740645*rho[5]*weight[10]-0.014433756729740645*rho[4]*weight[10]-0.025*rho[3]*weight[10]+0.025*rho[2]*weight[10]-0.025*rho[1]*weight[10]+0.024056261216234404*rho[0]*weight[10]+0.02151657414559676*weight[9]*rho[10]+0.02151657414559676*weight[8]*rho[10]+0.02151657414559676*weight[7]*rho[10]-0.014433756729740645*weight[6]*rho[10]+0.014433756729740645*weight[5]*rho[10]-0.014433756729740645*weight[4]*rho[10]-0.025*weight[3]*rho[10]+0.025*weight[2]*rho[10]-0.025*weight[1]*rho[10]+0.024056261216234404*weight[0]*rho[10]-0.10119047619047619*rho[9]*weight[9]-0.012422599874998833*rho[6]*weight[9]+0.012422599874998833*rho[5]*weight[9]-0.012422599874998833*rho[4]*weight[9]+0.02151657414559676*rho[3]*weight[9]+0.02151657414559676*rho[2]*weight[9]-0.02151657414559676*rho[1]*weight[9]+0.0372677996249965*rho[0]*weight[9]-0.012422599874998833*weight[6]*rho[9]+0.012422599874998833*weight[5]*rho[9]-0.012422599874998833*weight[4]*rho[9]+0.02151657414559676*weight[3]*rho[9]+0.02151657414559676*weight[2]*rho[9]-0.02151657414559676*weight[1]*rho[9]+0.0372677996249965*weight[0]*rho[9]-0.10119047619047619*rho[8]*weight[8]-0.012422599874998833*rho[6]*weight[8]+0.012422599874998833*rho[5]*weight[8]-0.012422599874998833*rho[4]*weight[8]-0.02151657414559676*rho[3]*weight[8]-0.02151657414559676*rho[2]*weight[8]-0.02151657414559676*rho[1]*weight[8]+0.0372677996249965*rho[0]*weight[8]-0.012422599874998833*weight[6]*rho[8]+0.012422599874998833*weight[5]*rho[8]-0.012422599874998833*weight[4]*rho[8]-0.02151657414559676*weight[3]*rho[8]-0.02151657414559676*weight[2]*rho[8]-0.02151657414559676*weight[1]*rho[8]+0.0372677996249965*weight[0]*rho[8]-0.10119047619047619*rho[7]*weight[7]-0.012422599874998833*rho[6]*weight[7]+0.012422599874998833*rho[5]*weight[7]-0.012422599874998833*rho[4]*weight[7]-0.02151657414559676*rho[3]*weight[7]+0.02151657414559676*rho[2]*weight[7]+0.02151657414559676*rho[1]*weight[7]+0.0372677996249965*rho[0]*weight[7]-0.012422599874998833*weight[6]*rho[7]+0.012422599874998833*weight[5]*rho[7]-0.012422599874998833*weight[4]*rho[7]-0.02151657414559676*weight[3]*rho[7]+0.02151657414559676*weight[2]*rho[7]+0.02151657414559676*weight[1]*rho[7]+0.0372677996249965*weight[0]*rho[7]-0.058333333333333334*rho[6]*weight[6]-0.025*rho[5]*weight[6]+0.025*rho[4]*weight[6]-0.004811252243246881*rho[3]*weight[6]+0.004811252243246881*rho[2]*weight[6]+0.024056261216234404*rho[1]*weight[6]-0.01388888888888889*rho[0]*weight[6]-0.025*weight[5]*rho[6]+0.025*weight[4]*rho[6]-0.004811252243246881*weight[3]*rho[6]+0.004811252243246881*weight[2]*rho[6]+0.024056261216234404*weight[1]*rho[6]-0.01388888888888889*weight[0]*rho[6]-0.058333333333333334*rho[5]*weight[5]-0.025*rho[4]*weight[5]+0.004811252243246881*rho[3]*weight[5]+0.024056261216234404*rho[2]*weight[5]+0.004811252243246881*rho[1]*weight[5]+0.01388888888888889*rho[0]*weight[5]-0.025*weight[4]*rho[5]+0.004811252243246881*weight[3]*rho[5]+0.024056261216234404*weight[2]*rho[5]+0.004811252243246881*weight[1]*rho[5]+0.01388888888888889*weight[0]*rho[5]-0.058333333333333334*rho[4]*weight[4]+0.024056261216234404*rho[3]*weight[4]+0.004811252243246881*rho[2]*weight[4]-0.004811252243246881*rho[1]*weight[4]-0.01388888888888889*rho[0]*weight[4]+0.024056261216234404*weight[3]*rho[4]+0.004811252243246881*weight[2]*rho[4]-0.004811252243246881*weight[1]*rho[4]-0.01388888888888889*weight[0]*rho[4]-0.09166666666666667*rho[3]*weight[3]-0.01388888888888889*rho[2]*weight[3]+0.01388888888888889*rho[1]*weight[3]+0.024056261216234404*rho[0]*weight[3]-0.01388888888888889*weight[2]*rho[3]+0.01388888888888889*weight[1]*rho[3]+0.024056261216234404*weight[0]*rho[3]-0.09166666666666667*rho[2]*weight[2]-0.01388888888888889*rho[1]*weight[2]-0.024056261216234404*rho[0]*weight[2]-0.01388888888888889*weight[1]*rho[2]-0.024056261216234404*weight[0]*rho[2]-0.09166666666666667*rho[1]*weight[1]+0.024056261216234404*rho[0]*weight[1]+0.024056261216234404*weight[0]*rho[1]-0.125*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[5]] = -(2.3717082451262845*phiBC[19])-2.3717082451262845*phiBC[18]+2.3717082451262845*phiBC[17]+1.3693063937629155*phiBC[16]-1.3693063937629155*phiBC[15]+1.3693063937629155*phiBC[14]+1.3693063937629155*phiBC[13]-1.3693063937629155*phiBC[12]+1.3693063937629155*phiBC[11]-1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]+1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; #endif #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[6]],0.1*rho[19]*weight[19]-0.02666666666666667*rho[18]*weight[19]+0.05773502691896258*rho[15]*weight[19]-0.051639777949432225*rho[10]*weight[19]-0.029814239699997195*rho[5]*weight[19]-0.02666666666666667*weight[18]*rho[19]+0.05773502691896258*weight[15]*rho[19]-0.051639777949432225*weight[10]*rho[19]-0.029814239699997195*weight[5]*rho[19]+0.1*rho[18]*weight[18]-0.05773502691896258*rho[12]*weight[18]+0.051639777949432225*rho[10]*weight[18]-0.029814239699997195*rho[4]*weight[18]-0.05773502691896258*weight[12]*rho[18]+0.051639777949432225*weight[10]*rho[18]-0.029814239699997195*weight[4]*rho[18]+0.11904761904761905*rho[17]*weight[17]+0.03849001794597506*rho[16]*weight[17]-0.03849001794597506*rho[14]*weight[17]+0.06873217490352689*rho[13]*weight[17]-0.06873217490352689*rho[11]*weight[17]+0.022222222222222223*rho[9]*weight[17]+0.022222222222222223*rho[8]*weight[17]-0.03968253968253969*rho[7]*weight[17]-0.074535599249993*rho[6]*weight[17]-0.04303314829119352*rho[3]*weight[17]+0.04303314829119352*rho[2]*weight[17]+0.024845199749997667*rho[0]*weight[17]+0.03849001794597506*weight[16]*rho[17]-0.03849001794597506*weight[14]*rho[17]+0.06873217490352689*weight[13]*rho[17]-0.06873217490352689*weight[11]*rho[17]+0.022222222222222223*weight[9]*rho[17]+0.022222222222222223*weight[8]*rho[17]-0.03968253968253969*weight[7]*rho[17]-0.074535599249993*weight[6]*rho[17]-0.04303314829119352*weight[3]*rho[17]+0.04303314829119352*weight[2]*rho[17]+0.024845199749997667*weight[0]*rho[17]+0.16666666666666669*rho[16]*weight[16]-0.044444444444444446*rho[14]*weight[16]+0.022222222222222223*rho[13]*weight[16]+0.09622504486493764*rho[9]*weight[16]-0.08606629658238706*rho[6]*weight[16]-0.049690399499995326*rho[3]*weight[16]-0.044444444444444446*weight[14]*rho[16]+0.022222222222222223*weight[13]*rho[16]+0.09622504486493764*weight[9]*rho[16]-0.08606629658238706*weight[6]*rho[16]-0.049690399499995326*weight[3]*rho[16]+0.1*rho[15]*weight[15]-0.029814239699997195*rho[10]*weight[15]-0.05163977794943223*rho[5]*weight[15]-0.029814239699997195*weight[10]*rho[15]-0.05163977794943223*weight[5]*rho[15]+0.16666666666666669*rho[14]*weight[14]+0.022222222222222223*rho[11]*weight[14]-0.09622504486493764*rho[8]*weight[14]+0.08606629658238706*rho[6]*weight[14]-0.049690399499995326*rho[2]*weight[14]+0.022222222222222223*weight[11]*rho[14]-0.09622504486493764*weight[8]*rho[14]+0.08606629658238706*weight[6]*rho[14]-0.049690399499995326*weight[2]*rho[14]+0.11904761904761905*rho[13]*weight[13]-0.03968253968253969*rho[11]*weight[13]+0.03849001794597506*rho[9]*weight[13]-0.06873217490352689*rho[7]*weight[13]-0.04303314829119353*rho[6]*weight[13]-0.07453559924999299*rho[3]*weight[13]+0.024845199749997663*rho[2]*weight[13]+0.04303314829119353*rho[0]*weight[13]-0.03968253968253969*weight[11]*rho[13]+0.03849001794597506*weight[9]*rho[13]-0.06873217490352689*weight[7]*rho[13]-0.04303314829119353*weight[6]*rho[13]-0.07453559924999299*weight[3]*rho[13]+0.024845199749997663*weight[2]*rho[13]+0.04303314829119353*weight[0]*rho[13]+0.1*rho[12]*weight[12]-0.029814239699997195*rho[10]*weight[12]+0.05163977794943223*rho[4]*weight[12]-0.029814239699997195*weight[10]*rho[12]+0.05163977794943223*weight[4]*rho[12]+0.11904761904761905*rho[11]*weight[11]-0.03849001794597506*rho[8]*weight[11]+0.06873217490352689*rho[7]*weight[11]+0.04303314829119353*rho[6]*weight[11]+0.024845199749997663*rho[3]*weight[11]-0.07453559924999299*rho[2]*weight[11]-0.04303314829119353*rho[0]*weight[11]-0.03849001794597506*weight[8]*rho[11]+0.06873217490352689*weight[7]*rho[11]+0.04303314829119353*weight[6]*rho[11]+0.024845199749997663*weight[3]*rho[11]-0.07453559924999299*weight[2]*rho[11]-0.04303314829119353*weight[0]*rho[11]+0.1*rho[10]*weight[10]+0.05773502691896258*rho[5]*weight[10]-0.05773502691896258*rho[4]*weight[10]-0.03333333333333333*rho[1]*weight[10]+0.05773502691896258*weight[5]*rho[10]-0.05773502691896258*weight[4]*rho[10]-0.03333333333333333*weight[1]*rho[10]+0.16666666666666669*rho[9]*weight[9]-0.04969039949999533*rho[6]*weight[9]-0.08606629658238704*rho[3]*weight[9]-0.04969039949999533*weight[6]*rho[9]-0.08606629658238704*weight[3]*rho[9]+0.16666666666666669*rho[8]*weight[8]-0.04969039949999533*rho[6]*weight[8]+0.08606629658238704*rho[2]*weight[8]-0.04969039949999533*weight[6]*rho[8]+0.08606629658238704*weight[2]*rho[8]+0.11904761904761905*rho[7]*weight[7]+0.024845199749997667*rho[6]*weight[7]+0.04303314829119352*rho[3]*weight[7]-0.04303314829119352*rho[2]*weight[7]-0.074535599249993*rho[0]*weight[7]+0.024845199749997667*weight[6]*rho[7]+0.04303314829119352*weight[3]*rho[7]-0.04303314829119352*weight[2]*rho[7]-0.074535599249993*weight[0]*rho[7]+0.16666666666666669*rho[6]*weight[6]+0.09622504486493762*rho[3]*weight[6]-0.09622504486493762*rho[2]*weight[6]-0.05555555555555556*rho[0]*weight[6]+0.09622504486493762*weight[3]*rho[6]-0.09622504486493762*weight[2]*rho[6]-0.05555555555555556*weight[0]*rho[6]+0.1*rho[5]*weight[5]-0.03333333333333333*rho[4]*weight[5]-0.05773502691896258*rho[1]*weight[5]-0.03333333333333333*weight[4]*rho[5]-0.05773502691896258*weight[1]*rho[5]+0.1*rho[4]*weight[4]+0.05773502691896258*rho[1]*weight[4]+0.05773502691896258*weight[1]*rho[4]+0.16666666666666669*rho[3]*weight[3]-0.05555555555555556*rho[2]*weight[3]-0.09622504486493762*rho[0]*weight[3]-0.05555555555555556*weight[2]*rho[3]-0.09622504486493762*weight[0]*rho[3]+0.16666666666666669*rho[2]*weight[2]+0.09622504486493762*rho[0]*weight[2]+0.09622504486493762*weight[0]*rho[2]+0.1*rho[1]*weight[1]+0.16666666666666669*rho[0]*weight[0]); + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[6]],__double_as_longlong(-(1.1858541225631423*phiBC[17])+1.3693063937629155*phiBC[16]+1.3693063937629155*phiBC[14]-0.6846531968814578*phiBC[13]-0.6846531968814578*phiBC[11]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]-0.39528470752104744*phiBC[7]+1.0606601717798214*phiBC[6]+0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]+0.3535533905932738*phiBC[0])); #else - bsrc[nodeOff+globalIdxs[6]] += 0.1*rho[19]*weight[19]-0.02666666666666667*rho[18]*weight[19]+0.05773502691896258*rho[15]*weight[19]-0.051639777949432225*rho[10]*weight[19]-0.029814239699997195*rho[5]*weight[19]-0.02666666666666667*weight[18]*rho[19]+0.05773502691896258*weight[15]*rho[19]-0.051639777949432225*weight[10]*rho[19]-0.029814239699997195*weight[5]*rho[19]+0.1*rho[18]*weight[18]-0.05773502691896258*rho[12]*weight[18]+0.051639777949432225*rho[10]*weight[18]-0.029814239699997195*rho[4]*weight[18]-0.05773502691896258*weight[12]*rho[18]+0.051639777949432225*weight[10]*rho[18]-0.029814239699997195*weight[4]*rho[18]+0.11904761904761905*rho[17]*weight[17]+0.03849001794597506*rho[16]*weight[17]-0.03849001794597506*rho[14]*weight[17]+0.06873217490352689*rho[13]*weight[17]-0.06873217490352689*rho[11]*weight[17]+0.022222222222222223*rho[9]*weight[17]+0.022222222222222223*rho[8]*weight[17]-0.03968253968253969*rho[7]*weight[17]-0.074535599249993*rho[6]*weight[17]-0.04303314829119352*rho[3]*weight[17]+0.04303314829119352*rho[2]*weight[17]+0.024845199749997667*rho[0]*weight[17]+0.03849001794597506*weight[16]*rho[17]-0.03849001794597506*weight[14]*rho[17]+0.06873217490352689*weight[13]*rho[17]-0.06873217490352689*weight[11]*rho[17]+0.022222222222222223*weight[9]*rho[17]+0.022222222222222223*weight[8]*rho[17]-0.03968253968253969*weight[7]*rho[17]-0.074535599249993*weight[6]*rho[17]-0.04303314829119352*weight[3]*rho[17]+0.04303314829119352*weight[2]*rho[17]+0.024845199749997667*weight[0]*rho[17]+0.16666666666666669*rho[16]*weight[16]-0.044444444444444446*rho[14]*weight[16]+0.022222222222222223*rho[13]*weight[16]+0.09622504486493764*rho[9]*weight[16]-0.08606629658238706*rho[6]*weight[16]-0.049690399499995326*rho[3]*weight[16]-0.044444444444444446*weight[14]*rho[16]+0.022222222222222223*weight[13]*rho[16]+0.09622504486493764*weight[9]*rho[16]-0.08606629658238706*weight[6]*rho[16]-0.049690399499995326*weight[3]*rho[16]+0.1*rho[15]*weight[15]-0.029814239699997195*rho[10]*weight[15]-0.05163977794943223*rho[5]*weight[15]-0.029814239699997195*weight[10]*rho[15]-0.05163977794943223*weight[5]*rho[15]+0.16666666666666669*rho[14]*weight[14]+0.022222222222222223*rho[11]*weight[14]-0.09622504486493764*rho[8]*weight[14]+0.08606629658238706*rho[6]*weight[14]-0.049690399499995326*rho[2]*weight[14]+0.022222222222222223*weight[11]*rho[14]-0.09622504486493764*weight[8]*rho[14]+0.08606629658238706*weight[6]*rho[14]-0.049690399499995326*weight[2]*rho[14]+0.11904761904761905*rho[13]*weight[13]-0.03968253968253969*rho[11]*weight[13]+0.03849001794597506*rho[9]*weight[13]-0.06873217490352689*rho[7]*weight[13]-0.04303314829119353*rho[6]*weight[13]-0.07453559924999299*rho[3]*weight[13]+0.024845199749997663*rho[2]*weight[13]+0.04303314829119353*rho[0]*weight[13]-0.03968253968253969*weight[11]*rho[13]+0.03849001794597506*weight[9]*rho[13]-0.06873217490352689*weight[7]*rho[13]-0.04303314829119353*weight[6]*rho[13]-0.07453559924999299*weight[3]*rho[13]+0.024845199749997663*weight[2]*rho[13]+0.04303314829119353*weight[0]*rho[13]+0.1*rho[12]*weight[12]-0.029814239699997195*rho[10]*weight[12]+0.05163977794943223*rho[4]*weight[12]-0.029814239699997195*weight[10]*rho[12]+0.05163977794943223*weight[4]*rho[12]+0.11904761904761905*rho[11]*weight[11]-0.03849001794597506*rho[8]*weight[11]+0.06873217490352689*rho[7]*weight[11]+0.04303314829119353*rho[6]*weight[11]+0.024845199749997663*rho[3]*weight[11]-0.07453559924999299*rho[2]*weight[11]-0.04303314829119353*rho[0]*weight[11]-0.03849001794597506*weight[8]*rho[11]+0.06873217490352689*weight[7]*rho[11]+0.04303314829119353*weight[6]*rho[11]+0.024845199749997663*weight[3]*rho[11]-0.07453559924999299*weight[2]*rho[11]-0.04303314829119353*weight[0]*rho[11]+0.1*rho[10]*weight[10]+0.05773502691896258*rho[5]*weight[10]-0.05773502691896258*rho[4]*weight[10]-0.03333333333333333*rho[1]*weight[10]+0.05773502691896258*weight[5]*rho[10]-0.05773502691896258*weight[4]*rho[10]-0.03333333333333333*weight[1]*rho[10]+0.16666666666666669*rho[9]*weight[9]-0.04969039949999533*rho[6]*weight[9]-0.08606629658238704*rho[3]*weight[9]-0.04969039949999533*weight[6]*rho[9]-0.08606629658238704*weight[3]*rho[9]+0.16666666666666669*rho[8]*weight[8]-0.04969039949999533*rho[6]*weight[8]+0.08606629658238704*rho[2]*weight[8]-0.04969039949999533*weight[6]*rho[8]+0.08606629658238704*weight[2]*rho[8]+0.11904761904761905*rho[7]*weight[7]+0.024845199749997667*rho[6]*weight[7]+0.04303314829119352*rho[3]*weight[7]-0.04303314829119352*rho[2]*weight[7]-0.074535599249993*rho[0]*weight[7]+0.024845199749997667*weight[6]*rho[7]+0.04303314829119352*weight[3]*rho[7]-0.04303314829119352*weight[2]*rho[7]-0.074535599249993*weight[0]*rho[7]+0.16666666666666669*rho[6]*weight[6]+0.09622504486493762*rho[3]*weight[6]-0.09622504486493762*rho[2]*weight[6]-0.05555555555555556*rho[0]*weight[6]+0.09622504486493762*weight[3]*rho[6]-0.09622504486493762*weight[2]*rho[6]-0.05555555555555556*weight[0]*rho[6]+0.1*rho[5]*weight[5]-0.03333333333333333*rho[4]*weight[5]-0.05773502691896258*rho[1]*weight[5]-0.03333333333333333*weight[4]*rho[5]-0.05773502691896258*weight[1]*rho[5]+0.1*rho[4]*weight[4]+0.05773502691896258*rho[1]*weight[4]+0.05773502691896258*weight[1]*rho[4]+0.16666666666666669*rho[3]*weight[3]-0.05555555555555556*rho[2]*weight[3]-0.09622504486493762*rho[0]*weight[3]-0.05555555555555556*weight[2]*rho[3]-0.09622504486493762*weight[0]*rho[3]+0.16666666666666669*rho[2]*weight[2]+0.09622504486493762*rho[0]*weight[2]+0.09622504486493762*weight[0]*rho[2]+0.1*rho[1]*weight[1]+0.16666666666666669*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[6]] = -(1.1858541225631423*phiBC[17])+1.3693063937629155*phiBC[16]+1.3693063937629155*phiBC[14]-0.6846531968814578*phiBC[13]-0.6846531968814578*phiBC[11]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]-0.39528470752104744*phiBC[7]+1.0606601717798214*phiBC[6]+0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]+0.3535533905932738*phiBC[0]; #endif #ifdef __CUDA_ARCH__ - atomicAdd(&bsrc[nodeOff+globalIdxs[7]],-(0.034523809523809526*rho[19]*weight[19])-0.02*rho[18]*weight[19]-0.02*rho[17]*weight[19]+0.008935182737458497*rho[16]*weight[19]+0.008935182737458497*rho[15]*weight[19]-0.01924500897298753*rho[14]*weight[19]-0.01924500897298753*rho[13]*weight[19]+0.01924500897298753*rho[12]*weight[19]+0.01924500897298753*rho[11]*weight[19]-0.012909944487358056*rho[10]*weight[19]+0.021825396825396828*rho[9]*weight[19]+0.011111111111111112*rho[8]*weight[19]+0.011111111111111112*rho[7]*weight[19]-0.022360679774997897*rho[6]*weight[19]-0.022360679774997897*rho[5]*weight[19]+0.0372677996249965*rho[4]*weight[19]-0.02151657414559676*rho[3]*weight[19]+0.02151657414559676*rho[2]*weight[19]+0.02151657414559676*rho[1]*weight[19]+0.012422599874998833*rho[0]*weight[19]-0.02*weight[18]*rho[19]-0.02*weight[17]*rho[19]+0.008935182737458497*weight[16]*rho[19]+0.008935182737458497*weight[15]*rho[19]-0.01924500897298753*weight[14]*rho[19]-0.01924500897298753*weight[13]*rho[19]+0.01924500897298753*weight[12]*rho[19]+0.01924500897298753*weight[11]*rho[19]-0.012909944487358056*weight[10]*rho[19]+0.021825396825396828*weight[9]*rho[19]+0.011111111111111112*weight[8]*rho[19]+0.011111111111111112*weight[7]*rho[19]-0.022360679774997897*weight[6]*rho[19]-0.022360679774997897*weight[5]*rho[19]+0.0372677996249965*weight[4]*rho[19]-0.02151657414559676*weight[3]*rho[19]+0.02151657414559676*weight[2]*rho[19]+0.02151657414559676*weight[1]*rho[19]+0.012422599874998833*weight[0]*rho[19]-0.034523809523809526*rho[18]*weight[18]+0.02*rho[17]*weight[18]-0.01924500897298753*rho[16]*weight[18]-0.01924500897298753*rho[15]*weight[18]+0.008935182737458497*rho[14]*weight[18]+0.01924500897298753*rho[13]*weight[18]-0.008935182737458497*rho[12]*weight[18]-0.01924500897298753*rho[11]*weight[18]+0.012909944487358056*rho[10]*weight[18]-0.011111111111111112*rho[9]*weight[18]-0.021825396825396828*rho[8]*weight[18]-0.011111111111111112*rho[7]*weight[18]+0.022360679774997897*rho[6]*weight[18]+0.0372677996249965*rho[5]*weight[18]-0.022360679774997897*rho[4]*weight[18]+0.02151657414559676*rho[3]*weight[18]-0.02151657414559676*rho[2]*weight[18]-0.02151657414559676*rho[1]*weight[18]-0.012422599874998833*rho[0]*weight[18]+0.02*weight[17]*rho[18]-0.01924500897298753*weight[16]*rho[18]-0.01924500897298753*weight[15]*rho[18]+0.008935182737458497*weight[14]*rho[18]+0.01924500897298753*weight[13]*rho[18]-0.008935182737458497*weight[12]*rho[18]-0.01924500897298753*weight[11]*rho[18]+0.012909944487358056*weight[10]*rho[18]-0.011111111111111112*weight[9]*rho[18]-0.021825396825396828*weight[8]*rho[18]-0.011111111111111112*weight[7]*rho[18]+0.022360679774997897*weight[6]*rho[18]+0.0372677996249965*weight[5]*rho[18]-0.022360679774997897*weight[4]*rho[18]+0.02151657414559676*weight[3]*rho[18]-0.02151657414559676*weight[2]*rho[18]-0.02151657414559676*weight[1]*rho[18]-0.012422599874998833*weight[0]*rho[18]-0.034523809523809526*rho[17]*weight[17]-0.01924500897298753*rho[16]*weight[17]-0.01924500897298753*rho[15]*weight[17]+0.01924500897298753*rho[14]*weight[17]+0.008935182737458497*rho[13]*weight[17]-0.01924500897298753*rho[12]*weight[17]-0.008935182737458497*rho[11]*weight[17]+0.012909944487358056*rho[10]*weight[17]-0.011111111111111112*rho[9]*weight[17]-0.011111111111111112*rho[8]*weight[17]-0.021825396825396828*rho[7]*weight[17]+0.0372677996249965*rho[6]*weight[17]+0.022360679774997897*rho[5]*weight[17]-0.022360679774997897*rho[4]*weight[17]+0.02151657414559676*rho[3]*weight[17]-0.02151657414559676*rho[2]*weight[17]-0.02151657414559676*rho[1]*weight[17]-0.012422599874998833*rho[0]*weight[17]-0.01924500897298753*weight[16]*rho[17]-0.01924500897298753*weight[15]*rho[17]+0.01924500897298753*weight[14]*rho[17]+0.008935182737458497*weight[13]*rho[17]-0.01924500897298753*weight[12]*rho[17]-0.008935182737458497*weight[11]*rho[17]+0.012909944487358056*weight[10]*rho[17]-0.011111111111111112*weight[9]*rho[17]-0.011111111111111112*weight[8]*rho[17]-0.021825396825396828*weight[7]*rho[17]+0.0372677996249965*weight[6]*rho[17]+0.022360679774997897*weight[5]*rho[17]-0.022360679774997897*weight[4]*rho[17]+0.02151657414559676*weight[3]*rho[17]-0.02151657414559676*weight[2]*rho[17]-0.02151657414559676*weight[1]*rho[17]-0.012422599874998833*weight[0]*rho[17]-0.06785714285714287*rho[16]*weight[16]+0.021825396825396828*rho[15]*weight[16]-0.011111111111111112*rho[14]*weight[16]-0.011111111111111112*rho[13]*weight[16]+0.011111111111111112*rho[12]*weight[16]-0.022360679774997897*rho[10]*weight[16]-0.010309826235529031*rho[9]*weight[16]+0.01924500897298753*rho[8]*weight[16]+0.004303314829119352*rho[6]*weight[16]-0.021516574145596764*rho[5]*weight[16]+0.021516574145596764*rho[4]*weight[16]-0.012422599874998832*rho[3]*weight[16]+0.037267799624996496*rho[2]*weight[16]+0.012422599874998832*rho[1]*weight[16]+0.021516574145596764*rho[0]*weight[16]+0.021825396825396828*weight[15]*rho[16]-0.011111111111111112*weight[14]*rho[16]-0.011111111111111112*weight[13]*rho[16]+0.011111111111111112*weight[12]*rho[16]-0.022360679774997897*weight[10]*rho[16]-0.010309826235529031*weight[9]*rho[16]+0.01924500897298753*weight[8]*rho[16]+0.004303314829119352*weight[6]*rho[16]-0.021516574145596764*weight[5]*rho[16]+0.021516574145596764*weight[4]*rho[16]-0.012422599874998832*weight[3]*rho[16]+0.037267799624996496*weight[2]*rho[16]+0.012422599874998832*weight[1]*rho[16]+0.021516574145596764*weight[0]*rho[16]-0.06785714285714287*rho[15]*weight[15]-0.011111111111111112*rho[14]*weight[15]-0.011111111111111112*rho[13]*weight[15]+0.011111111111111112*rho[11]*weight[15]-0.022360679774997897*rho[10]*weight[15]-0.010309826235529031*rho[9]*weight[15]+0.01924500897298753*rho[7]*weight[15]-0.021516574145596764*rho[6]*weight[15]+0.004303314829119352*rho[5]*weight[15]+0.021516574145596764*rho[4]*weight[15]-0.012422599874998832*rho[3]*weight[15]+0.012422599874998832*rho[2]*weight[15]+0.037267799624996496*rho[1]*weight[15]+0.021516574145596764*rho[0]*weight[15]-0.011111111111111112*weight[14]*rho[15]-0.011111111111111112*weight[13]*rho[15]+0.011111111111111112*weight[11]*rho[15]-0.022360679774997897*weight[10]*rho[15]-0.010309826235529031*weight[9]*rho[15]+0.01924500897298753*weight[7]*rho[15]-0.021516574145596764*weight[6]*rho[15]+0.004303314829119352*weight[5]*rho[15]+0.021516574145596764*weight[4]*rho[15]-0.012422599874998832*weight[3]*rho[15]+0.012422599874998832*weight[2]*rho[15]+0.037267799624996496*weight[1]*rho[15]+0.021516574145596764*weight[0]*rho[15]-0.06785714285714287*rho[14]*weight[14]-0.021825396825396828*rho[12]*weight[14]-0.011111111111111112*rho[11]*weight[14]+0.022360679774997897*rho[10]*weight[14]-0.01924500897298753*rho[9]*weight[14]+0.010309826235529031*rho[8]*weight[14]-0.004303314829119352*rho[6]*weight[14]+0.021516574145596764*rho[5]*weight[14]-0.021516574145596764*rho[4]*weight[14]+0.037267799624996496*rho[3]*weight[14]-0.012422599874998832*rho[2]*weight[14]-0.012422599874998832*rho[1]*weight[14]-0.021516574145596764*rho[0]*weight[14]-0.021825396825396828*weight[12]*rho[14]-0.011111111111111112*weight[11]*rho[14]+0.022360679774997897*weight[10]*rho[14]-0.01924500897298753*weight[9]*rho[14]+0.010309826235529031*weight[8]*rho[14]-0.004303314829119352*weight[6]*rho[14]+0.021516574145596764*weight[5]*rho[14]-0.021516574145596764*weight[4]*rho[14]+0.037267799624996496*weight[3]*rho[14]-0.012422599874998832*weight[2]*rho[14]-0.012422599874998832*weight[1]*rho[14]-0.021516574145596764*weight[0]*rho[14]-0.06785714285714287*rho[13]*weight[13]-0.011111111111111112*rho[12]*weight[13]-0.021825396825396828*rho[11]*weight[13]+0.022360679774997897*rho[10]*weight[13]-0.01924500897298753*rho[9]*weight[13]+0.010309826235529031*rho[7]*weight[13]+0.021516574145596764*rho[6]*weight[13]-0.004303314829119352*rho[5]*weight[13]-0.021516574145596764*rho[4]*weight[13]+0.037267799624996496*rho[3]*weight[13]-0.012422599874998832*rho[2]*weight[13]-0.012422599874998832*rho[1]*weight[13]-0.021516574145596764*rho[0]*weight[13]-0.011111111111111112*weight[12]*rho[13]-0.021825396825396828*weight[11]*rho[13]+0.022360679774997897*weight[10]*rho[13]-0.01924500897298753*weight[9]*rho[13]+0.010309826235529031*weight[7]*rho[13]+0.021516574145596764*weight[6]*rho[13]-0.004303314829119352*weight[5]*rho[13]-0.021516574145596764*weight[4]*rho[13]+0.037267799624996496*weight[3]*rho[13]-0.012422599874998832*weight[2]*rho[13]-0.012422599874998832*weight[1]*rho[13]-0.021516574145596764*weight[0]*rho[13]-0.06785714285714287*rho[12]*weight[12]+0.011111111111111112*rho[11]*weight[12]-0.022360679774997897*rho[10]*weight[12]-0.010309826235529031*rho[8]*weight[12]+0.01924500897298753*rho[7]*weight[12]-0.021516574145596764*rho[6]*weight[12]-0.021516574145596764*rho[5]*weight[12]-0.004303314829119352*rho[4]*weight[12]-0.012422599874998832*rho[3]*weight[12]+0.012422599874998832*rho[2]*weight[12]+0.037267799624996496*rho[1]*weight[12]+0.021516574145596764*rho[0]*weight[12]+0.011111111111111112*weight[11]*rho[12]-0.022360679774997897*weight[10]*rho[12]-0.010309826235529031*weight[8]*rho[12]+0.01924500897298753*weight[7]*rho[12]-0.021516574145596764*weight[6]*rho[12]-0.021516574145596764*weight[5]*rho[12]-0.004303314829119352*weight[4]*rho[12]-0.012422599874998832*weight[3]*rho[12]+0.012422599874998832*weight[2]*rho[12]+0.037267799624996496*weight[1]*rho[12]+0.021516574145596764*weight[0]*rho[12]-0.06785714285714287*rho[11]*weight[11]-0.022360679774997897*rho[10]*weight[11]+0.01924500897298753*rho[8]*weight[11]-0.010309826235529031*rho[7]*weight[11]-0.021516574145596764*rho[6]*weight[11]-0.021516574145596764*rho[5]*weight[11]-0.004303314829119352*rho[4]*weight[11]-0.012422599874998832*rho[3]*weight[11]+0.037267799624996496*rho[2]*weight[11]+0.012422599874998832*rho[1]*weight[11]+0.021516574145596764*rho[0]*weight[11]-0.022360679774997897*weight[10]*rho[11]+0.01924500897298753*weight[8]*rho[11]-0.010309826235529031*weight[7]*rho[11]-0.021516574145596764*weight[6]*rho[11]-0.021516574145596764*weight[5]*rho[11]-0.004303314829119352*weight[4]*rho[11]-0.012422599874998832*weight[3]*rho[11]+0.037267799624996496*weight[2]*rho[11]+0.012422599874998832*weight[1]*rho[11]+0.021516574145596764*weight[0]*rho[11]-0.025*rho[10]*weight[10]-0.02151657414559676*rho[9]*weight[10]-0.02151657414559676*rho[8]*weight[10]-0.02151657414559676*rho[7]*weight[10]+0.014433756729740645*rho[6]*weight[10]+0.014433756729740645*rho[5]*weight[10]-0.014433756729740645*rho[4]*weight[10]+0.025*rho[3]*weight[10]-0.025*rho[2]*weight[10]-0.025*rho[1]*weight[10]-0.024056261216234404*rho[0]*weight[10]-0.02151657414559676*weight[9]*rho[10]-0.02151657414559676*weight[8]*rho[10]-0.02151657414559676*weight[7]*rho[10]+0.014433756729740645*weight[6]*rho[10]+0.014433756729740645*weight[5]*rho[10]-0.014433756729740645*weight[4]*rho[10]+0.025*weight[3]*rho[10]-0.025*weight[2]*rho[10]-0.025*weight[1]*rho[10]-0.024056261216234404*weight[0]*rho[10]-0.10119047619047619*rho[9]*weight[9]-0.012422599874998833*rho[6]*weight[9]-0.012422599874998833*rho[5]*weight[9]+0.012422599874998833*rho[4]*weight[9]+0.02151657414559676*rho[3]*weight[9]+0.02151657414559676*rho[2]*weight[9]+0.02151657414559676*rho[1]*weight[9]+0.0372677996249965*rho[0]*weight[9]-0.012422599874998833*weight[6]*rho[9]-0.012422599874998833*weight[5]*rho[9]+0.012422599874998833*weight[4]*rho[9]+0.02151657414559676*weight[3]*rho[9]+0.02151657414559676*weight[2]*rho[9]+0.02151657414559676*weight[1]*rho[9]+0.0372677996249965*weight[0]*rho[9]-0.10119047619047619*rho[8]*weight[8]-0.012422599874998833*rho[6]*weight[8]-0.012422599874998833*rho[5]*weight[8]+0.012422599874998833*rho[4]*weight[8]-0.02151657414559676*rho[3]*weight[8]-0.02151657414559676*rho[2]*weight[8]+0.02151657414559676*rho[1]*weight[8]+0.0372677996249965*rho[0]*weight[8]-0.012422599874998833*weight[6]*rho[8]-0.012422599874998833*weight[5]*rho[8]+0.012422599874998833*weight[4]*rho[8]-0.02151657414559676*weight[3]*rho[8]-0.02151657414559676*weight[2]*rho[8]+0.02151657414559676*weight[1]*rho[8]+0.0372677996249965*weight[0]*rho[8]-0.10119047619047619*rho[7]*weight[7]-0.012422599874998833*rho[6]*weight[7]-0.012422599874998833*rho[5]*weight[7]+0.012422599874998833*rho[4]*weight[7]-0.02151657414559676*rho[3]*weight[7]+0.02151657414559676*rho[2]*weight[7]-0.02151657414559676*rho[1]*weight[7]+0.0372677996249965*rho[0]*weight[7]-0.012422599874998833*weight[6]*rho[7]-0.012422599874998833*weight[5]*rho[7]+0.012422599874998833*weight[4]*rho[7]-0.02151657414559676*weight[3]*rho[7]+0.02151657414559676*weight[2]*rho[7]-0.02151657414559676*weight[1]*rho[7]+0.0372677996249965*weight[0]*rho[7]-0.058333333333333334*rho[6]*weight[6]+0.025*rho[5]*weight[6]-0.025*rho[4]*weight[6]-0.004811252243246881*rho[3]*weight[6]+0.004811252243246881*rho[2]*weight[6]-0.024056261216234404*rho[1]*weight[6]-0.01388888888888889*rho[0]*weight[6]+0.025*weight[5]*rho[6]-0.025*weight[4]*rho[6]-0.004811252243246881*weight[3]*rho[6]+0.004811252243246881*weight[2]*rho[6]-0.024056261216234404*weight[1]*rho[6]-0.01388888888888889*weight[0]*rho[6]-0.058333333333333334*rho[5]*weight[5]-0.025*rho[4]*weight[5]-0.004811252243246881*rho[3]*weight[5]-0.024056261216234404*rho[2]*weight[5]+0.004811252243246881*rho[1]*weight[5]-0.01388888888888889*rho[0]*weight[5]-0.025*weight[4]*rho[5]-0.004811252243246881*weight[3]*rho[5]-0.024056261216234404*weight[2]*rho[5]+0.004811252243246881*weight[1]*rho[5]-0.01388888888888889*weight[0]*rho[5]-0.058333333333333334*rho[4]*weight[4]-0.024056261216234404*rho[3]*weight[4]-0.004811252243246881*rho[2]*weight[4]-0.004811252243246881*rho[1]*weight[4]+0.01388888888888889*rho[0]*weight[4]-0.024056261216234404*weight[3]*rho[4]-0.004811252243246881*weight[2]*rho[4]-0.004811252243246881*weight[1]*rho[4]+0.01388888888888889*weight[0]*rho[4]-0.09166666666666667*rho[3]*weight[3]-0.01388888888888889*rho[2]*weight[3]-0.01388888888888889*rho[1]*weight[3]+0.024056261216234404*rho[0]*weight[3]-0.01388888888888889*weight[2]*rho[3]-0.01388888888888889*weight[1]*rho[3]+0.024056261216234404*weight[0]*rho[3]-0.09166666666666667*rho[2]*weight[2]+0.01388888888888889*rho[1]*weight[2]-0.024056261216234404*rho[0]*weight[2]+0.01388888888888889*weight[1]*rho[2]-0.024056261216234404*weight[0]*rho[2]-0.09166666666666667*rho[1]*weight[1]-0.024056261216234404*rho[0]*weight[1]-0.024056261216234404*weight[0]*rho[1]-0.125*rho[0]*weight[0]); + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[7]],__double_as_longlong(2.3717082451262845*phiBC[19]+2.3717082451262845*phiBC[18]+2.3717082451262845*phiBC[17]+1.3693063937629155*phiBC[16]+1.3693063937629155*phiBC[15]+1.3693063937629155*phiBC[14]+1.3693063937629155*phiBC[13]+1.3693063937629155*phiBC[12]+1.3693063937629155*phiBC[11]+1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]+1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); #else - bsrc[nodeOff+globalIdxs[7]] += -(0.034523809523809526*rho[19]*weight[19])-0.02*rho[18]*weight[19]-0.02*rho[17]*weight[19]+0.008935182737458497*rho[16]*weight[19]+0.008935182737458497*rho[15]*weight[19]-0.01924500897298753*rho[14]*weight[19]-0.01924500897298753*rho[13]*weight[19]+0.01924500897298753*rho[12]*weight[19]+0.01924500897298753*rho[11]*weight[19]-0.012909944487358056*rho[10]*weight[19]+0.021825396825396828*rho[9]*weight[19]+0.011111111111111112*rho[8]*weight[19]+0.011111111111111112*rho[7]*weight[19]-0.022360679774997897*rho[6]*weight[19]-0.022360679774997897*rho[5]*weight[19]+0.0372677996249965*rho[4]*weight[19]-0.02151657414559676*rho[3]*weight[19]+0.02151657414559676*rho[2]*weight[19]+0.02151657414559676*rho[1]*weight[19]+0.012422599874998833*rho[0]*weight[19]-0.02*weight[18]*rho[19]-0.02*weight[17]*rho[19]+0.008935182737458497*weight[16]*rho[19]+0.008935182737458497*weight[15]*rho[19]-0.01924500897298753*weight[14]*rho[19]-0.01924500897298753*weight[13]*rho[19]+0.01924500897298753*weight[12]*rho[19]+0.01924500897298753*weight[11]*rho[19]-0.012909944487358056*weight[10]*rho[19]+0.021825396825396828*weight[9]*rho[19]+0.011111111111111112*weight[8]*rho[19]+0.011111111111111112*weight[7]*rho[19]-0.022360679774997897*weight[6]*rho[19]-0.022360679774997897*weight[5]*rho[19]+0.0372677996249965*weight[4]*rho[19]-0.02151657414559676*weight[3]*rho[19]+0.02151657414559676*weight[2]*rho[19]+0.02151657414559676*weight[1]*rho[19]+0.012422599874998833*weight[0]*rho[19]-0.034523809523809526*rho[18]*weight[18]+0.02*rho[17]*weight[18]-0.01924500897298753*rho[16]*weight[18]-0.01924500897298753*rho[15]*weight[18]+0.008935182737458497*rho[14]*weight[18]+0.01924500897298753*rho[13]*weight[18]-0.008935182737458497*rho[12]*weight[18]-0.01924500897298753*rho[11]*weight[18]+0.012909944487358056*rho[10]*weight[18]-0.011111111111111112*rho[9]*weight[18]-0.021825396825396828*rho[8]*weight[18]-0.011111111111111112*rho[7]*weight[18]+0.022360679774997897*rho[6]*weight[18]+0.0372677996249965*rho[5]*weight[18]-0.022360679774997897*rho[4]*weight[18]+0.02151657414559676*rho[3]*weight[18]-0.02151657414559676*rho[2]*weight[18]-0.02151657414559676*rho[1]*weight[18]-0.012422599874998833*rho[0]*weight[18]+0.02*weight[17]*rho[18]-0.01924500897298753*weight[16]*rho[18]-0.01924500897298753*weight[15]*rho[18]+0.008935182737458497*weight[14]*rho[18]+0.01924500897298753*weight[13]*rho[18]-0.008935182737458497*weight[12]*rho[18]-0.01924500897298753*weight[11]*rho[18]+0.012909944487358056*weight[10]*rho[18]-0.011111111111111112*weight[9]*rho[18]-0.021825396825396828*weight[8]*rho[18]-0.011111111111111112*weight[7]*rho[18]+0.022360679774997897*weight[6]*rho[18]+0.0372677996249965*weight[5]*rho[18]-0.022360679774997897*weight[4]*rho[18]+0.02151657414559676*weight[3]*rho[18]-0.02151657414559676*weight[2]*rho[18]-0.02151657414559676*weight[1]*rho[18]-0.012422599874998833*weight[0]*rho[18]-0.034523809523809526*rho[17]*weight[17]-0.01924500897298753*rho[16]*weight[17]-0.01924500897298753*rho[15]*weight[17]+0.01924500897298753*rho[14]*weight[17]+0.008935182737458497*rho[13]*weight[17]-0.01924500897298753*rho[12]*weight[17]-0.008935182737458497*rho[11]*weight[17]+0.012909944487358056*rho[10]*weight[17]-0.011111111111111112*rho[9]*weight[17]-0.011111111111111112*rho[8]*weight[17]-0.021825396825396828*rho[7]*weight[17]+0.0372677996249965*rho[6]*weight[17]+0.022360679774997897*rho[5]*weight[17]-0.022360679774997897*rho[4]*weight[17]+0.02151657414559676*rho[3]*weight[17]-0.02151657414559676*rho[2]*weight[17]-0.02151657414559676*rho[1]*weight[17]-0.012422599874998833*rho[0]*weight[17]-0.01924500897298753*weight[16]*rho[17]-0.01924500897298753*weight[15]*rho[17]+0.01924500897298753*weight[14]*rho[17]+0.008935182737458497*weight[13]*rho[17]-0.01924500897298753*weight[12]*rho[17]-0.008935182737458497*weight[11]*rho[17]+0.012909944487358056*weight[10]*rho[17]-0.011111111111111112*weight[9]*rho[17]-0.011111111111111112*weight[8]*rho[17]-0.021825396825396828*weight[7]*rho[17]+0.0372677996249965*weight[6]*rho[17]+0.022360679774997897*weight[5]*rho[17]-0.022360679774997897*weight[4]*rho[17]+0.02151657414559676*weight[3]*rho[17]-0.02151657414559676*weight[2]*rho[17]-0.02151657414559676*weight[1]*rho[17]-0.012422599874998833*weight[0]*rho[17]-0.06785714285714287*rho[16]*weight[16]+0.021825396825396828*rho[15]*weight[16]-0.011111111111111112*rho[14]*weight[16]-0.011111111111111112*rho[13]*weight[16]+0.011111111111111112*rho[12]*weight[16]-0.022360679774997897*rho[10]*weight[16]-0.010309826235529031*rho[9]*weight[16]+0.01924500897298753*rho[8]*weight[16]+0.004303314829119352*rho[6]*weight[16]-0.021516574145596764*rho[5]*weight[16]+0.021516574145596764*rho[4]*weight[16]-0.012422599874998832*rho[3]*weight[16]+0.037267799624996496*rho[2]*weight[16]+0.012422599874998832*rho[1]*weight[16]+0.021516574145596764*rho[0]*weight[16]+0.021825396825396828*weight[15]*rho[16]-0.011111111111111112*weight[14]*rho[16]-0.011111111111111112*weight[13]*rho[16]+0.011111111111111112*weight[12]*rho[16]-0.022360679774997897*weight[10]*rho[16]-0.010309826235529031*weight[9]*rho[16]+0.01924500897298753*weight[8]*rho[16]+0.004303314829119352*weight[6]*rho[16]-0.021516574145596764*weight[5]*rho[16]+0.021516574145596764*weight[4]*rho[16]-0.012422599874998832*weight[3]*rho[16]+0.037267799624996496*weight[2]*rho[16]+0.012422599874998832*weight[1]*rho[16]+0.021516574145596764*weight[0]*rho[16]-0.06785714285714287*rho[15]*weight[15]-0.011111111111111112*rho[14]*weight[15]-0.011111111111111112*rho[13]*weight[15]+0.011111111111111112*rho[11]*weight[15]-0.022360679774997897*rho[10]*weight[15]-0.010309826235529031*rho[9]*weight[15]+0.01924500897298753*rho[7]*weight[15]-0.021516574145596764*rho[6]*weight[15]+0.004303314829119352*rho[5]*weight[15]+0.021516574145596764*rho[4]*weight[15]-0.012422599874998832*rho[3]*weight[15]+0.012422599874998832*rho[2]*weight[15]+0.037267799624996496*rho[1]*weight[15]+0.021516574145596764*rho[0]*weight[15]-0.011111111111111112*weight[14]*rho[15]-0.011111111111111112*weight[13]*rho[15]+0.011111111111111112*weight[11]*rho[15]-0.022360679774997897*weight[10]*rho[15]-0.010309826235529031*weight[9]*rho[15]+0.01924500897298753*weight[7]*rho[15]-0.021516574145596764*weight[6]*rho[15]+0.004303314829119352*weight[5]*rho[15]+0.021516574145596764*weight[4]*rho[15]-0.012422599874998832*weight[3]*rho[15]+0.012422599874998832*weight[2]*rho[15]+0.037267799624996496*weight[1]*rho[15]+0.021516574145596764*weight[0]*rho[15]-0.06785714285714287*rho[14]*weight[14]-0.021825396825396828*rho[12]*weight[14]-0.011111111111111112*rho[11]*weight[14]+0.022360679774997897*rho[10]*weight[14]-0.01924500897298753*rho[9]*weight[14]+0.010309826235529031*rho[8]*weight[14]-0.004303314829119352*rho[6]*weight[14]+0.021516574145596764*rho[5]*weight[14]-0.021516574145596764*rho[4]*weight[14]+0.037267799624996496*rho[3]*weight[14]-0.012422599874998832*rho[2]*weight[14]-0.012422599874998832*rho[1]*weight[14]-0.021516574145596764*rho[0]*weight[14]-0.021825396825396828*weight[12]*rho[14]-0.011111111111111112*weight[11]*rho[14]+0.022360679774997897*weight[10]*rho[14]-0.01924500897298753*weight[9]*rho[14]+0.010309826235529031*weight[8]*rho[14]-0.004303314829119352*weight[6]*rho[14]+0.021516574145596764*weight[5]*rho[14]-0.021516574145596764*weight[4]*rho[14]+0.037267799624996496*weight[3]*rho[14]-0.012422599874998832*weight[2]*rho[14]-0.012422599874998832*weight[1]*rho[14]-0.021516574145596764*weight[0]*rho[14]-0.06785714285714287*rho[13]*weight[13]-0.011111111111111112*rho[12]*weight[13]-0.021825396825396828*rho[11]*weight[13]+0.022360679774997897*rho[10]*weight[13]-0.01924500897298753*rho[9]*weight[13]+0.010309826235529031*rho[7]*weight[13]+0.021516574145596764*rho[6]*weight[13]-0.004303314829119352*rho[5]*weight[13]-0.021516574145596764*rho[4]*weight[13]+0.037267799624996496*rho[3]*weight[13]-0.012422599874998832*rho[2]*weight[13]-0.012422599874998832*rho[1]*weight[13]-0.021516574145596764*rho[0]*weight[13]-0.011111111111111112*weight[12]*rho[13]-0.021825396825396828*weight[11]*rho[13]+0.022360679774997897*weight[10]*rho[13]-0.01924500897298753*weight[9]*rho[13]+0.010309826235529031*weight[7]*rho[13]+0.021516574145596764*weight[6]*rho[13]-0.004303314829119352*weight[5]*rho[13]-0.021516574145596764*weight[4]*rho[13]+0.037267799624996496*weight[3]*rho[13]-0.012422599874998832*weight[2]*rho[13]-0.012422599874998832*weight[1]*rho[13]-0.021516574145596764*weight[0]*rho[13]-0.06785714285714287*rho[12]*weight[12]+0.011111111111111112*rho[11]*weight[12]-0.022360679774997897*rho[10]*weight[12]-0.010309826235529031*rho[8]*weight[12]+0.01924500897298753*rho[7]*weight[12]-0.021516574145596764*rho[6]*weight[12]-0.021516574145596764*rho[5]*weight[12]-0.004303314829119352*rho[4]*weight[12]-0.012422599874998832*rho[3]*weight[12]+0.012422599874998832*rho[2]*weight[12]+0.037267799624996496*rho[1]*weight[12]+0.021516574145596764*rho[0]*weight[12]+0.011111111111111112*weight[11]*rho[12]-0.022360679774997897*weight[10]*rho[12]-0.010309826235529031*weight[8]*rho[12]+0.01924500897298753*weight[7]*rho[12]-0.021516574145596764*weight[6]*rho[12]-0.021516574145596764*weight[5]*rho[12]-0.004303314829119352*weight[4]*rho[12]-0.012422599874998832*weight[3]*rho[12]+0.012422599874998832*weight[2]*rho[12]+0.037267799624996496*weight[1]*rho[12]+0.021516574145596764*weight[0]*rho[12]-0.06785714285714287*rho[11]*weight[11]-0.022360679774997897*rho[10]*weight[11]+0.01924500897298753*rho[8]*weight[11]-0.010309826235529031*rho[7]*weight[11]-0.021516574145596764*rho[6]*weight[11]-0.021516574145596764*rho[5]*weight[11]-0.004303314829119352*rho[4]*weight[11]-0.012422599874998832*rho[3]*weight[11]+0.037267799624996496*rho[2]*weight[11]+0.012422599874998832*rho[1]*weight[11]+0.021516574145596764*rho[0]*weight[11]-0.022360679774997897*weight[10]*rho[11]+0.01924500897298753*weight[8]*rho[11]-0.010309826235529031*weight[7]*rho[11]-0.021516574145596764*weight[6]*rho[11]-0.021516574145596764*weight[5]*rho[11]-0.004303314829119352*weight[4]*rho[11]-0.012422599874998832*weight[3]*rho[11]+0.037267799624996496*weight[2]*rho[11]+0.012422599874998832*weight[1]*rho[11]+0.021516574145596764*weight[0]*rho[11]-0.025*rho[10]*weight[10]-0.02151657414559676*rho[9]*weight[10]-0.02151657414559676*rho[8]*weight[10]-0.02151657414559676*rho[7]*weight[10]+0.014433756729740645*rho[6]*weight[10]+0.014433756729740645*rho[5]*weight[10]-0.014433756729740645*rho[4]*weight[10]+0.025*rho[3]*weight[10]-0.025*rho[2]*weight[10]-0.025*rho[1]*weight[10]-0.024056261216234404*rho[0]*weight[10]-0.02151657414559676*weight[9]*rho[10]-0.02151657414559676*weight[8]*rho[10]-0.02151657414559676*weight[7]*rho[10]+0.014433756729740645*weight[6]*rho[10]+0.014433756729740645*weight[5]*rho[10]-0.014433756729740645*weight[4]*rho[10]+0.025*weight[3]*rho[10]-0.025*weight[2]*rho[10]-0.025*weight[1]*rho[10]-0.024056261216234404*weight[0]*rho[10]-0.10119047619047619*rho[9]*weight[9]-0.012422599874998833*rho[6]*weight[9]-0.012422599874998833*rho[5]*weight[9]+0.012422599874998833*rho[4]*weight[9]+0.02151657414559676*rho[3]*weight[9]+0.02151657414559676*rho[2]*weight[9]+0.02151657414559676*rho[1]*weight[9]+0.0372677996249965*rho[0]*weight[9]-0.012422599874998833*weight[6]*rho[9]-0.012422599874998833*weight[5]*rho[9]+0.012422599874998833*weight[4]*rho[9]+0.02151657414559676*weight[3]*rho[9]+0.02151657414559676*weight[2]*rho[9]+0.02151657414559676*weight[1]*rho[9]+0.0372677996249965*weight[0]*rho[9]-0.10119047619047619*rho[8]*weight[8]-0.012422599874998833*rho[6]*weight[8]-0.012422599874998833*rho[5]*weight[8]+0.012422599874998833*rho[4]*weight[8]-0.02151657414559676*rho[3]*weight[8]-0.02151657414559676*rho[2]*weight[8]+0.02151657414559676*rho[1]*weight[8]+0.0372677996249965*rho[0]*weight[8]-0.012422599874998833*weight[6]*rho[8]-0.012422599874998833*weight[5]*rho[8]+0.012422599874998833*weight[4]*rho[8]-0.02151657414559676*weight[3]*rho[8]-0.02151657414559676*weight[2]*rho[8]+0.02151657414559676*weight[1]*rho[8]+0.0372677996249965*weight[0]*rho[8]-0.10119047619047619*rho[7]*weight[7]-0.012422599874998833*rho[6]*weight[7]-0.012422599874998833*rho[5]*weight[7]+0.012422599874998833*rho[4]*weight[7]-0.02151657414559676*rho[3]*weight[7]+0.02151657414559676*rho[2]*weight[7]-0.02151657414559676*rho[1]*weight[7]+0.0372677996249965*rho[0]*weight[7]-0.012422599874998833*weight[6]*rho[7]-0.012422599874998833*weight[5]*rho[7]+0.012422599874998833*weight[4]*rho[7]-0.02151657414559676*weight[3]*rho[7]+0.02151657414559676*weight[2]*rho[7]-0.02151657414559676*weight[1]*rho[7]+0.0372677996249965*weight[0]*rho[7]-0.058333333333333334*rho[6]*weight[6]+0.025*rho[5]*weight[6]-0.025*rho[4]*weight[6]-0.004811252243246881*rho[3]*weight[6]+0.004811252243246881*rho[2]*weight[6]-0.024056261216234404*rho[1]*weight[6]-0.01388888888888889*rho[0]*weight[6]+0.025*weight[5]*rho[6]-0.025*weight[4]*rho[6]-0.004811252243246881*weight[3]*rho[6]+0.004811252243246881*weight[2]*rho[6]-0.024056261216234404*weight[1]*rho[6]-0.01388888888888889*weight[0]*rho[6]-0.058333333333333334*rho[5]*weight[5]-0.025*rho[4]*weight[5]-0.004811252243246881*rho[3]*weight[5]-0.024056261216234404*rho[2]*weight[5]+0.004811252243246881*rho[1]*weight[5]-0.01388888888888889*rho[0]*weight[5]-0.025*weight[4]*rho[5]-0.004811252243246881*weight[3]*rho[5]-0.024056261216234404*weight[2]*rho[5]+0.004811252243246881*weight[1]*rho[5]-0.01388888888888889*weight[0]*rho[5]-0.058333333333333334*rho[4]*weight[4]-0.024056261216234404*rho[3]*weight[4]-0.004811252243246881*rho[2]*weight[4]-0.004811252243246881*rho[1]*weight[4]+0.01388888888888889*rho[0]*weight[4]-0.024056261216234404*weight[3]*rho[4]-0.004811252243246881*weight[2]*rho[4]-0.004811252243246881*weight[1]*rho[4]+0.01388888888888889*weight[0]*rho[4]-0.09166666666666667*rho[3]*weight[3]-0.01388888888888889*rho[2]*weight[3]-0.01388888888888889*rho[1]*weight[3]+0.024056261216234404*rho[0]*weight[3]-0.01388888888888889*weight[2]*rho[3]-0.01388888888888889*weight[1]*rho[3]+0.024056261216234404*weight[0]*rho[3]-0.09166666666666667*rho[2]*weight[2]+0.01388888888888889*rho[1]*weight[2]-0.024056261216234404*rho[0]*weight[2]+0.01388888888888889*weight[1]*rho[2]-0.024056261216234404*weight[0]*rho[2]-0.09166666666666667*rho[1]*weight[1]-0.024056261216234404*rho[0]*weight[1]-0.024056261216234404*weight[0]*rho[1]-0.125*rho[0]*weight[0]; + bsrc[nodeOff+globalIdxs[7]] = 2.3717082451262845*phiBC[19]+2.3717082451262845*phiBC[18]+2.3717082451262845*phiBC[17]+1.3693063937629155*phiBC[16]+1.3693063937629155*phiBC[15]+1.3693063937629155*phiBC[14]+1.3693063937629155*phiBC[13]+1.3693063937629155*phiBC[12]+1.3693063937629155*phiBC[11]+1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]+1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]+0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; #endif #ifdef __CUDA_ARCH__ atomicAdd(&bsrc[nodeOff+globalIdxs[8]],0.11904761904761905*rho[19]*weight[19]-0.06873217490352689*rho[16]*weight[19]-0.06873217490352689*rho[15]*weight[19]+0.03849001794597506*rho[12]*weight[19]+0.03849001794597506*rho[11]*weight[19]+0.03968253968253969*rho[9]*weight[19]-0.022222222222222223*rho[8]*weight[19]-0.022222222222222223*rho[7]*weight[19]-0.074535599249993*rho[4]*weight[19]+0.04303314829119352*rho[2]*weight[19]+0.04303314829119352*rho[1]*weight[19]-0.024845199749997667*rho[0]*weight[19]-0.06873217490352689*weight[16]*rho[19]-0.06873217490352689*weight[15]*rho[19]+0.03849001794597506*weight[12]*rho[19]+0.03849001794597506*weight[11]*rho[19]+0.03968253968253969*weight[9]*rho[19]-0.022222222222222223*weight[8]*rho[19]-0.022222222222222223*weight[7]*rho[19]-0.074535599249993*weight[4]*rho[19]+0.04303314829119352*weight[2]*rho[19]+0.04303314829119352*weight[1]*rho[19]-0.024845199749997667*weight[0]*rho[19]+0.1*rho[18]*weight[18]+0.02666666666666667*rho[17]*weight[18]-0.05773502691896258*rho[14]*weight[18]-0.051639777949432225*rho[10]*weight[18]+0.029814239699997195*rho[6]*weight[18]+0.02666666666666667*weight[17]*rho[18]-0.05773502691896258*weight[14]*rho[18]-0.051639777949432225*weight[10]*rho[18]+0.029814239699997195*weight[6]*rho[18]+0.1*rho[17]*weight[17]-0.05773502691896258*rho[13]*weight[17]-0.051639777949432225*rho[10]*weight[17]+0.029814239699997195*rho[5]*weight[17]-0.05773502691896258*weight[13]*rho[17]-0.051639777949432225*weight[10]*rho[17]+0.029814239699997195*weight[5]*rho[17]+0.11904761904761905*rho[16]*weight[16]+0.03968253968253969*rho[15]*weight[16]-0.022222222222222223*rho[12]*weight[16]-0.06873217490352689*rho[9]*weight[16]+0.03849001794597506*rho[8]*weight[16]+0.04303314829119353*rho[4]*weight[16]-0.07453559924999299*rho[2]*weight[16]-0.024845199749997663*rho[1]*weight[16]+0.04303314829119353*rho[0]*weight[16]+0.03968253968253969*weight[15]*rho[16]-0.022222222222222223*weight[12]*rho[16]-0.06873217490352689*weight[9]*rho[16]+0.03849001794597506*weight[8]*rho[16]+0.04303314829119353*weight[4]*rho[16]-0.07453559924999299*weight[2]*rho[16]-0.024845199749997663*weight[1]*rho[16]+0.04303314829119353*weight[0]*rho[16]+0.11904761904761905*rho[15]*weight[15]-0.022222222222222223*rho[11]*weight[15]-0.06873217490352689*rho[9]*weight[15]+0.03849001794597506*rho[7]*weight[15]+0.04303314829119353*rho[4]*weight[15]-0.024845199749997663*rho[2]*weight[15]-0.07453559924999299*rho[1]*weight[15]+0.04303314829119353*rho[0]*weight[15]-0.022222222222222223*weight[11]*rho[15]-0.06873217490352689*weight[9]*rho[15]+0.03849001794597506*weight[7]*rho[15]+0.04303314829119353*weight[4]*rho[15]-0.024845199749997663*weight[2]*rho[15]-0.07453559924999299*weight[1]*rho[15]+0.04303314829119353*weight[0]*rho[15]+0.1*rho[14]*weight[14]+0.029814239699997195*rho[10]*weight[14]-0.05163977794943223*rho[6]*weight[14]+0.029814239699997195*weight[10]*rho[14]-0.05163977794943223*weight[6]*rho[14]+0.1*rho[13]*weight[13]+0.029814239699997195*rho[10]*weight[13]-0.05163977794943223*rho[5]*weight[13]+0.029814239699997195*weight[10]*rho[13]-0.05163977794943223*weight[5]*rho[13]+0.16666666666666669*rho[12]*weight[12]+0.044444444444444446*rho[11]*weight[12]-0.09622504486493764*rho[8]*weight[12]-0.08606629658238706*rho[4]*weight[12]+0.049690399499995326*rho[2]*weight[12]+0.044444444444444446*weight[11]*rho[12]-0.09622504486493764*weight[8]*rho[12]-0.08606629658238706*weight[4]*rho[12]+0.049690399499995326*weight[2]*rho[12]+0.16666666666666669*rho[11]*weight[11]-0.09622504486493764*rho[7]*weight[11]-0.08606629658238706*rho[4]*weight[11]+0.049690399499995326*rho[1]*weight[11]-0.09622504486493764*weight[7]*rho[11]-0.08606629658238706*weight[4]*rho[11]+0.049690399499995326*weight[1]*rho[11]+0.1*rho[10]*weight[10]-0.05773502691896258*rho[6]*weight[10]-0.05773502691896258*rho[5]*weight[10]+0.03333333333333333*rho[3]*weight[10]-0.05773502691896258*weight[6]*rho[10]-0.05773502691896258*weight[5]*rho[10]+0.03333333333333333*weight[3]*rho[10]+0.11904761904761905*rho[9]*weight[9]-0.024845199749997667*rho[4]*weight[9]+0.04303314829119352*rho[2]*weight[9]+0.04303314829119352*rho[1]*weight[9]-0.074535599249993*rho[0]*weight[9]-0.024845199749997667*weight[4]*rho[9]+0.04303314829119352*weight[2]*rho[9]+0.04303314829119352*weight[1]*rho[9]-0.074535599249993*weight[0]*rho[9]+0.16666666666666669*rho[8]*weight[8]+0.04969039949999533*rho[4]*weight[8]-0.08606629658238704*rho[2]*weight[8]+0.04969039949999533*weight[4]*rho[8]-0.08606629658238704*weight[2]*rho[8]+0.16666666666666669*rho[7]*weight[7]+0.04969039949999533*rho[4]*weight[7]-0.08606629658238704*rho[1]*weight[7]+0.04969039949999533*weight[4]*rho[7]-0.08606629658238704*weight[1]*rho[7]+0.1*rho[6]*weight[6]+0.03333333333333333*rho[5]*weight[6]-0.05773502691896258*rho[3]*weight[6]+0.03333333333333333*weight[5]*rho[6]-0.05773502691896258*weight[3]*rho[6]+0.1*rho[5]*weight[5]-0.05773502691896258*rho[3]*weight[5]-0.05773502691896258*weight[3]*rho[5]+0.16666666666666669*rho[4]*weight[4]-0.09622504486493762*rho[2]*weight[4]-0.09622504486493762*rho[1]*weight[4]+0.05555555555555556*rho[0]*weight[4]-0.09622504486493762*weight[2]*rho[4]-0.09622504486493762*weight[1]*rho[4]+0.05555555555555556*weight[0]*rho[4]+0.1*rho[3]*weight[3]+0.16666666666666669*rho[2]*weight[2]+0.05555555555555556*rho[1]*weight[2]-0.09622504486493762*rho[0]*weight[2]+0.05555555555555556*weight[1]*rho[2]-0.09622504486493762*weight[0]*rho[2]+0.16666666666666669*rho[1]*weight[1]-0.09622504486493762*rho[0]*weight[1]-0.09622504486493762*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]); @@ -2478,11 +3502,11 @@ GKYL_CU_DH void fem_parproj_src_stencil_weighted_3x_ser_p2_loz_nondirichletz(con } -GKYL_CU_DH void fem_parproj_src_stencil_weighted_3x_ser_p1_loz_dirichletz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +GKYL_CU_DH void fem_parproj_src_stencil_weighted_3x_ser_p1_loz_dirichlet_skinz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) { // rho: right side source. // weight: Weight in the projection operation. - // phiBC: Dirichlet boundary potential, given as a DG expansion in the ghost cell (volume). + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. // nodeOff: node offset (prob idx * global number of nodes). // globalIdxs: global linear index of each basis function/node in current cell. // bsrc: global right side source vector. @@ -2530,11 +3554,11 @@ GKYL_CU_DH void fem_parproj_src_stencil_weighted_3x_ser_p1_loz_dirichletz(const } -GKYL_CU_DH void fem_parproj_src_stencil_weighted_3x_ser_p2_loz_dirichletz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +GKYL_CU_DH void fem_parproj_src_stencil_weighted_3x_ser_p2_loz_dirichlet_skinz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) { // rho: right side source. // weight: Weight in the projection operation. - // phiBC: Dirichlet boundary potential, given as a DG expansion in the ghost cell (volume). + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. // nodeOff: node offset (prob idx * global number of nodes). // globalIdxs: global linear index of each basis function/node in current cell. // bsrc: global right side source vector. @@ -2646,7 +3670,7 @@ GKYL_CU_DH void fem_parproj_src_stencil_weighted_3x_ser_p1_upz_nondirichletz(con { // rho: right side source. // weight: Weight in the projection operation. - // phiBC: Dirichlet boundary potential, given as a DG expansion in the ghost cell (volume). + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. // nodeOff: node offset (prob idx * global number of nodes). // globalIdxs: global linear index of each basis function/node in current cell. // bsrc: global right side source vector. @@ -2698,7 +3722,7 @@ GKYL_CU_DH void fem_parproj_src_stencil_weighted_3x_ser_p2_upz_nondirichletz(con { // rho: right side source. // weight: Weight in the projection operation. - // phiBC: Dirichlet boundary potential, given as a DG expansion in the ghost cell (volume). + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. // nodeOff: node offset (prob idx * global number of nodes). // globalIdxs: global linear index of each basis function/node in current cell. // bsrc: global right side source vector. @@ -2806,11 +3830,175 @@ GKYL_CU_DH void fem_parproj_src_stencil_weighted_3x_ser_p2_upz_nondirichletz(con } -GKYL_CU_DH void fem_parproj_src_stencil_weighted_3x_ser_p1_upz_dirichletz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +GKYL_CU_DH void fem_parproj_src_stencil_weighted_3x_ser_p1_upz_dirichlet_ghostz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +{ + // rho: right side source. + // weight: Weight in the projection operation. + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. + // nodeOff: node offset (prob idx * global number of nodes). + // globalIdxs: global linear index of each basis function/node in current cell. + // bsrc: global right side source vector. + + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[0]],0.125*rho[7]*weight[7]-0.07216878364870322*rho[6]*weight[7]-0.07216878364870322*rho[5]*weight[7]-0.07216878364870322*rho[4]*weight[7]+0.041666666666666664*rho[3]*weight[7]+0.041666666666666664*rho[2]*weight[7]+0.041666666666666664*rho[1]*weight[7]-0.024056261216234404*rho[0]*weight[7]-0.07216878364870322*weight[6]*rho[7]-0.07216878364870322*weight[5]*rho[7]-0.07216878364870322*weight[4]*rho[7]+0.041666666666666664*weight[3]*rho[7]+0.041666666666666664*weight[2]*rho[7]+0.041666666666666664*weight[1]*rho[7]-0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]+0.041666666666666664*rho[5]*weight[6]+0.041666666666666664*rho[4]*weight[6]-0.07216878364870322*rho[3]*weight[6]-0.07216878364870322*rho[2]*weight[6]-0.024056261216234404*rho[1]*weight[6]+0.041666666666666664*rho[0]*weight[6]+0.041666666666666664*weight[5]*rho[6]+0.041666666666666664*weight[4]*rho[6]-0.07216878364870322*weight[3]*rho[6]-0.07216878364870322*weight[2]*rho[6]-0.024056261216234404*weight[1]*rho[6]+0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]+0.041666666666666664*rho[4]*weight[5]-0.07216878364870322*rho[3]*weight[5]-0.024056261216234404*rho[2]*weight[5]-0.07216878364870322*rho[1]*weight[5]+0.041666666666666664*rho[0]*weight[5]+0.041666666666666664*weight[4]*rho[5]-0.07216878364870322*weight[3]*rho[5]-0.024056261216234404*weight[2]*rho[5]-0.07216878364870322*weight[1]*rho[5]+0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]-0.024056261216234404*rho[3]*weight[4]-0.07216878364870322*rho[2]*weight[4]-0.07216878364870322*rho[1]*weight[4]+0.041666666666666664*rho[0]*weight[4]-0.024056261216234404*weight[3]*rho[4]-0.07216878364870322*weight[2]*rho[4]-0.07216878364870322*weight[1]*rho[4]+0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]+0.041666666666666664*rho[2]*weight[3]+0.041666666666666664*rho[1]*weight[3]-0.07216878364870322*rho[0]*weight[3]+0.041666666666666664*weight[2]*rho[3]+0.041666666666666664*weight[1]*rho[3]-0.07216878364870322*weight[0]*rho[3]+0.125*rho[2]*weight[2]+0.041666666666666664*rho[1]*weight[2]-0.07216878364870322*rho[0]*weight[2]+0.041666666666666664*weight[1]*rho[2]-0.07216878364870322*weight[0]*rho[2]+0.125*rho[1]*weight[1]-0.07216878364870322*rho[0]*weight[1]-0.07216878364870322*weight[0]*rho[1]+0.125*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[0]] += 0.125*rho[7]*weight[7]-0.07216878364870322*rho[6]*weight[7]-0.07216878364870322*rho[5]*weight[7]-0.07216878364870322*rho[4]*weight[7]+0.041666666666666664*rho[3]*weight[7]+0.041666666666666664*rho[2]*weight[7]+0.041666666666666664*rho[1]*weight[7]-0.024056261216234404*rho[0]*weight[7]-0.07216878364870322*weight[6]*rho[7]-0.07216878364870322*weight[5]*rho[7]-0.07216878364870322*weight[4]*rho[7]+0.041666666666666664*weight[3]*rho[7]+0.041666666666666664*weight[2]*rho[7]+0.041666666666666664*weight[1]*rho[7]-0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]+0.041666666666666664*rho[5]*weight[6]+0.041666666666666664*rho[4]*weight[6]-0.07216878364870322*rho[3]*weight[6]-0.07216878364870322*rho[2]*weight[6]-0.024056261216234404*rho[1]*weight[6]+0.041666666666666664*rho[0]*weight[6]+0.041666666666666664*weight[5]*rho[6]+0.041666666666666664*weight[4]*rho[6]-0.07216878364870322*weight[3]*rho[6]-0.07216878364870322*weight[2]*rho[6]-0.024056261216234404*weight[1]*rho[6]+0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]+0.041666666666666664*rho[4]*weight[5]-0.07216878364870322*rho[3]*weight[5]-0.024056261216234404*rho[2]*weight[5]-0.07216878364870322*rho[1]*weight[5]+0.041666666666666664*rho[0]*weight[5]+0.041666666666666664*weight[4]*rho[5]-0.07216878364870322*weight[3]*rho[5]-0.024056261216234404*weight[2]*rho[5]-0.07216878364870322*weight[1]*rho[5]+0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]-0.024056261216234404*rho[3]*weight[4]-0.07216878364870322*rho[2]*weight[4]-0.07216878364870322*rho[1]*weight[4]+0.041666666666666664*rho[0]*weight[4]-0.024056261216234404*weight[3]*rho[4]-0.07216878364870322*weight[2]*rho[4]-0.07216878364870322*weight[1]*rho[4]+0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]+0.041666666666666664*rho[2]*weight[3]+0.041666666666666664*rho[1]*weight[3]-0.07216878364870322*rho[0]*weight[3]+0.041666666666666664*weight[2]*rho[3]+0.041666666666666664*weight[1]*rho[3]-0.07216878364870322*weight[0]*rho[3]+0.125*rho[2]*weight[2]+0.041666666666666664*rho[1]*weight[2]-0.07216878364870322*rho[0]*weight[2]+0.041666666666666664*weight[1]*rho[2]-0.07216878364870322*weight[0]*rho[2]+0.125*rho[1]*weight[1]-0.07216878364870322*rho[0]*weight[1]-0.07216878364870322*weight[0]*rho[1]+0.125*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[1]],0.125*rho[7]*weight[7]+0.07216878364870322*rho[6]*weight[7]-0.07216878364870322*rho[5]*weight[7]-0.07216878364870322*rho[4]*weight[7]-0.041666666666666664*rho[3]*weight[7]-0.041666666666666664*rho[2]*weight[7]+0.041666666666666664*rho[1]*weight[7]+0.024056261216234404*rho[0]*weight[7]+0.07216878364870322*weight[6]*rho[7]-0.07216878364870322*weight[5]*rho[7]-0.07216878364870322*weight[4]*rho[7]-0.041666666666666664*weight[3]*rho[7]-0.041666666666666664*weight[2]*rho[7]+0.041666666666666664*weight[1]*rho[7]+0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]-0.041666666666666664*rho[5]*weight[6]-0.041666666666666664*rho[4]*weight[6]-0.07216878364870322*rho[3]*weight[6]-0.07216878364870322*rho[2]*weight[6]+0.024056261216234404*rho[1]*weight[6]+0.041666666666666664*rho[0]*weight[6]-0.041666666666666664*weight[5]*rho[6]-0.041666666666666664*weight[4]*rho[6]-0.07216878364870322*weight[3]*rho[6]-0.07216878364870322*weight[2]*rho[6]+0.024056261216234404*weight[1]*rho[6]+0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]+0.041666666666666664*rho[4]*weight[5]+0.07216878364870322*rho[3]*weight[5]+0.024056261216234404*rho[2]*weight[5]-0.07216878364870322*rho[1]*weight[5]-0.041666666666666664*rho[0]*weight[5]+0.041666666666666664*weight[4]*rho[5]+0.07216878364870322*weight[3]*rho[5]+0.024056261216234404*weight[2]*rho[5]-0.07216878364870322*weight[1]*rho[5]-0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]+0.024056261216234404*rho[3]*weight[4]+0.07216878364870322*rho[2]*weight[4]-0.07216878364870322*rho[1]*weight[4]-0.041666666666666664*rho[0]*weight[4]+0.024056261216234404*weight[3]*rho[4]+0.07216878364870322*weight[2]*rho[4]-0.07216878364870322*weight[1]*rho[4]-0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]+0.041666666666666664*rho[2]*weight[3]-0.041666666666666664*rho[1]*weight[3]-0.07216878364870322*rho[0]*weight[3]+0.041666666666666664*weight[2]*rho[3]-0.041666666666666664*weight[1]*rho[3]-0.07216878364870322*weight[0]*rho[3]+0.125*rho[2]*weight[2]-0.041666666666666664*rho[1]*weight[2]-0.07216878364870322*rho[0]*weight[2]-0.041666666666666664*weight[1]*rho[2]-0.07216878364870322*weight[0]*rho[2]+0.125*rho[1]*weight[1]+0.07216878364870322*rho[0]*weight[1]+0.07216878364870322*weight[0]*rho[1]+0.125*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[1]] += 0.125*rho[7]*weight[7]+0.07216878364870322*rho[6]*weight[7]-0.07216878364870322*rho[5]*weight[7]-0.07216878364870322*rho[4]*weight[7]-0.041666666666666664*rho[3]*weight[7]-0.041666666666666664*rho[2]*weight[7]+0.041666666666666664*rho[1]*weight[7]+0.024056261216234404*rho[0]*weight[7]+0.07216878364870322*weight[6]*rho[7]-0.07216878364870322*weight[5]*rho[7]-0.07216878364870322*weight[4]*rho[7]-0.041666666666666664*weight[3]*rho[7]-0.041666666666666664*weight[2]*rho[7]+0.041666666666666664*weight[1]*rho[7]+0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]-0.041666666666666664*rho[5]*weight[6]-0.041666666666666664*rho[4]*weight[6]-0.07216878364870322*rho[3]*weight[6]-0.07216878364870322*rho[2]*weight[6]+0.024056261216234404*rho[1]*weight[6]+0.041666666666666664*rho[0]*weight[6]-0.041666666666666664*weight[5]*rho[6]-0.041666666666666664*weight[4]*rho[6]-0.07216878364870322*weight[3]*rho[6]-0.07216878364870322*weight[2]*rho[6]+0.024056261216234404*weight[1]*rho[6]+0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]+0.041666666666666664*rho[4]*weight[5]+0.07216878364870322*rho[3]*weight[5]+0.024056261216234404*rho[2]*weight[5]-0.07216878364870322*rho[1]*weight[5]-0.041666666666666664*rho[0]*weight[5]+0.041666666666666664*weight[4]*rho[5]+0.07216878364870322*weight[3]*rho[5]+0.024056261216234404*weight[2]*rho[5]-0.07216878364870322*weight[1]*rho[5]-0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]+0.024056261216234404*rho[3]*weight[4]+0.07216878364870322*rho[2]*weight[4]-0.07216878364870322*rho[1]*weight[4]-0.041666666666666664*rho[0]*weight[4]+0.024056261216234404*weight[3]*rho[4]+0.07216878364870322*weight[2]*rho[4]-0.07216878364870322*weight[1]*rho[4]-0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]+0.041666666666666664*rho[2]*weight[3]-0.041666666666666664*rho[1]*weight[3]-0.07216878364870322*rho[0]*weight[3]+0.041666666666666664*weight[2]*rho[3]-0.041666666666666664*weight[1]*rho[3]-0.07216878364870322*weight[0]*rho[3]+0.125*rho[2]*weight[2]-0.041666666666666664*rho[1]*weight[2]-0.07216878364870322*rho[0]*weight[2]-0.041666666666666664*weight[1]*rho[2]-0.07216878364870322*weight[0]*rho[2]+0.125*rho[1]*weight[1]+0.07216878364870322*rho[0]*weight[1]+0.07216878364870322*weight[0]*rho[1]+0.125*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[2]],0.125*rho[7]*weight[7]-0.07216878364870322*rho[6]*weight[7]+0.07216878364870322*rho[5]*weight[7]-0.07216878364870322*rho[4]*weight[7]-0.041666666666666664*rho[3]*weight[7]+0.041666666666666664*rho[2]*weight[7]-0.041666666666666664*rho[1]*weight[7]+0.024056261216234404*rho[0]*weight[7]-0.07216878364870322*weight[6]*rho[7]+0.07216878364870322*weight[5]*rho[7]-0.07216878364870322*weight[4]*rho[7]-0.041666666666666664*weight[3]*rho[7]+0.041666666666666664*weight[2]*rho[7]-0.041666666666666664*weight[1]*rho[7]+0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]-0.041666666666666664*rho[5]*weight[6]+0.041666666666666664*rho[4]*weight[6]+0.07216878364870322*rho[3]*weight[6]-0.07216878364870322*rho[2]*weight[6]+0.024056261216234404*rho[1]*weight[6]-0.041666666666666664*rho[0]*weight[6]-0.041666666666666664*weight[5]*rho[6]+0.041666666666666664*weight[4]*rho[6]+0.07216878364870322*weight[3]*rho[6]-0.07216878364870322*weight[2]*rho[6]+0.024056261216234404*weight[1]*rho[6]-0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]-0.041666666666666664*rho[4]*weight[5]-0.07216878364870322*rho[3]*weight[5]+0.024056261216234404*rho[2]*weight[5]-0.07216878364870322*rho[1]*weight[5]+0.041666666666666664*rho[0]*weight[5]-0.041666666666666664*weight[4]*rho[5]-0.07216878364870322*weight[3]*rho[5]+0.024056261216234404*weight[2]*rho[5]-0.07216878364870322*weight[1]*rho[5]+0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]+0.024056261216234404*rho[3]*weight[4]-0.07216878364870322*rho[2]*weight[4]+0.07216878364870322*rho[1]*weight[4]-0.041666666666666664*rho[0]*weight[4]+0.024056261216234404*weight[3]*rho[4]-0.07216878364870322*weight[2]*rho[4]+0.07216878364870322*weight[1]*rho[4]-0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]-0.041666666666666664*rho[2]*weight[3]+0.041666666666666664*rho[1]*weight[3]-0.07216878364870322*rho[0]*weight[3]-0.041666666666666664*weight[2]*rho[3]+0.041666666666666664*weight[1]*rho[3]-0.07216878364870322*weight[0]*rho[3]+0.125*rho[2]*weight[2]-0.041666666666666664*rho[1]*weight[2]+0.07216878364870322*rho[0]*weight[2]-0.041666666666666664*weight[1]*rho[2]+0.07216878364870322*weight[0]*rho[2]+0.125*rho[1]*weight[1]-0.07216878364870322*rho[0]*weight[1]-0.07216878364870322*weight[0]*rho[1]+0.125*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[2]] += 0.125*rho[7]*weight[7]-0.07216878364870322*rho[6]*weight[7]+0.07216878364870322*rho[5]*weight[7]-0.07216878364870322*rho[4]*weight[7]-0.041666666666666664*rho[3]*weight[7]+0.041666666666666664*rho[2]*weight[7]-0.041666666666666664*rho[1]*weight[7]+0.024056261216234404*rho[0]*weight[7]-0.07216878364870322*weight[6]*rho[7]+0.07216878364870322*weight[5]*rho[7]-0.07216878364870322*weight[4]*rho[7]-0.041666666666666664*weight[3]*rho[7]+0.041666666666666664*weight[2]*rho[7]-0.041666666666666664*weight[1]*rho[7]+0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]-0.041666666666666664*rho[5]*weight[6]+0.041666666666666664*rho[4]*weight[6]+0.07216878364870322*rho[3]*weight[6]-0.07216878364870322*rho[2]*weight[6]+0.024056261216234404*rho[1]*weight[6]-0.041666666666666664*rho[0]*weight[6]-0.041666666666666664*weight[5]*rho[6]+0.041666666666666664*weight[4]*rho[6]+0.07216878364870322*weight[3]*rho[6]-0.07216878364870322*weight[2]*rho[6]+0.024056261216234404*weight[1]*rho[6]-0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]-0.041666666666666664*rho[4]*weight[5]-0.07216878364870322*rho[3]*weight[5]+0.024056261216234404*rho[2]*weight[5]-0.07216878364870322*rho[1]*weight[5]+0.041666666666666664*rho[0]*weight[5]-0.041666666666666664*weight[4]*rho[5]-0.07216878364870322*weight[3]*rho[5]+0.024056261216234404*weight[2]*rho[5]-0.07216878364870322*weight[1]*rho[5]+0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]+0.024056261216234404*rho[3]*weight[4]-0.07216878364870322*rho[2]*weight[4]+0.07216878364870322*rho[1]*weight[4]-0.041666666666666664*rho[0]*weight[4]+0.024056261216234404*weight[3]*rho[4]-0.07216878364870322*weight[2]*rho[4]+0.07216878364870322*weight[1]*rho[4]-0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]-0.041666666666666664*rho[2]*weight[3]+0.041666666666666664*rho[1]*weight[3]-0.07216878364870322*rho[0]*weight[3]-0.041666666666666664*weight[2]*rho[3]+0.041666666666666664*weight[1]*rho[3]-0.07216878364870322*weight[0]*rho[3]+0.125*rho[2]*weight[2]-0.041666666666666664*rho[1]*weight[2]+0.07216878364870322*rho[0]*weight[2]-0.041666666666666664*weight[1]*rho[2]+0.07216878364870322*weight[0]*rho[2]+0.125*rho[1]*weight[1]-0.07216878364870322*rho[0]*weight[1]-0.07216878364870322*weight[0]*rho[1]+0.125*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[3]],0.125*rho[7]*weight[7]+0.07216878364870322*rho[6]*weight[7]+0.07216878364870322*rho[5]*weight[7]-0.07216878364870322*rho[4]*weight[7]+0.041666666666666664*rho[3]*weight[7]-0.041666666666666664*rho[2]*weight[7]-0.041666666666666664*rho[1]*weight[7]-0.024056261216234404*rho[0]*weight[7]+0.07216878364870322*weight[6]*rho[7]+0.07216878364870322*weight[5]*rho[7]-0.07216878364870322*weight[4]*rho[7]+0.041666666666666664*weight[3]*rho[7]-0.041666666666666664*weight[2]*rho[7]-0.041666666666666664*weight[1]*rho[7]-0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]+0.041666666666666664*rho[5]*weight[6]-0.041666666666666664*rho[4]*weight[6]+0.07216878364870322*rho[3]*weight[6]-0.07216878364870322*rho[2]*weight[6]-0.024056261216234404*rho[1]*weight[6]-0.041666666666666664*rho[0]*weight[6]+0.041666666666666664*weight[5]*rho[6]-0.041666666666666664*weight[4]*rho[6]+0.07216878364870322*weight[3]*rho[6]-0.07216878364870322*weight[2]*rho[6]-0.024056261216234404*weight[1]*rho[6]-0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]-0.041666666666666664*rho[4]*weight[5]+0.07216878364870322*rho[3]*weight[5]-0.024056261216234404*rho[2]*weight[5]-0.07216878364870322*rho[1]*weight[5]-0.041666666666666664*rho[0]*weight[5]-0.041666666666666664*weight[4]*rho[5]+0.07216878364870322*weight[3]*rho[5]-0.024056261216234404*weight[2]*rho[5]-0.07216878364870322*weight[1]*rho[5]-0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]-0.024056261216234404*rho[3]*weight[4]+0.07216878364870322*rho[2]*weight[4]+0.07216878364870322*rho[1]*weight[4]+0.041666666666666664*rho[0]*weight[4]-0.024056261216234404*weight[3]*rho[4]+0.07216878364870322*weight[2]*rho[4]+0.07216878364870322*weight[1]*rho[4]+0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]-0.041666666666666664*rho[2]*weight[3]-0.041666666666666664*rho[1]*weight[3]-0.07216878364870322*rho[0]*weight[3]-0.041666666666666664*weight[2]*rho[3]-0.041666666666666664*weight[1]*rho[3]-0.07216878364870322*weight[0]*rho[3]+0.125*rho[2]*weight[2]+0.041666666666666664*rho[1]*weight[2]+0.07216878364870322*rho[0]*weight[2]+0.041666666666666664*weight[1]*rho[2]+0.07216878364870322*weight[0]*rho[2]+0.125*rho[1]*weight[1]+0.07216878364870322*rho[0]*weight[1]+0.07216878364870322*weight[0]*rho[1]+0.125*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[3]] += 0.125*rho[7]*weight[7]+0.07216878364870322*rho[6]*weight[7]+0.07216878364870322*rho[5]*weight[7]-0.07216878364870322*rho[4]*weight[7]+0.041666666666666664*rho[3]*weight[7]-0.041666666666666664*rho[2]*weight[7]-0.041666666666666664*rho[1]*weight[7]-0.024056261216234404*rho[0]*weight[7]+0.07216878364870322*weight[6]*rho[7]+0.07216878364870322*weight[5]*rho[7]-0.07216878364870322*weight[4]*rho[7]+0.041666666666666664*weight[3]*rho[7]-0.041666666666666664*weight[2]*rho[7]-0.041666666666666664*weight[1]*rho[7]-0.024056261216234404*weight[0]*rho[7]+0.125*rho[6]*weight[6]+0.041666666666666664*rho[5]*weight[6]-0.041666666666666664*rho[4]*weight[6]+0.07216878364870322*rho[3]*weight[6]-0.07216878364870322*rho[2]*weight[6]-0.024056261216234404*rho[1]*weight[6]-0.041666666666666664*rho[0]*weight[6]+0.041666666666666664*weight[5]*rho[6]-0.041666666666666664*weight[4]*rho[6]+0.07216878364870322*weight[3]*rho[6]-0.07216878364870322*weight[2]*rho[6]-0.024056261216234404*weight[1]*rho[6]-0.041666666666666664*weight[0]*rho[6]+0.125*rho[5]*weight[5]-0.041666666666666664*rho[4]*weight[5]+0.07216878364870322*rho[3]*weight[5]-0.024056261216234404*rho[2]*weight[5]-0.07216878364870322*rho[1]*weight[5]-0.041666666666666664*rho[0]*weight[5]-0.041666666666666664*weight[4]*rho[5]+0.07216878364870322*weight[3]*rho[5]-0.024056261216234404*weight[2]*rho[5]-0.07216878364870322*weight[1]*rho[5]-0.041666666666666664*weight[0]*rho[5]+0.125*rho[4]*weight[4]-0.024056261216234404*rho[3]*weight[4]+0.07216878364870322*rho[2]*weight[4]+0.07216878364870322*rho[1]*weight[4]+0.041666666666666664*rho[0]*weight[4]-0.024056261216234404*weight[3]*rho[4]+0.07216878364870322*weight[2]*rho[4]+0.07216878364870322*weight[1]*rho[4]+0.041666666666666664*weight[0]*rho[4]+0.125*rho[3]*weight[3]-0.041666666666666664*rho[2]*weight[3]-0.041666666666666664*rho[1]*weight[3]-0.07216878364870322*rho[0]*weight[3]-0.041666666666666664*weight[2]*rho[3]-0.041666666666666664*weight[1]*rho[3]-0.07216878364870322*weight[0]*rho[3]+0.125*rho[2]*weight[2]+0.041666666666666664*rho[1]*weight[2]+0.07216878364870322*rho[0]*weight[2]+0.041666666666666664*weight[1]*rho[2]+0.07216878364870322*weight[0]*rho[2]+0.125*rho[1]*weight[1]+0.07216878364870322*rho[0]*weight[1]+0.07216878364870322*weight[0]*rho[1]+0.125*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[4]],__double_as_longlong(-(1.8371173070873836*phiBC[7])+1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); + #else + bsrc[nodeOff+globalIdxs[4]] = -(1.8371173070873836*phiBC[7])+1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[5]],__double_as_longlong(1.8371173070873836*phiBC[7]+1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); + #else + bsrc[nodeOff+globalIdxs[5]] = 1.8371173070873836*phiBC[7]+1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[6]],__double_as_longlong(1.8371173070873836*phiBC[7]-1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); + #else + bsrc[nodeOff+globalIdxs[6]] = 1.8371173070873836*phiBC[7]-1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[7]],__double_as_longlong(-(1.8371173070873836*phiBC[7])-1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); + #else + bsrc[nodeOff+globalIdxs[7]] = -(1.8371173070873836*phiBC[7])-1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; + #endif + +} + +GKYL_CU_DH void fem_parproj_src_stencil_weighted_3x_ser_p2_upz_dirichlet_ghostz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +{ + // rho: right side source. + // weight: Weight in the projection operation. + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. + // nodeOff: node offset (prob idx * global number of nodes). + // globalIdxs: global linear index of each basis function/node in current cell. + // bsrc: global right side source vector. + + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[0]],-(0.034523809523809526*rho[19]*weight[19])+0.02*rho[18]*weight[19]+0.02*rho[17]*weight[19]-0.008935182737458497*rho[16]*weight[19]-0.008935182737458497*rho[15]*weight[19]-0.01924500897298753*rho[14]*weight[19]-0.01924500897298753*rho[13]*weight[19]-0.01924500897298753*rho[12]*weight[19]-0.01924500897298753*rho[11]*weight[19]-0.012909944487358056*rho[10]*weight[19]+0.021825396825396828*rho[9]*weight[19]+0.011111111111111112*rho[8]*weight[19]+0.011111111111111112*rho[7]*weight[19]+0.022360679774997897*rho[6]*weight[19]+0.022360679774997897*rho[5]*weight[19]+0.0372677996249965*rho[4]*weight[19]-0.02151657414559676*rho[3]*weight[19]-0.02151657414559676*rho[2]*weight[19]-0.02151657414559676*rho[1]*weight[19]+0.012422599874998833*rho[0]*weight[19]+0.02*weight[18]*rho[19]+0.02*weight[17]*rho[19]-0.008935182737458497*weight[16]*rho[19]-0.008935182737458497*weight[15]*rho[19]-0.01924500897298753*weight[14]*rho[19]-0.01924500897298753*weight[13]*rho[19]-0.01924500897298753*weight[12]*rho[19]-0.01924500897298753*weight[11]*rho[19]-0.012909944487358056*weight[10]*rho[19]+0.021825396825396828*weight[9]*rho[19]+0.011111111111111112*weight[8]*rho[19]+0.011111111111111112*weight[7]*rho[19]+0.022360679774997897*weight[6]*rho[19]+0.022360679774997897*weight[5]*rho[19]+0.0372677996249965*weight[4]*rho[19]-0.02151657414559676*weight[3]*rho[19]-0.02151657414559676*weight[2]*rho[19]-0.02151657414559676*weight[1]*rho[19]+0.012422599874998833*weight[0]*rho[19]-0.034523809523809526*rho[18]*weight[18]+0.02*rho[17]*weight[18]-0.01924500897298753*rho[16]*weight[18]-0.01924500897298753*rho[15]*weight[18]-0.008935182737458497*rho[14]*weight[18]-0.01924500897298753*rho[13]*weight[18]-0.008935182737458497*rho[12]*weight[18]-0.01924500897298753*rho[11]*weight[18]-0.012909944487358056*rho[10]*weight[18]+0.011111111111111112*rho[9]*weight[18]+0.021825396825396828*rho[8]*weight[18]+0.011111111111111112*rho[7]*weight[18]+0.022360679774997897*rho[6]*weight[18]+0.0372677996249965*rho[5]*weight[18]+0.022360679774997897*rho[4]*weight[18]-0.02151657414559676*rho[3]*weight[18]-0.02151657414559676*rho[2]*weight[18]-0.02151657414559676*rho[1]*weight[18]+0.012422599874998833*rho[0]*weight[18]+0.02*weight[17]*rho[18]-0.01924500897298753*weight[16]*rho[18]-0.01924500897298753*weight[15]*rho[18]-0.008935182737458497*weight[14]*rho[18]-0.01924500897298753*weight[13]*rho[18]-0.008935182737458497*weight[12]*rho[18]-0.01924500897298753*weight[11]*rho[18]-0.012909944487358056*weight[10]*rho[18]+0.011111111111111112*weight[9]*rho[18]+0.021825396825396828*weight[8]*rho[18]+0.011111111111111112*weight[7]*rho[18]+0.022360679774997897*weight[6]*rho[18]+0.0372677996249965*weight[5]*rho[18]+0.022360679774997897*weight[4]*rho[18]-0.02151657414559676*weight[3]*rho[18]-0.02151657414559676*weight[2]*rho[18]-0.02151657414559676*weight[1]*rho[18]+0.012422599874998833*weight[0]*rho[18]-0.034523809523809526*rho[17]*weight[17]-0.01924500897298753*rho[16]*weight[17]-0.01924500897298753*rho[15]*weight[17]-0.01924500897298753*rho[14]*weight[17]-0.008935182737458497*rho[13]*weight[17]-0.01924500897298753*rho[12]*weight[17]-0.008935182737458497*rho[11]*weight[17]-0.012909944487358056*rho[10]*weight[17]+0.011111111111111112*rho[9]*weight[17]+0.011111111111111112*rho[8]*weight[17]+0.021825396825396828*rho[7]*weight[17]+0.0372677996249965*rho[6]*weight[17]+0.022360679774997897*rho[5]*weight[17]+0.022360679774997897*rho[4]*weight[17]-0.02151657414559676*rho[3]*weight[17]-0.02151657414559676*rho[2]*weight[17]-0.02151657414559676*rho[1]*weight[17]+0.012422599874998833*rho[0]*weight[17]-0.01924500897298753*weight[16]*rho[17]-0.01924500897298753*weight[15]*rho[17]-0.01924500897298753*weight[14]*rho[17]-0.008935182737458497*weight[13]*rho[17]-0.01924500897298753*weight[12]*rho[17]-0.008935182737458497*weight[11]*rho[17]-0.012909944487358056*weight[10]*rho[17]+0.011111111111111112*weight[9]*rho[17]+0.011111111111111112*weight[8]*rho[17]+0.021825396825396828*weight[7]*rho[17]+0.0372677996249965*weight[6]*rho[17]+0.022360679774997897*weight[5]*rho[17]+0.022360679774997897*weight[4]*rho[17]-0.02151657414559676*weight[3]*rho[17]-0.02151657414559676*weight[2]*rho[17]-0.02151657414559676*weight[1]*rho[17]+0.012422599874998833*weight[0]*rho[17]-0.06785714285714287*rho[16]*weight[16]+0.021825396825396828*rho[15]*weight[16]+0.011111111111111112*rho[14]*weight[16]+0.011111111111111112*rho[13]*weight[16]+0.011111111111111112*rho[12]*weight[16]+0.022360679774997897*rho[10]*weight[16]+0.010309826235529031*rho[9]*weight[16]-0.01924500897298753*rho[8]*weight[16]+0.004303314829119352*rho[6]*weight[16]-0.021516574145596764*rho[5]*weight[16]-0.021516574145596764*rho[4]*weight[16]+0.012422599874998832*rho[3]*weight[16]+0.037267799624996496*rho[2]*weight[16]+0.012422599874998832*rho[1]*weight[16]-0.021516574145596764*rho[0]*weight[16]+0.021825396825396828*weight[15]*rho[16]+0.011111111111111112*weight[14]*rho[16]+0.011111111111111112*weight[13]*rho[16]+0.011111111111111112*weight[12]*rho[16]+0.022360679774997897*weight[10]*rho[16]+0.010309826235529031*weight[9]*rho[16]-0.01924500897298753*weight[8]*rho[16]+0.004303314829119352*weight[6]*rho[16]-0.021516574145596764*weight[5]*rho[16]-0.021516574145596764*weight[4]*rho[16]+0.012422599874998832*weight[3]*rho[16]+0.037267799624996496*weight[2]*rho[16]+0.012422599874998832*weight[1]*rho[16]-0.021516574145596764*weight[0]*rho[16]-0.06785714285714287*rho[15]*weight[15]+0.011111111111111112*rho[14]*weight[15]+0.011111111111111112*rho[13]*weight[15]+0.011111111111111112*rho[11]*weight[15]+0.022360679774997897*rho[10]*weight[15]+0.010309826235529031*rho[9]*weight[15]-0.01924500897298753*rho[7]*weight[15]-0.021516574145596764*rho[6]*weight[15]+0.004303314829119352*rho[5]*weight[15]-0.021516574145596764*rho[4]*weight[15]+0.012422599874998832*rho[3]*weight[15]+0.012422599874998832*rho[2]*weight[15]+0.037267799624996496*rho[1]*weight[15]-0.021516574145596764*rho[0]*weight[15]+0.011111111111111112*weight[14]*rho[15]+0.011111111111111112*weight[13]*rho[15]+0.011111111111111112*weight[11]*rho[15]+0.022360679774997897*weight[10]*rho[15]+0.010309826235529031*weight[9]*rho[15]-0.01924500897298753*weight[7]*rho[15]-0.021516574145596764*weight[6]*rho[15]+0.004303314829119352*weight[5]*rho[15]-0.021516574145596764*weight[4]*rho[15]+0.012422599874998832*weight[3]*rho[15]+0.012422599874998832*weight[2]*rho[15]+0.037267799624996496*weight[1]*rho[15]-0.021516574145596764*weight[0]*rho[15]-0.06785714285714287*rho[14]*weight[14]+0.021825396825396828*rho[12]*weight[14]+0.011111111111111112*rho[11]*weight[14]+0.022360679774997897*rho[10]*weight[14]-0.01924500897298753*rho[9]*weight[14]+0.010309826235529031*rho[8]*weight[14]+0.004303314829119352*rho[6]*weight[14]-0.021516574145596764*rho[5]*weight[14]-0.021516574145596764*rho[4]*weight[14]+0.037267799624996496*rho[3]*weight[14]+0.012422599874998832*rho[2]*weight[14]+0.012422599874998832*rho[1]*weight[14]-0.021516574145596764*rho[0]*weight[14]+0.021825396825396828*weight[12]*rho[14]+0.011111111111111112*weight[11]*rho[14]+0.022360679774997897*weight[10]*rho[14]-0.01924500897298753*weight[9]*rho[14]+0.010309826235529031*weight[8]*rho[14]+0.004303314829119352*weight[6]*rho[14]-0.021516574145596764*weight[5]*rho[14]-0.021516574145596764*weight[4]*rho[14]+0.037267799624996496*weight[3]*rho[14]+0.012422599874998832*weight[2]*rho[14]+0.012422599874998832*weight[1]*rho[14]-0.021516574145596764*weight[0]*rho[14]-0.06785714285714287*rho[13]*weight[13]+0.011111111111111112*rho[12]*weight[13]+0.021825396825396828*rho[11]*weight[13]+0.022360679774997897*rho[10]*weight[13]-0.01924500897298753*rho[9]*weight[13]+0.010309826235529031*rho[7]*weight[13]-0.021516574145596764*rho[6]*weight[13]+0.004303314829119352*rho[5]*weight[13]-0.021516574145596764*rho[4]*weight[13]+0.037267799624996496*rho[3]*weight[13]+0.012422599874998832*rho[2]*weight[13]+0.012422599874998832*rho[1]*weight[13]-0.021516574145596764*rho[0]*weight[13]+0.011111111111111112*weight[12]*rho[13]+0.021825396825396828*weight[11]*rho[13]+0.022360679774997897*weight[10]*rho[13]-0.01924500897298753*weight[9]*rho[13]+0.010309826235529031*weight[7]*rho[13]-0.021516574145596764*weight[6]*rho[13]+0.004303314829119352*weight[5]*rho[13]-0.021516574145596764*weight[4]*rho[13]+0.037267799624996496*weight[3]*rho[13]+0.012422599874998832*weight[2]*rho[13]+0.012422599874998832*weight[1]*rho[13]-0.021516574145596764*weight[0]*rho[13]-0.06785714285714287*rho[12]*weight[12]+0.011111111111111112*rho[11]*weight[12]+0.022360679774997897*rho[10]*weight[12]+0.010309826235529031*rho[8]*weight[12]-0.01924500897298753*rho[7]*weight[12]-0.021516574145596764*rho[6]*weight[12]-0.021516574145596764*rho[5]*weight[12]+0.004303314829119352*rho[4]*weight[12]+0.012422599874998832*rho[3]*weight[12]+0.012422599874998832*rho[2]*weight[12]+0.037267799624996496*rho[1]*weight[12]-0.021516574145596764*rho[0]*weight[12]+0.011111111111111112*weight[11]*rho[12]+0.022360679774997897*weight[10]*rho[12]+0.010309826235529031*weight[8]*rho[12]-0.01924500897298753*weight[7]*rho[12]-0.021516574145596764*weight[6]*rho[12]-0.021516574145596764*weight[5]*rho[12]+0.004303314829119352*weight[4]*rho[12]+0.012422599874998832*weight[3]*rho[12]+0.012422599874998832*weight[2]*rho[12]+0.037267799624996496*weight[1]*rho[12]-0.021516574145596764*weight[0]*rho[12]-0.06785714285714287*rho[11]*weight[11]+0.022360679774997897*rho[10]*weight[11]-0.01924500897298753*rho[8]*weight[11]+0.010309826235529031*rho[7]*weight[11]-0.021516574145596764*rho[6]*weight[11]-0.021516574145596764*rho[5]*weight[11]+0.004303314829119352*rho[4]*weight[11]+0.012422599874998832*rho[3]*weight[11]+0.037267799624996496*rho[2]*weight[11]+0.012422599874998832*rho[1]*weight[11]-0.021516574145596764*rho[0]*weight[11]+0.022360679774997897*weight[10]*rho[11]-0.01924500897298753*weight[8]*rho[11]+0.010309826235529031*weight[7]*rho[11]-0.021516574145596764*weight[6]*rho[11]-0.021516574145596764*weight[5]*rho[11]+0.004303314829119352*weight[4]*rho[11]+0.012422599874998832*weight[3]*rho[11]+0.037267799624996496*weight[2]*rho[11]+0.012422599874998832*weight[1]*rho[11]-0.021516574145596764*weight[0]*rho[11]-0.025*rho[10]*weight[10]-0.02151657414559676*rho[9]*weight[10]-0.02151657414559676*rho[8]*weight[10]-0.02151657414559676*rho[7]*weight[10]-0.014433756729740645*rho[6]*weight[10]-0.014433756729740645*rho[5]*weight[10]-0.014433756729740645*rho[4]*weight[10]+0.025*rho[3]*weight[10]+0.025*rho[2]*weight[10]+0.025*rho[1]*weight[10]-0.024056261216234404*rho[0]*weight[10]-0.02151657414559676*weight[9]*rho[10]-0.02151657414559676*weight[8]*rho[10]-0.02151657414559676*weight[7]*rho[10]-0.014433756729740645*weight[6]*rho[10]-0.014433756729740645*weight[5]*rho[10]-0.014433756729740645*weight[4]*rho[10]+0.025*weight[3]*rho[10]+0.025*weight[2]*rho[10]+0.025*weight[1]*rho[10]-0.024056261216234404*weight[0]*rho[10]-0.10119047619047619*rho[9]*weight[9]+0.012422599874998833*rho[6]*weight[9]+0.012422599874998833*rho[5]*weight[9]+0.012422599874998833*rho[4]*weight[9]+0.02151657414559676*rho[3]*weight[9]-0.02151657414559676*rho[2]*weight[9]-0.02151657414559676*rho[1]*weight[9]+0.0372677996249965*rho[0]*weight[9]+0.012422599874998833*weight[6]*rho[9]+0.012422599874998833*weight[5]*rho[9]+0.012422599874998833*weight[4]*rho[9]+0.02151657414559676*weight[3]*rho[9]-0.02151657414559676*weight[2]*rho[9]-0.02151657414559676*weight[1]*rho[9]+0.0372677996249965*weight[0]*rho[9]-0.10119047619047619*rho[8]*weight[8]+0.012422599874998833*rho[6]*weight[8]+0.012422599874998833*rho[5]*weight[8]+0.012422599874998833*rho[4]*weight[8]-0.02151657414559676*rho[3]*weight[8]+0.02151657414559676*rho[2]*weight[8]-0.02151657414559676*rho[1]*weight[8]+0.0372677996249965*rho[0]*weight[8]+0.012422599874998833*weight[6]*rho[8]+0.012422599874998833*weight[5]*rho[8]+0.012422599874998833*weight[4]*rho[8]-0.02151657414559676*weight[3]*rho[8]+0.02151657414559676*weight[2]*rho[8]-0.02151657414559676*weight[1]*rho[8]+0.0372677996249965*weight[0]*rho[8]-0.10119047619047619*rho[7]*weight[7]+0.012422599874998833*rho[6]*weight[7]+0.012422599874998833*rho[5]*weight[7]+0.012422599874998833*rho[4]*weight[7]-0.02151657414559676*rho[3]*weight[7]-0.02151657414559676*rho[2]*weight[7]+0.02151657414559676*rho[1]*weight[7]+0.0372677996249965*rho[0]*weight[7]+0.012422599874998833*weight[6]*rho[7]+0.012422599874998833*weight[5]*rho[7]+0.012422599874998833*weight[4]*rho[7]-0.02151657414559676*weight[3]*rho[7]-0.02151657414559676*weight[2]*rho[7]+0.02151657414559676*weight[1]*rho[7]+0.0372677996249965*weight[0]*rho[7]-0.058333333333333334*rho[6]*weight[6]+0.025*rho[5]*weight[6]+0.025*rho[4]*weight[6]+0.004811252243246881*rho[3]*weight[6]+0.004811252243246881*rho[2]*weight[6]-0.024056261216234404*rho[1]*weight[6]+0.01388888888888889*rho[0]*weight[6]+0.025*weight[5]*rho[6]+0.025*weight[4]*rho[6]+0.004811252243246881*weight[3]*rho[6]+0.004811252243246881*weight[2]*rho[6]-0.024056261216234404*weight[1]*rho[6]+0.01388888888888889*weight[0]*rho[6]-0.058333333333333334*rho[5]*weight[5]+0.025*rho[4]*weight[5]+0.004811252243246881*rho[3]*weight[5]-0.024056261216234404*rho[2]*weight[5]+0.004811252243246881*rho[1]*weight[5]+0.01388888888888889*rho[0]*weight[5]+0.025*weight[4]*rho[5]+0.004811252243246881*weight[3]*rho[5]-0.024056261216234404*weight[2]*rho[5]+0.004811252243246881*weight[1]*rho[5]+0.01388888888888889*weight[0]*rho[5]-0.058333333333333334*rho[4]*weight[4]-0.024056261216234404*rho[3]*weight[4]+0.004811252243246881*rho[2]*weight[4]+0.004811252243246881*rho[1]*weight[4]+0.01388888888888889*rho[0]*weight[4]-0.024056261216234404*weight[3]*rho[4]+0.004811252243246881*weight[2]*rho[4]+0.004811252243246881*weight[1]*rho[4]+0.01388888888888889*weight[0]*rho[4]-0.09166666666666667*rho[3]*weight[3]+0.01388888888888889*rho[2]*weight[3]+0.01388888888888889*rho[1]*weight[3]+0.024056261216234404*rho[0]*weight[3]+0.01388888888888889*weight[2]*rho[3]+0.01388888888888889*weight[1]*rho[3]+0.024056261216234404*weight[0]*rho[3]-0.09166666666666667*rho[2]*weight[2]+0.01388888888888889*rho[1]*weight[2]+0.024056261216234404*rho[0]*weight[2]+0.01388888888888889*weight[1]*rho[2]+0.024056261216234404*weight[0]*rho[2]-0.09166666666666667*rho[1]*weight[1]+0.024056261216234404*rho[0]*weight[1]+0.024056261216234404*weight[0]*rho[1]-0.125*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[0]] += -(0.034523809523809526*rho[19]*weight[19])+0.02*rho[18]*weight[19]+0.02*rho[17]*weight[19]-0.008935182737458497*rho[16]*weight[19]-0.008935182737458497*rho[15]*weight[19]-0.01924500897298753*rho[14]*weight[19]-0.01924500897298753*rho[13]*weight[19]-0.01924500897298753*rho[12]*weight[19]-0.01924500897298753*rho[11]*weight[19]-0.012909944487358056*rho[10]*weight[19]+0.021825396825396828*rho[9]*weight[19]+0.011111111111111112*rho[8]*weight[19]+0.011111111111111112*rho[7]*weight[19]+0.022360679774997897*rho[6]*weight[19]+0.022360679774997897*rho[5]*weight[19]+0.0372677996249965*rho[4]*weight[19]-0.02151657414559676*rho[3]*weight[19]-0.02151657414559676*rho[2]*weight[19]-0.02151657414559676*rho[1]*weight[19]+0.012422599874998833*rho[0]*weight[19]+0.02*weight[18]*rho[19]+0.02*weight[17]*rho[19]-0.008935182737458497*weight[16]*rho[19]-0.008935182737458497*weight[15]*rho[19]-0.01924500897298753*weight[14]*rho[19]-0.01924500897298753*weight[13]*rho[19]-0.01924500897298753*weight[12]*rho[19]-0.01924500897298753*weight[11]*rho[19]-0.012909944487358056*weight[10]*rho[19]+0.021825396825396828*weight[9]*rho[19]+0.011111111111111112*weight[8]*rho[19]+0.011111111111111112*weight[7]*rho[19]+0.022360679774997897*weight[6]*rho[19]+0.022360679774997897*weight[5]*rho[19]+0.0372677996249965*weight[4]*rho[19]-0.02151657414559676*weight[3]*rho[19]-0.02151657414559676*weight[2]*rho[19]-0.02151657414559676*weight[1]*rho[19]+0.012422599874998833*weight[0]*rho[19]-0.034523809523809526*rho[18]*weight[18]+0.02*rho[17]*weight[18]-0.01924500897298753*rho[16]*weight[18]-0.01924500897298753*rho[15]*weight[18]-0.008935182737458497*rho[14]*weight[18]-0.01924500897298753*rho[13]*weight[18]-0.008935182737458497*rho[12]*weight[18]-0.01924500897298753*rho[11]*weight[18]-0.012909944487358056*rho[10]*weight[18]+0.011111111111111112*rho[9]*weight[18]+0.021825396825396828*rho[8]*weight[18]+0.011111111111111112*rho[7]*weight[18]+0.022360679774997897*rho[6]*weight[18]+0.0372677996249965*rho[5]*weight[18]+0.022360679774997897*rho[4]*weight[18]-0.02151657414559676*rho[3]*weight[18]-0.02151657414559676*rho[2]*weight[18]-0.02151657414559676*rho[1]*weight[18]+0.012422599874998833*rho[0]*weight[18]+0.02*weight[17]*rho[18]-0.01924500897298753*weight[16]*rho[18]-0.01924500897298753*weight[15]*rho[18]-0.008935182737458497*weight[14]*rho[18]-0.01924500897298753*weight[13]*rho[18]-0.008935182737458497*weight[12]*rho[18]-0.01924500897298753*weight[11]*rho[18]-0.012909944487358056*weight[10]*rho[18]+0.011111111111111112*weight[9]*rho[18]+0.021825396825396828*weight[8]*rho[18]+0.011111111111111112*weight[7]*rho[18]+0.022360679774997897*weight[6]*rho[18]+0.0372677996249965*weight[5]*rho[18]+0.022360679774997897*weight[4]*rho[18]-0.02151657414559676*weight[3]*rho[18]-0.02151657414559676*weight[2]*rho[18]-0.02151657414559676*weight[1]*rho[18]+0.012422599874998833*weight[0]*rho[18]-0.034523809523809526*rho[17]*weight[17]-0.01924500897298753*rho[16]*weight[17]-0.01924500897298753*rho[15]*weight[17]-0.01924500897298753*rho[14]*weight[17]-0.008935182737458497*rho[13]*weight[17]-0.01924500897298753*rho[12]*weight[17]-0.008935182737458497*rho[11]*weight[17]-0.012909944487358056*rho[10]*weight[17]+0.011111111111111112*rho[9]*weight[17]+0.011111111111111112*rho[8]*weight[17]+0.021825396825396828*rho[7]*weight[17]+0.0372677996249965*rho[6]*weight[17]+0.022360679774997897*rho[5]*weight[17]+0.022360679774997897*rho[4]*weight[17]-0.02151657414559676*rho[3]*weight[17]-0.02151657414559676*rho[2]*weight[17]-0.02151657414559676*rho[1]*weight[17]+0.012422599874998833*rho[0]*weight[17]-0.01924500897298753*weight[16]*rho[17]-0.01924500897298753*weight[15]*rho[17]-0.01924500897298753*weight[14]*rho[17]-0.008935182737458497*weight[13]*rho[17]-0.01924500897298753*weight[12]*rho[17]-0.008935182737458497*weight[11]*rho[17]-0.012909944487358056*weight[10]*rho[17]+0.011111111111111112*weight[9]*rho[17]+0.011111111111111112*weight[8]*rho[17]+0.021825396825396828*weight[7]*rho[17]+0.0372677996249965*weight[6]*rho[17]+0.022360679774997897*weight[5]*rho[17]+0.022360679774997897*weight[4]*rho[17]-0.02151657414559676*weight[3]*rho[17]-0.02151657414559676*weight[2]*rho[17]-0.02151657414559676*weight[1]*rho[17]+0.012422599874998833*weight[0]*rho[17]-0.06785714285714287*rho[16]*weight[16]+0.021825396825396828*rho[15]*weight[16]+0.011111111111111112*rho[14]*weight[16]+0.011111111111111112*rho[13]*weight[16]+0.011111111111111112*rho[12]*weight[16]+0.022360679774997897*rho[10]*weight[16]+0.010309826235529031*rho[9]*weight[16]-0.01924500897298753*rho[8]*weight[16]+0.004303314829119352*rho[6]*weight[16]-0.021516574145596764*rho[5]*weight[16]-0.021516574145596764*rho[4]*weight[16]+0.012422599874998832*rho[3]*weight[16]+0.037267799624996496*rho[2]*weight[16]+0.012422599874998832*rho[1]*weight[16]-0.021516574145596764*rho[0]*weight[16]+0.021825396825396828*weight[15]*rho[16]+0.011111111111111112*weight[14]*rho[16]+0.011111111111111112*weight[13]*rho[16]+0.011111111111111112*weight[12]*rho[16]+0.022360679774997897*weight[10]*rho[16]+0.010309826235529031*weight[9]*rho[16]-0.01924500897298753*weight[8]*rho[16]+0.004303314829119352*weight[6]*rho[16]-0.021516574145596764*weight[5]*rho[16]-0.021516574145596764*weight[4]*rho[16]+0.012422599874998832*weight[3]*rho[16]+0.037267799624996496*weight[2]*rho[16]+0.012422599874998832*weight[1]*rho[16]-0.021516574145596764*weight[0]*rho[16]-0.06785714285714287*rho[15]*weight[15]+0.011111111111111112*rho[14]*weight[15]+0.011111111111111112*rho[13]*weight[15]+0.011111111111111112*rho[11]*weight[15]+0.022360679774997897*rho[10]*weight[15]+0.010309826235529031*rho[9]*weight[15]-0.01924500897298753*rho[7]*weight[15]-0.021516574145596764*rho[6]*weight[15]+0.004303314829119352*rho[5]*weight[15]-0.021516574145596764*rho[4]*weight[15]+0.012422599874998832*rho[3]*weight[15]+0.012422599874998832*rho[2]*weight[15]+0.037267799624996496*rho[1]*weight[15]-0.021516574145596764*rho[0]*weight[15]+0.011111111111111112*weight[14]*rho[15]+0.011111111111111112*weight[13]*rho[15]+0.011111111111111112*weight[11]*rho[15]+0.022360679774997897*weight[10]*rho[15]+0.010309826235529031*weight[9]*rho[15]-0.01924500897298753*weight[7]*rho[15]-0.021516574145596764*weight[6]*rho[15]+0.004303314829119352*weight[5]*rho[15]-0.021516574145596764*weight[4]*rho[15]+0.012422599874998832*weight[3]*rho[15]+0.012422599874998832*weight[2]*rho[15]+0.037267799624996496*weight[1]*rho[15]-0.021516574145596764*weight[0]*rho[15]-0.06785714285714287*rho[14]*weight[14]+0.021825396825396828*rho[12]*weight[14]+0.011111111111111112*rho[11]*weight[14]+0.022360679774997897*rho[10]*weight[14]-0.01924500897298753*rho[9]*weight[14]+0.010309826235529031*rho[8]*weight[14]+0.004303314829119352*rho[6]*weight[14]-0.021516574145596764*rho[5]*weight[14]-0.021516574145596764*rho[4]*weight[14]+0.037267799624996496*rho[3]*weight[14]+0.012422599874998832*rho[2]*weight[14]+0.012422599874998832*rho[1]*weight[14]-0.021516574145596764*rho[0]*weight[14]+0.021825396825396828*weight[12]*rho[14]+0.011111111111111112*weight[11]*rho[14]+0.022360679774997897*weight[10]*rho[14]-0.01924500897298753*weight[9]*rho[14]+0.010309826235529031*weight[8]*rho[14]+0.004303314829119352*weight[6]*rho[14]-0.021516574145596764*weight[5]*rho[14]-0.021516574145596764*weight[4]*rho[14]+0.037267799624996496*weight[3]*rho[14]+0.012422599874998832*weight[2]*rho[14]+0.012422599874998832*weight[1]*rho[14]-0.021516574145596764*weight[0]*rho[14]-0.06785714285714287*rho[13]*weight[13]+0.011111111111111112*rho[12]*weight[13]+0.021825396825396828*rho[11]*weight[13]+0.022360679774997897*rho[10]*weight[13]-0.01924500897298753*rho[9]*weight[13]+0.010309826235529031*rho[7]*weight[13]-0.021516574145596764*rho[6]*weight[13]+0.004303314829119352*rho[5]*weight[13]-0.021516574145596764*rho[4]*weight[13]+0.037267799624996496*rho[3]*weight[13]+0.012422599874998832*rho[2]*weight[13]+0.012422599874998832*rho[1]*weight[13]-0.021516574145596764*rho[0]*weight[13]+0.011111111111111112*weight[12]*rho[13]+0.021825396825396828*weight[11]*rho[13]+0.022360679774997897*weight[10]*rho[13]-0.01924500897298753*weight[9]*rho[13]+0.010309826235529031*weight[7]*rho[13]-0.021516574145596764*weight[6]*rho[13]+0.004303314829119352*weight[5]*rho[13]-0.021516574145596764*weight[4]*rho[13]+0.037267799624996496*weight[3]*rho[13]+0.012422599874998832*weight[2]*rho[13]+0.012422599874998832*weight[1]*rho[13]-0.021516574145596764*weight[0]*rho[13]-0.06785714285714287*rho[12]*weight[12]+0.011111111111111112*rho[11]*weight[12]+0.022360679774997897*rho[10]*weight[12]+0.010309826235529031*rho[8]*weight[12]-0.01924500897298753*rho[7]*weight[12]-0.021516574145596764*rho[6]*weight[12]-0.021516574145596764*rho[5]*weight[12]+0.004303314829119352*rho[4]*weight[12]+0.012422599874998832*rho[3]*weight[12]+0.012422599874998832*rho[2]*weight[12]+0.037267799624996496*rho[1]*weight[12]-0.021516574145596764*rho[0]*weight[12]+0.011111111111111112*weight[11]*rho[12]+0.022360679774997897*weight[10]*rho[12]+0.010309826235529031*weight[8]*rho[12]-0.01924500897298753*weight[7]*rho[12]-0.021516574145596764*weight[6]*rho[12]-0.021516574145596764*weight[5]*rho[12]+0.004303314829119352*weight[4]*rho[12]+0.012422599874998832*weight[3]*rho[12]+0.012422599874998832*weight[2]*rho[12]+0.037267799624996496*weight[1]*rho[12]-0.021516574145596764*weight[0]*rho[12]-0.06785714285714287*rho[11]*weight[11]+0.022360679774997897*rho[10]*weight[11]-0.01924500897298753*rho[8]*weight[11]+0.010309826235529031*rho[7]*weight[11]-0.021516574145596764*rho[6]*weight[11]-0.021516574145596764*rho[5]*weight[11]+0.004303314829119352*rho[4]*weight[11]+0.012422599874998832*rho[3]*weight[11]+0.037267799624996496*rho[2]*weight[11]+0.012422599874998832*rho[1]*weight[11]-0.021516574145596764*rho[0]*weight[11]+0.022360679774997897*weight[10]*rho[11]-0.01924500897298753*weight[8]*rho[11]+0.010309826235529031*weight[7]*rho[11]-0.021516574145596764*weight[6]*rho[11]-0.021516574145596764*weight[5]*rho[11]+0.004303314829119352*weight[4]*rho[11]+0.012422599874998832*weight[3]*rho[11]+0.037267799624996496*weight[2]*rho[11]+0.012422599874998832*weight[1]*rho[11]-0.021516574145596764*weight[0]*rho[11]-0.025*rho[10]*weight[10]-0.02151657414559676*rho[9]*weight[10]-0.02151657414559676*rho[8]*weight[10]-0.02151657414559676*rho[7]*weight[10]-0.014433756729740645*rho[6]*weight[10]-0.014433756729740645*rho[5]*weight[10]-0.014433756729740645*rho[4]*weight[10]+0.025*rho[3]*weight[10]+0.025*rho[2]*weight[10]+0.025*rho[1]*weight[10]-0.024056261216234404*rho[0]*weight[10]-0.02151657414559676*weight[9]*rho[10]-0.02151657414559676*weight[8]*rho[10]-0.02151657414559676*weight[7]*rho[10]-0.014433756729740645*weight[6]*rho[10]-0.014433756729740645*weight[5]*rho[10]-0.014433756729740645*weight[4]*rho[10]+0.025*weight[3]*rho[10]+0.025*weight[2]*rho[10]+0.025*weight[1]*rho[10]-0.024056261216234404*weight[0]*rho[10]-0.10119047619047619*rho[9]*weight[9]+0.012422599874998833*rho[6]*weight[9]+0.012422599874998833*rho[5]*weight[9]+0.012422599874998833*rho[4]*weight[9]+0.02151657414559676*rho[3]*weight[9]-0.02151657414559676*rho[2]*weight[9]-0.02151657414559676*rho[1]*weight[9]+0.0372677996249965*rho[0]*weight[9]+0.012422599874998833*weight[6]*rho[9]+0.012422599874998833*weight[5]*rho[9]+0.012422599874998833*weight[4]*rho[9]+0.02151657414559676*weight[3]*rho[9]-0.02151657414559676*weight[2]*rho[9]-0.02151657414559676*weight[1]*rho[9]+0.0372677996249965*weight[0]*rho[9]-0.10119047619047619*rho[8]*weight[8]+0.012422599874998833*rho[6]*weight[8]+0.012422599874998833*rho[5]*weight[8]+0.012422599874998833*rho[4]*weight[8]-0.02151657414559676*rho[3]*weight[8]+0.02151657414559676*rho[2]*weight[8]-0.02151657414559676*rho[1]*weight[8]+0.0372677996249965*rho[0]*weight[8]+0.012422599874998833*weight[6]*rho[8]+0.012422599874998833*weight[5]*rho[8]+0.012422599874998833*weight[4]*rho[8]-0.02151657414559676*weight[3]*rho[8]+0.02151657414559676*weight[2]*rho[8]-0.02151657414559676*weight[1]*rho[8]+0.0372677996249965*weight[0]*rho[8]-0.10119047619047619*rho[7]*weight[7]+0.012422599874998833*rho[6]*weight[7]+0.012422599874998833*rho[5]*weight[7]+0.012422599874998833*rho[4]*weight[7]-0.02151657414559676*rho[3]*weight[7]-0.02151657414559676*rho[2]*weight[7]+0.02151657414559676*rho[1]*weight[7]+0.0372677996249965*rho[0]*weight[7]+0.012422599874998833*weight[6]*rho[7]+0.012422599874998833*weight[5]*rho[7]+0.012422599874998833*weight[4]*rho[7]-0.02151657414559676*weight[3]*rho[7]-0.02151657414559676*weight[2]*rho[7]+0.02151657414559676*weight[1]*rho[7]+0.0372677996249965*weight[0]*rho[7]-0.058333333333333334*rho[6]*weight[6]+0.025*rho[5]*weight[6]+0.025*rho[4]*weight[6]+0.004811252243246881*rho[3]*weight[6]+0.004811252243246881*rho[2]*weight[6]-0.024056261216234404*rho[1]*weight[6]+0.01388888888888889*rho[0]*weight[6]+0.025*weight[5]*rho[6]+0.025*weight[4]*rho[6]+0.004811252243246881*weight[3]*rho[6]+0.004811252243246881*weight[2]*rho[6]-0.024056261216234404*weight[1]*rho[6]+0.01388888888888889*weight[0]*rho[6]-0.058333333333333334*rho[5]*weight[5]+0.025*rho[4]*weight[5]+0.004811252243246881*rho[3]*weight[5]-0.024056261216234404*rho[2]*weight[5]+0.004811252243246881*rho[1]*weight[5]+0.01388888888888889*rho[0]*weight[5]+0.025*weight[4]*rho[5]+0.004811252243246881*weight[3]*rho[5]-0.024056261216234404*weight[2]*rho[5]+0.004811252243246881*weight[1]*rho[5]+0.01388888888888889*weight[0]*rho[5]-0.058333333333333334*rho[4]*weight[4]-0.024056261216234404*rho[3]*weight[4]+0.004811252243246881*rho[2]*weight[4]+0.004811252243246881*rho[1]*weight[4]+0.01388888888888889*rho[0]*weight[4]-0.024056261216234404*weight[3]*rho[4]+0.004811252243246881*weight[2]*rho[4]+0.004811252243246881*weight[1]*rho[4]+0.01388888888888889*weight[0]*rho[4]-0.09166666666666667*rho[3]*weight[3]+0.01388888888888889*rho[2]*weight[3]+0.01388888888888889*rho[1]*weight[3]+0.024056261216234404*rho[0]*weight[3]+0.01388888888888889*weight[2]*rho[3]+0.01388888888888889*weight[1]*rho[3]+0.024056261216234404*weight[0]*rho[3]-0.09166666666666667*rho[2]*weight[2]+0.01388888888888889*rho[1]*weight[2]+0.024056261216234404*rho[0]*weight[2]+0.01388888888888889*weight[1]*rho[2]+0.024056261216234404*weight[0]*rho[2]-0.09166666666666667*rho[1]*weight[1]+0.024056261216234404*rho[0]*weight[1]+0.024056261216234404*weight[0]*rho[1]-0.125*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[1]],0.1*rho[19]*weight[19]+0.02666666666666667*rho[18]*weight[19]-0.05773502691896258*rho[15]*weight[19]-0.051639777949432225*rho[10]*weight[19]+0.029814239699997195*rho[5]*weight[19]+0.02666666666666667*weight[18]*rho[19]-0.05773502691896258*weight[15]*rho[19]-0.051639777949432225*weight[10]*rho[19]+0.029814239699997195*weight[5]*rho[19]+0.1*rho[18]*weight[18]-0.05773502691896258*rho[12]*weight[18]-0.051639777949432225*rho[10]*weight[18]+0.029814239699997195*rho[4]*weight[18]-0.05773502691896258*weight[12]*rho[18]-0.051639777949432225*weight[10]*rho[18]+0.029814239699997195*weight[4]*rho[18]+0.11904761904761905*rho[17]*weight[17]+0.03849001794597506*rho[16]*weight[17]+0.03849001794597506*rho[14]*weight[17]-0.06873217490352689*rho[13]*weight[17]-0.06873217490352689*rho[11]*weight[17]-0.022222222222222223*rho[9]*weight[17]-0.022222222222222223*rho[8]*weight[17]+0.03968253968253969*rho[7]*weight[17]-0.074535599249993*rho[6]*weight[17]+0.04303314829119352*rho[3]*weight[17]+0.04303314829119352*rho[2]*weight[17]-0.024845199749997667*rho[0]*weight[17]+0.03849001794597506*weight[16]*rho[17]+0.03849001794597506*weight[14]*rho[17]-0.06873217490352689*weight[13]*rho[17]-0.06873217490352689*weight[11]*rho[17]-0.022222222222222223*weight[9]*rho[17]-0.022222222222222223*weight[8]*rho[17]+0.03968253968253969*weight[7]*rho[17]-0.074535599249993*weight[6]*rho[17]+0.04303314829119352*weight[3]*rho[17]+0.04303314829119352*weight[2]*rho[17]-0.024845199749997667*weight[0]*rho[17]+0.16666666666666669*rho[16]*weight[16]+0.044444444444444446*rho[14]*weight[16]-0.022222222222222223*rho[13]*weight[16]-0.09622504486493764*rho[9]*weight[16]-0.08606629658238706*rho[6]*weight[16]+0.049690399499995326*rho[3]*weight[16]+0.044444444444444446*weight[14]*rho[16]-0.022222222222222223*weight[13]*rho[16]-0.09622504486493764*weight[9]*rho[16]-0.08606629658238706*weight[6]*rho[16]+0.049690399499995326*weight[3]*rho[16]+0.1*rho[15]*weight[15]+0.029814239699997195*rho[10]*weight[15]-0.05163977794943223*rho[5]*weight[15]+0.029814239699997195*weight[10]*rho[15]-0.05163977794943223*weight[5]*rho[15]+0.16666666666666669*rho[14]*weight[14]-0.022222222222222223*rho[11]*weight[14]-0.09622504486493764*rho[8]*weight[14]-0.08606629658238706*rho[6]*weight[14]+0.049690399499995326*rho[2]*weight[14]-0.022222222222222223*weight[11]*rho[14]-0.09622504486493764*weight[8]*rho[14]-0.08606629658238706*weight[6]*rho[14]+0.049690399499995326*weight[2]*rho[14]+0.11904761904761905*rho[13]*weight[13]+0.03968253968253969*rho[11]*weight[13]+0.03849001794597506*rho[9]*weight[13]-0.06873217490352689*rho[7]*weight[13]+0.04303314829119353*rho[6]*weight[13]-0.07453559924999299*rho[3]*weight[13]-0.024845199749997663*rho[2]*weight[13]+0.04303314829119353*rho[0]*weight[13]+0.03968253968253969*weight[11]*rho[13]+0.03849001794597506*weight[9]*rho[13]-0.06873217490352689*weight[7]*rho[13]+0.04303314829119353*weight[6]*rho[13]-0.07453559924999299*weight[3]*rho[13]-0.024845199749997663*weight[2]*rho[13]+0.04303314829119353*weight[0]*rho[13]+0.1*rho[12]*weight[12]+0.029814239699997195*rho[10]*weight[12]-0.05163977794943223*rho[4]*weight[12]+0.029814239699997195*weight[10]*rho[12]-0.05163977794943223*weight[4]*rho[12]+0.11904761904761905*rho[11]*weight[11]+0.03849001794597506*rho[8]*weight[11]-0.06873217490352689*rho[7]*weight[11]+0.04303314829119353*rho[6]*weight[11]-0.024845199749997663*rho[3]*weight[11]-0.07453559924999299*rho[2]*weight[11]+0.04303314829119353*rho[0]*weight[11]+0.03849001794597506*weight[8]*rho[11]-0.06873217490352689*weight[7]*rho[11]+0.04303314829119353*weight[6]*rho[11]-0.024845199749997663*weight[3]*rho[11]-0.07453559924999299*weight[2]*rho[11]+0.04303314829119353*weight[0]*rho[11]+0.1*rho[10]*weight[10]-0.05773502691896258*rho[5]*weight[10]-0.05773502691896258*rho[4]*weight[10]+0.03333333333333333*rho[1]*weight[10]-0.05773502691896258*weight[5]*rho[10]-0.05773502691896258*weight[4]*rho[10]+0.03333333333333333*weight[1]*rho[10]+0.16666666666666669*rho[9]*weight[9]+0.04969039949999533*rho[6]*weight[9]-0.08606629658238704*rho[3]*weight[9]+0.04969039949999533*weight[6]*rho[9]-0.08606629658238704*weight[3]*rho[9]+0.16666666666666669*rho[8]*weight[8]+0.04969039949999533*rho[6]*weight[8]-0.08606629658238704*rho[2]*weight[8]+0.04969039949999533*weight[6]*rho[8]-0.08606629658238704*weight[2]*rho[8]+0.11904761904761905*rho[7]*weight[7]-0.024845199749997667*rho[6]*weight[7]+0.04303314829119352*rho[3]*weight[7]+0.04303314829119352*rho[2]*weight[7]-0.074535599249993*rho[0]*weight[7]-0.024845199749997667*weight[6]*rho[7]+0.04303314829119352*weight[3]*rho[7]+0.04303314829119352*weight[2]*rho[7]-0.074535599249993*weight[0]*rho[7]+0.16666666666666669*rho[6]*weight[6]-0.09622504486493762*rho[3]*weight[6]-0.09622504486493762*rho[2]*weight[6]+0.05555555555555556*rho[0]*weight[6]-0.09622504486493762*weight[3]*rho[6]-0.09622504486493762*weight[2]*rho[6]+0.05555555555555556*weight[0]*rho[6]+0.1*rho[5]*weight[5]+0.03333333333333333*rho[4]*weight[5]-0.05773502691896258*rho[1]*weight[5]+0.03333333333333333*weight[4]*rho[5]-0.05773502691896258*weight[1]*rho[5]+0.1*rho[4]*weight[4]-0.05773502691896258*rho[1]*weight[4]-0.05773502691896258*weight[1]*rho[4]+0.16666666666666669*rho[3]*weight[3]+0.05555555555555556*rho[2]*weight[3]-0.09622504486493762*rho[0]*weight[3]+0.05555555555555556*weight[2]*rho[3]-0.09622504486493762*weight[0]*rho[3]+0.16666666666666669*rho[2]*weight[2]-0.09622504486493762*rho[0]*weight[2]-0.09622504486493762*weight[0]*rho[2]+0.1*rho[1]*weight[1]+0.16666666666666669*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[1]] += 0.1*rho[19]*weight[19]+0.02666666666666667*rho[18]*weight[19]-0.05773502691896258*rho[15]*weight[19]-0.051639777949432225*rho[10]*weight[19]+0.029814239699997195*rho[5]*weight[19]+0.02666666666666667*weight[18]*rho[19]-0.05773502691896258*weight[15]*rho[19]-0.051639777949432225*weight[10]*rho[19]+0.029814239699997195*weight[5]*rho[19]+0.1*rho[18]*weight[18]-0.05773502691896258*rho[12]*weight[18]-0.051639777949432225*rho[10]*weight[18]+0.029814239699997195*rho[4]*weight[18]-0.05773502691896258*weight[12]*rho[18]-0.051639777949432225*weight[10]*rho[18]+0.029814239699997195*weight[4]*rho[18]+0.11904761904761905*rho[17]*weight[17]+0.03849001794597506*rho[16]*weight[17]+0.03849001794597506*rho[14]*weight[17]-0.06873217490352689*rho[13]*weight[17]-0.06873217490352689*rho[11]*weight[17]-0.022222222222222223*rho[9]*weight[17]-0.022222222222222223*rho[8]*weight[17]+0.03968253968253969*rho[7]*weight[17]-0.074535599249993*rho[6]*weight[17]+0.04303314829119352*rho[3]*weight[17]+0.04303314829119352*rho[2]*weight[17]-0.024845199749997667*rho[0]*weight[17]+0.03849001794597506*weight[16]*rho[17]+0.03849001794597506*weight[14]*rho[17]-0.06873217490352689*weight[13]*rho[17]-0.06873217490352689*weight[11]*rho[17]-0.022222222222222223*weight[9]*rho[17]-0.022222222222222223*weight[8]*rho[17]+0.03968253968253969*weight[7]*rho[17]-0.074535599249993*weight[6]*rho[17]+0.04303314829119352*weight[3]*rho[17]+0.04303314829119352*weight[2]*rho[17]-0.024845199749997667*weight[0]*rho[17]+0.16666666666666669*rho[16]*weight[16]+0.044444444444444446*rho[14]*weight[16]-0.022222222222222223*rho[13]*weight[16]-0.09622504486493764*rho[9]*weight[16]-0.08606629658238706*rho[6]*weight[16]+0.049690399499995326*rho[3]*weight[16]+0.044444444444444446*weight[14]*rho[16]-0.022222222222222223*weight[13]*rho[16]-0.09622504486493764*weight[9]*rho[16]-0.08606629658238706*weight[6]*rho[16]+0.049690399499995326*weight[3]*rho[16]+0.1*rho[15]*weight[15]+0.029814239699997195*rho[10]*weight[15]-0.05163977794943223*rho[5]*weight[15]+0.029814239699997195*weight[10]*rho[15]-0.05163977794943223*weight[5]*rho[15]+0.16666666666666669*rho[14]*weight[14]-0.022222222222222223*rho[11]*weight[14]-0.09622504486493764*rho[8]*weight[14]-0.08606629658238706*rho[6]*weight[14]+0.049690399499995326*rho[2]*weight[14]-0.022222222222222223*weight[11]*rho[14]-0.09622504486493764*weight[8]*rho[14]-0.08606629658238706*weight[6]*rho[14]+0.049690399499995326*weight[2]*rho[14]+0.11904761904761905*rho[13]*weight[13]+0.03968253968253969*rho[11]*weight[13]+0.03849001794597506*rho[9]*weight[13]-0.06873217490352689*rho[7]*weight[13]+0.04303314829119353*rho[6]*weight[13]-0.07453559924999299*rho[3]*weight[13]-0.024845199749997663*rho[2]*weight[13]+0.04303314829119353*rho[0]*weight[13]+0.03968253968253969*weight[11]*rho[13]+0.03849001794597506*weight[9]*rho[13]-0.06873217490352689*weight[7]*rho[13]+0.04303314829119353*weight[6]*rho[13]-0.07453559924999299*weight[3]*rho[13]-0.024845199749997663*weight[2]*rho[13]+0.04303314829119353*weight[0]*rho[13]+0.1*rho[12]*weight[12]+0.029814239699997195*rho[10]*weight[12]-0.05163977794943223*rho[4]*weight[12]+0.029814239699997195*weight[10]*rho[12]-0.05163977794943223*weight[4]*rho[12]+0.11904761904761905*rho[11]*weight[11]+0.03849001794597506*rho[8]*weight[11]-0.06873217490352689*rho[7]*weight[11]+0.04303314829119353*rho[6]*weight[11]-0.024845199749997663*rho[3]*weight[11]-0.07453559924999299*rho[2]*weight[11]+0.04303314829119353*rho[0]*weight[11]+0.03849001794597506*weight[8]*rho[11]-0.06873217490352689*weight[7]*rho[11]+0.04303314829119353*weight[6]*rho[11]-0.024845199749997663*weight[3]*rho[11]-0.07453559924999299*weight[2]*rho[11]+0.04303314829119353*weight[0]*rho[11]+0.1*rho[10]*weight[10]-0.05773502691896258*rho[5]*weight[10]-0.05773502691896258*rho[4]*weight[10]+0.03333333333333333*rho[1]*weight[10]-0.05773502691896258*weight[5]*rho[10]-0.05773502691896258*weight[4]*rho[10]+0.03333333333333333*weight[1]*rho[10]+0.16666666666666669*rho[9]*weight[9]+0.04969039949999533*rho[6]*weight[9]-0.08606629658238704*rho[3]*weight[9]+0.04969039949999533*weight[6]*rho[9]-0.08606629658238704*weight[3]*rho[9]+0.16666666666666669*rho[8]*weight[8]+0.04969039949999533*rho[6]*weight[8]-0.08606629658238704*rho[2]*weight[8]+0.04969039949999533*weight[6]*rho[8]-0.08606629658238704*weight[2]*rho[8]+0.11904761904761905*rho[7]*weight[7]-0.024845199749997667*rho[6]*weight[7]+0.04303314829119352*rho[3]*weight[7]+0.04303314829119352*rho[2]*weight[7]-0.074535599249993*rho[0]*weight[7]-0.024845199749997667*weight[6]*rho[7]+0.04303314829119352*weight[3]*rho[7]+0.04303314829119352*weight[2]*rho[7]-0.074535599249993*weight[0]*rho[7]+0.16666666666666669*rho[6]*weight[6]-0.09622504486493762*rho[3]*weight[6]-0.09622504486493762*rho[2]*weight[6]+0.05555555555555556*rho[0]*weight[6]-0.09622504486493762*weight[3]*rho[6]-0.09622504486493762*weight[2]*rho[6]+0.05555555555555556*weight[0]*rho[6]+0.1*rho[5]*weight[5]+0.03333333333333333*rho[4]*weight[5]-0.05773502691896258*rho[1]*weight[5]+0.03333333333333333*weight[4]*rho[5]-0.05773502691896258*weight[1]*rho[5]+0.1*rho[4]*weight[4]-0.05773502691896258*rho[1]*weight[4]-0.05773502691896258*weight[1]*rho[4]+0.16666666666666669*rho[3]*weight[3]+0.05555555555555556*rho[2]*weight[3]-0.09622504486493762*rho[0]*weight[3]+0.05555555555555556*weight[2]*rho[3]-0.09622504486493762*weight[0]*rho[3]+0.16666666666666669*rho[2]*weight[2]-0.09622504486493762*rho[0]*weight[2]-0.09622504486493762*weight[0]*rho[2]+0.1*rho[1]*weight[1]+0.16666666666666669*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[2]],-(0.034523809523809526*rho[19]*weight[19])+0.02*rho[18]*weight[19]-0.02*rho[17]*weight[19]+0.008935182737458497*rho[16]*weight[19]-0.008935182737458497*rho[15]*weight[19]+0.01924500897298753*rho[14]*weight[19]+0.01924500897298753*rho[13]*weight[19]-0.01924500897298753*rho[12]*weight[19]+0.01924500897298753*rho[11]*weight[19]-0.012909944487358056*rho[10]*weight[19]-0.021825396825396828*rho[9]*weight[19]-0.011111111111111112*rho[8]*weight[19]-0.011111111111111112*rho[7]*weight[19]-0.022360679774997897*rho[6]*weight[19]+0.022360679774997897*rho[5]*weight[19]+0.0372677996249965*rho[4]*weight[19]+0.02151657414559676*rho[3]*weight[19]+0.02151657414559676*rho[2]*weight[19]-0.02151657414559676*rho[1]*weight[19]-0.012422599874998833*rho[0]*weight[19]+0.02*weight[18]*rho[19]-0.02*weight[17]*rho[19]+0.008935182737458497*weight[16]*rho[19]-0.008935182737458497*weight[15]*rho[19]+0.01924500897298753*weight[14]*rho[19]+0.01924500897298753*weight[13]*rho[19]-0.01924500897298753*weight[12]*rho[19]+0.01924500897298753*weight[11]*rho[19]-0.012909944487358056*weight[10]*rho[19]-0.021825396825396828*weight[9]*rho[19]-0.011111111111111112*weight[8]*rho[19]-0.011111111111111112*weight[7]*rho[19]-0.022360679774997897*weight[6]*rho[19]+0.022360679774997897*weight[5]*rho[19]+0.0372677996249965*weight[4]*rho[19]+0.02151657414559676*weight[3]*rho[19]+0.02151657414559676*weight[2]*rho[19]-0.02151657414559676*weight[1]*rho[19]-0.012422599874998833*weight[0]*rho[19]-0.034523809523809526*rho[18]*weight[18]-0.02*rho[17]*weight[18]+0.01924500897298753*rho[16]*weight[18]-0.01924500897298753*rho[15]*weight[18]+0.008935182737458497*rho[14]*weight[18]+0.01924500897298753*rho[13]*weight[18]-0.008935182737458497*rho[12]*weight[18]+0.01924500897298753*rho[11]*weight[18]-0.012909944487358056*rho[10]*weight[18]-0.011111111111111112*rho[9]*weight[18]-0.021825396825396828*rho[8]*weight[18]-0.011111111111111112*rho[7]*weight[18]-0.022360679774997897*rho[6]*weight[18]+0.0372677996249965*rho[5]*weight[18]+0.022360679774997897*rho[4]*weight[18]+0.02151657414559676*rho[3]*weight[18]+0.02151657414559676*rho[2]*weight[18]-0.02151657414559676*rho[1]*weight[18]-0.012422599874998833*rho[0]*weight[18]-0.02*weight[17]*rho[18]+0.01924500897298753*weight[16]*rho[18]-0.01924500897298753*weight[15]*rho[18]+0.008935182737458497*weight[14]*rho[18]+0.01924500897298753*weight[13]*rho[18]-0.008935182737458497*weight[12]*rho[18]+0.01924500897298753*weight[11]*rho[18]-0.012909944487358056*weight[10]*rho[18]-0.011111111111111112*weight[9]*rho[18]-0.021825396825396828*weight[8]*rho[18]-0.011111111111111112*weight[7]*rho[18]-0.022360679774997897*weight[6]*rho[18]+0.0372677996249965*weight[5]*rho[18]+0.022360679774997897*weight[4]*rho[18]+0.02151657414559676*weight[3]*rho[18]+0.02151657414559676*weight[2]*rho[18]-0.02151657414559676*weight[1]*rho[18]-0.012422599874998833*weight[0]*rho[18]-0.034523809523809526*rho[17]*weight[17]-0.01924500897298753*rho[16]*weight[17]+0.01924500897298753*rho[15]*weight[17]-0.01924500897298753*rho[14]*weight[17]-0.008935182737458497*rho[13]*weight[17]+0.01924500897298753*rho[12]*weight[17]-0.008935182737458497*rho[11]*weight[17]+0.012909944487358056*rho[10]*weight[17]+0.011111111111111112*rho[9]*weight[17]+0.011111111111111112*rho[8]*weight[17]+0.021825396825396828*rho[7]*weight[17]+0.0372677996249965*rho[6]*weight[17]-0.022360679774997897*rho[5]*weight[17]-0.022360679774997897*rho[4]*weight[17]-0.02151657414559676*rho[3]*weight[17]-0.02151657414559676*rho[2]*weight[17]+0.02151657414559676*rho[1]*weight[17]+0.012422599874998833*rho[0]*weight[17]-0.01924500897298753*weight[16]*rho[17]+0.01924500897298753*weight[15]*rho[17]-0.01924500897298753*weight[14]*rho[17]-0.008935182737458497*weight[13]*rho[17]+0.01924500897298753*weight[12]*rho[17]-0.008935182737458497*weight[11]*rho[17]+0.012909944487358056*weight[10]*rho[17]+0.011111111111111112*weight[9]*rho[17]+0.011111111111111112*weight[8]*rho[17]+0.021825396825396828*weight[7]*rho[17]+0.0372677996249965*weight[6]*rho[17]-0.022360679774997897*weight[5]*rho[17]-0.022360679774997897*weight[4]*rho[17]-0.02151657414559676*weight[3]*rho[17]-0.02151657414559676*weight[2]*rho[17]+0.02151657414559676*weight[1]*rho[17]+0.012422599874998833*weight[0]*rho[17]-0.06785714285714287*rho[16]*weight[16]-0.021825396825396828*rho[15]*weight[16]+0.011111111111111112*rho[14]*weight[16]+0.011111111111111112*rho[13]*weight[16]-0.011111111111111112*rho[12]*weight[16]-0.022360679774997897*rho[10]*weight[16]+0.010309826235529031*rho[9]*weight[16]-0.01924500897298753*rho[8]*weight[16]+0.004303314829119352*rho[6]*weight[16]+0.021516574145596764*rho[5]*weight[16]+0.021516574145596764*rho[4]*weight[16]+0.012422599874998832*rho[3]*weight[16]+0.037267799624996496*rho[2]*weight[16]-0.012422599874998832*rho[1]*weight[16]-0.021516574145596764*rho[0]*weight[16]-0.021825396825396828*weight[15]*rho[16]+0.011111111111111112*weight[14]*rho[16]+0.011111111111111112*weight[13]*rho[16]-0.011111111111111112*weight[12]*rho[16]-0.022360679774997897*weight[10]*rho[16]+0.010309826235529031*weight[9]*rho[16]-0.01924500897298753*weight[8]*rho[16]+0.004303314829119352*weight[6]*rho[16]+0.021516574145596764*weight[5]*rho[16]+0.021516574145596764*weight[4]*rho[16]+0.012422599874998832*weight[3]*rho[16]+0.037267799624996496*weight[2]*rho[16]-0.012422599874998832*weight[1]*rho[16]-0.021516574145596764*weight[0]*rho[16]-0.06785714285714287*rho[15]*weight[15]-0.011111111111111112*rho[14]*weight[15]-0.011111111111111112*rho[13]*weight[15]-0.011111111111111112*rho[11]*weight[15]+0.022360679774997897*rho[10]*weight[15]-0.010309826235529031*rho[9]*weight[15]+0.01924500897298753*rho[7]*weight[15]+0.021516574145596764*rho[6]*weight[15]+0.004303314829119352*rho[5]*weight[15]-0.021516574145596764*rho[4]*weight[15]-0.012422599874998832*rho[3]*weight[15]-0.012422599874998832*rho[2]*weight[15]+0.037267799624996496*rho[1]*weight[15]+0.021516574145596764*rho[0]*weight[15]-0.011111111111111112*weight[14]*rho[15]-0.011111111111111112*weight[13]*rho[15]-0.011111111111111112*weight[11]*rho[15]+0.022360679774997897*weight[10]*rho[15]-0.010309826235529031*weight[9]*rho[15]+0.01924500897298753*weight[7]*rho[15]+0.021516574145596764*weight[6]*rho[15]+0.004303314829119352*weight[5]*rho[15]-0.021516574145596764*weight[4]*rho[15]-0.012422599874998832*weight[3]*rho[15]-0.012422599874998832*weight[2]*rho[15]+0.037267799624996496*weight[1]*rho[15]+0.021516574145596764*weight[0]*rho[15]-0.06785714285714287*rho[14]*weight[14]-0.021825396825396828*rho[12]*weight[14]+0.011111111111111112*rho[11]*weight[14]-0.022360679774997897*rho[10]*weight[14]-0.01924500897298753*rho[9]*weight[14]+0.010309826235529031*rho[8]*weight[14]+0.004303314829119352*rho[6]*weight[14]+0.021516574145596764*rho[5]*weight[14]+0.021516574145596764*rho[4]*weight[14]+0.037267799624996496*rho[3]*weight[14]+0.012422599874998832*rho[2]*weight[14]-0.012422599874998832*rho[1]*weight[14]-0.021516574145596764*rho[0]*weight[14]-0.021825396825396828*weight[12]*rho[14]+0.011111111111111112*weight[11]*rho[14]-0.022360679774997897*weight[10]*rho[14]-0.01924500897298753*weight[9]*rho[14]+0.010309826235529031*weight[8]*rho[14]+0.004303314829119352*weight[6]*rho[14]+0.021516574145596764*weight[5]*rho[14]+0.021516574145596764*weight[4]*rho[14]+0.037267799624996496*weight[3]*rho[14]+0.012422599874998832*weight[2]*rho[14]-0.012422599874998832*weight[1]*rho[14]-0.021516574145596764*weight[0]*rho[14]-0.06785714285714287*rho[13]*weight[13]-0.011111111111111112*rho[12]*weight[13]+0.021825396825396828*rho[11]*weight[13]-0.022360679774997897*rho[10]*weight[13]-0.01924500897298753*rho[9]*weight[13]+0.010309826235529031*rho[7]*weight[13]-0.021516574145596764*rho[6]*weight[13]-0.004303314829119352*rho[5]*weight[13]+0.021516574145596764*rho[4]*weight[13]+0.037267799624996496*rho[3]*weight[13]+0.012422599874998832*rho[2]*weight[13]-0.012422599874998832*rho[1]*weight[13]-0.021516574145596764*rho[0]*weight[13]-0.011111111111111112*weight[12]*rho[13]+0.021825396825396828*weight[11]*rho[13]-0.022360679774997897*weight[10]*rho[13]-0.01924500897298753*weight[9]*rho[13]+0.010309826235529031*weight[7]*rho[13]-0.021516574145596764*weight[6]*rho[13]-0.004303314829119352*weight[5]*rho[13]+0.021516574145596764*weight[4]*rho[13]+0.037267799624996496*weight[3]*rho[13]+0.012422599874998832*weight[2]*rho[13]-0.012422599874998832*weight[1]*rho[13]-0.021516574145596764*weight[0]*rho[13]-0.06785714285714287*rho[12]*weight[12]-0.011111111111111112*rho[11]*weight[12]+0.022360679774997897*rho[10]*weight[12]-0.010309826235529031*rho[8]*weight[12]+0.01924500897298753*rho[7]*weight[12]+0.021516574145596764*rho[6]*weight[12]-0.021516574145596764*rho[5]*weight[12]+0.004303314829119352*rho[4]*weight[12]-0.012422599874998832*rho[3]*weight[12]-0.012422599874998832*rho[2]*weight[12]+0.037267799624996496*rho[1]*weight[12]+0.021516574145596764*rho[0]*weight[12]-0.011111111111111112*weight[11]*rho[12]+0.022360679774997897*weight[10]*rho[12]-0.010309826235529031*weight[8]*rho[12]+0.01924500897298753*weight[7]*rho[12]+0.021516574145596764*weight[6]*rho[12]-0.021516574145596764*weight[5]*rho[12]+0.004303314829119352*weight[4]*rho[12]-0.012422599874998832*weight[3]*rho[12]-0.012422599874998832*weight[2]*rho[12]+0.037267799624996496*weight[1]*rho[12]+0.021516574145596764*weight[0]*rho[12]-0.06785714285714287*rho[11]*weight[11]-0.022360679774997897*rho[10]*weight[11]-0.01924500897298753*rho[8]*weight[11]+0.010309826235529031*rho[7]*weight[11]-0.021516574145596764*rho[6]*weight[11]+0.021516574145596764*rho[5]*weight[11]-0.004303314829119352*rho[4]*weight[11]+0.012422599874998832*rho[3]*weight[11]+0.037267799624996496*rho[2]*weight[11]-0.012422599874998832*rho[1]*weight[11]-0.021516574145596764*rho[0]*weight[11]-0.022360679774997897*weight[10]*rho[11]-0.01924500897298753*weight[8]*rho[11]+0.010309826235529031*weight[7]*rho[11]-0.021516574145596764*weight[6]*rho[11]+0.021516574145596764*weight[5]*rho[11]-0.004303314829119352*weight[4]*rho[11]+0.012422599874998832*weight[3]*rho[11]+0.037267799624996496*weight[2]*rho[11]-0.012422599874998832*weight[1]*rho[11]-0.021516574145596764*weight[0]*rho[11]-0.025*rho[10]*weight[10]+0.02151657414559676*rho[9]*weight[10]+0.02151657414559676*rho[8]*weight[10]+0.02151657414559676*rho[7]*weight[10]+0.014433756729740645*rho[6]*weight[10]-0.014433756729740645*rho[5]*weight[10]-0.014433756729740645*rho[4]*weight[10]-0.025*rho[3]*weight[10]-0.025*rho[2]*weight[10]+0.025*rho[1]*weight[10]+0.024056261216234404*rho[0]*weight[10]+0.02151657414559676*weight[9]*rho[10]+0.02151657414559676*weight[8]*rho[10]+0.02151657414559676*weight[7]*rho[10]+0.014433756729740645*weight[6]*rho[10]-0.014433756729740645*weight[5]*rho[10]-0.014433756729740645*weight[4]*rho[10]-0.025*weight[3]*rho[10]-0.025*weight[2]*rho[10]+0.025*weight[1]*rho[10]+0.024056261216234404*weight[0]*rho[10]-0.10119047619047619*rho[9]*weight[9]+0.012422599874998833*rho[6]*weight[9]-0.012422599874998833*rho[5]*weight[9]-0.012422599874998833*rho[4]*weight[9]+0.02151657414559676*rho[3]*weight[9]-0.02151657414559676*rho[2]*weight[9]+0.02151657414559676*rho[1]*weight[9]+0.0372677996249965*rho[0]*weight[9]+0.012422599874998833*weight[6]*rho[9]-0.012422599874998833*weight[5]*rho[9]-0.012422599874998833*weight[4]*rho[9]+0.02151657414559676*weight[3]*rho[9]-0.02151657414559676*weight[2]*rho[9]+0.02151657414559676*weight[1]*rho[9]+0.0372677996249965*weight[0]*rho[9]-0.10119047619047619*rho[8]*weight[8]+0.012422599874998833*rho[6]*weight[8]-0.012422599874998833*rho[5]*weight[8]-0.012422599874998833*rho[4]*weight[8]-0.02151657414559676*rho[3]*weight[8]+0.02151657414559676*rho[2]*weight[8]+0.02151657414559676*rho[1]*weight[8]+0.0372677996249965*rho[0]*weight[8]+0.012422599874998833*weight[6]*rho[8]-0.012422599874998833*weight[5]*rho[8]-0.012422599874998833*weight[4]*rho[8]-0.02151657414559676*weight[3]*rho[8]+0.02151657414559676*weight[2]*rho[8]+0.02151657414559676*weight[1]*rho[8]+0.0372677996249965*weight[0]*rho[8]-0.10119047619047619*rho[7]*weight[7]+0.012422599874998833*rho[6]*weight[7]-0.012422599874998833*rho[5]*weight[7]-0.012422599874998833*rho[4]*weight[7]-0.02151657414559676*rho[3]*weight[7]-0.02151657414559676*rho[2]*weight[7]-0.02151657414559676*rho[1]*weight[7]+0.0372677996249965*rho[0]*weight[7]+0.012422599874998833*weight[6]*rho[7]-0.012422599874998833*weight[5]*rho[7]-0.012422599874998833*weight[4]*rho[7]-0.02151657414559676*weight[3]*rho[7]-0.02151657414559676*weight[2]*rho[7]-0.02151657414559676*weight[1]*rho[7]+0.0372677996249965*weight[0]*rho[7]-0.058333333333333334*rho[6]*weight[6]-0.025*rho[5]*weight[6]-0.025*rho[4]*weight[6]+0.004811252243246881*rho[3]*weight[6]+0.004811252243246881*rho[2]*weight[6]+0.024056261216234404*rho[1]*weight[6]+0.01388888888888889*rho[0]*weight[6]-0.025*weight[5]*rho[6]-0.025*weight[4]*rho[6]+0.004811252243246881*weight[3]*rho[6]+0.004811252243246881*weight[2]*rho[6]+0.024056261216234404*weight[1]*rho[6]+0.01388888888888889*weight[0]*rho[6]-0.058333333333333334*rho[5]*weight[5]+0.025*rho[4]*weight[5]-0.004811252243246881*rho[3]*weight[5]+0.024056261216234404*rho[2]*weight[5]+0.004811252243246881*rho[1]*weight[5]-0.01388888888888889*rho[0]*weight[5]+0.025*weight[4]*rho[5]-0.004811252243246881*weight[3]*rho[5]+0.024056261216234404*weight[2]*rho[5]+0.004811252243246881*weight[1]*rho[5]-0.01388888888888889*weight[0]*rho[5]-0.058333333333333334*rho[4]*weight[4]+0.024056261216234404*rho[3]*weight[4]-0.004811252243246881*rho[2]*weight[4]+0.004811252243246881*rho[1]*weight[4]-0.01388888888888889*rho[0]*weight[4]+0.024056261216234404*weight[3]*rho[4]-0.004811252243246881*weight[2]*rho[4]+0.004811252243246881*weight[1]*rho[4]-0.01388888888888889*weight[0]*rho[4]-0.09166666666666667*rho[3]*weight[3]+0.01388888888888889*rho[2]*weight[3]-0.01388888888888889*rho[1]*weight[3]+0.024056261216234404*rho[0]*weight[3]+0.01388888888888889*weight[2]*rho[3]-0.01388888888888889*weight[1]*rho[3]+0.024056261216234404*weight[0]*rho[3]-0.09166666666666667*rho[2]*weight[2]-0.01388888888888889*rho[1]*weight[2]+0.024056261216234404*rho[0]*weight[2]-0.01388888888888889*weight[1]*rho[2]+0.024056261216234404*weight[0]*rho[2]-0.09166666666666667*rho[1]*weight[1]-0.024056261216234404*rho[0]*weight[1]-0.024056261216234404*weight[0]*rho[1]-0.125*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[2]] += -(0.034523809523809526*rho[19]*weight[19])+0.02*rho[18]*weight[19]-0.02*rho[17]*weight[19]+0.008935182737458497*rho[16]*weight[19]-0.008935182737458497*rho[15]*weight[19]+0.01924500897298753*rho[14]*weight[19]+0.01924500897298753*rho[13]*weight[19]-0.01924500897298753*rho[12]*weight[19]+0.01924500897298753*rho[11]*weight[19]-0.012909944487358056*rho[10]*weight[19]-0.021825396825396828*rho[9]*weight[19]-0.011111111111111112*rho[8]*weight[19]-0.011111111111111112*rho[7]*weight[19]-0.022360679774997897*rho[6]*weight[19]+0.022360679774997897*rho[5]*weight[19]+0.0372677996249965*rho[4]*weight[19]+0.02151657414559676*rho[3]*weight[19]+0.02151657414559676*rho[2]*weight[19]-0.02151657414559676*rho[1]*weight[19]-0.012422599874998833*rho[0]*weight[19]+0.02*weight[18]*rho[19]-0.02*weight[17]*rho[19]+0.008935182737458497*weight[16]*rho[19]-0.008935182737458497*weight[15]*rho[19]+0.01924500897298753*weight[14]*rho[19]+0.01924500897298753*weight[13]*rho[19]-0.01924500897298753*weight[12]*rho[19]+0.01924500897298753*weight[11]*rho[19]-0.012909944487358056*weight[10]*rho[19]-0.021825396825396828*weight[9]*rho[19]-0.011111111111111112*weight[8]*rho[19]-0.011111111111111112*weight[7]*rho[19]-0.022360679774997897*weight[6]*rho[19]+0.022360679774997897*weight[5]*rho[19]+0.0372677996249965*weight[4]*rho[19]+0.02151657414559676*weight[3]*rho[19]+0.02151657414559676*weight[2]*rho[19]-0.02151657414559676*weight[1]*rho[19]-0.012422599874998833*weight[0]*rho[19]-0.034523809523809526*rho[18]*weight[18]-0.02*rho[17]*weight[18]+0.01924500897298753*rho[16]*weight[18]-0.01924500897298753*rho[15]*weight[18]+0.008935182737458497*rho[14]*weight[18]+0.01924500897298753*rho[13]*weight[18]-0.008935182737458497*rho[12]*weight[18]+0.01924500897298753*rho[11]*weight[18]-0.012909944487358056*rho[10]*weight[18]-0.011111111111111112*rho[9]*weight[18]-0.021825396825396828*rho[8]*weight[18]-0.011111111111111112*rho[7]*weight[18]-0.022360679774997897*rho[6]*weight[18]+0.0372677996249965*rho[5]*weight[18]+0.022360679774997897*rho[4]*weight[18]+0.02151657414559676*rho[3]*weight[18]+0.02151657414559676*rho[2]*weight[18]-0.02151657414559676*rho[1]*weight[18]-0.012422599874998833*rho[0]*weight[18]-0.02*weight[17]*rho[18]+0.01924500897298753*weight[16]*rho[18]-0.01924500897298753*weight[15]*rho[18]+0.008935182737458497*weight[14]*rho[18]+0.01924500897298753*weight[13]*rho[18]-0.008935182737458497*weight[12]*rho[18]+0.01924500897298753*weight[11]*rho[18]-0.012909944487358056*weight[10]*rho[18]-0.011111111111111112*weight[9]*rho[18]-0.021825396825396828*weight[8]*rho[18]-0.011111111111111112*weight[7]*rho[18]-0.022360679774997897*weight[6]*rho[18]+0.0372677996249965*weight[5]*rho[18]+0.022360679774997897*weight[4]*rho[18]+0.02151657414559676*weight[3]*rho[18]+0.02151657414559676*weight[2]*rho[18]-0.02151657414559676*weight[1]*rho[18]-0.012422599874998833*weight[0]*rho[18]-0.034523809523809526*rho[17]*weight[17]-0.01924500897298753*rho[16]*weight[17]+0.01924500897298753*rho[15]*weight[17]-0.01924500897298753*rho[14]*weight[17]-0.008935182737458497*rho[13]*weight[17]+0.01924500897298753*rho[12]*weight[17]-0.008935182737458497*rho[11]*weight[17]+0.012909944487358056*rho[10]*weight[17]+0.011111111111111112*rho[9]*weight[17]+0.011111111111111112*rho[8]*weight[17]+0.021825396825396828*rho[7]*weight[17]+0.0372677996249965*rho[6]*weight[17]-0.022360679774997897*rho[5]*weight[17]-0.022360679774997897*rho[4]*weight[17]-0.02151657414559676*rho[3]*weight[17]-0.02151657414559676*rho[2]*weight[17]+0.02151657414559676*rho[1]*weight[17]+0.012422599874998833*rho[0]*weight[17]-0.01924500897298753*weight[16]*rho[17]+0.01924500897298753*weight[15]*rho[17]-0.01924500897298753*weight[14]*rho[17]-0.008935182737458497*weight[13]*rho[17]+0.01924500897298753*weight[12]*rho[17]-0.008935182737458497*weight[11]*rho[17]+0.012909944487358056*weight[10]*rho[17]+0.011111111111111112*weight[9]*rho[17]+0.011111111111111112*weight[8]*rho[17]+0.021825396825396828*weight[7]*rho[17]+0.0372677996249965*weight[6]*rho[17]-0.022360679774997897*weight[5]*rho[17]-0.022360679774997897*weight[4]*rho[17]-0.02151657414559676*weight[3]*rho[17]-0.02151657414559676*weight[2]*rho[17]+0.02151657414559676*weight[1]*rho[17]+0.012422599874998833*weight[0]*rho[17]-0.06785714285714287*rho[16]*weight[16]-0.021825396825396828*rho[15]*weight[16]+0.011111111111111112*rho[14]*weight[16]+0.011111111111111112*rho[13]*weight[16]-0.011111111111111112*rho[12]*weight[16]-0.022360679774997897*rho[10]*weight[16]+0.010309826235529031*rho[9]*weight[16]-0.01924500897298753*rho[8]*weight[16]+0.004303314829119352*rho[6]*weight[16]+0.021516574145596764*rho[5]*weight[16]+0.021516574145596764*rho[4]*weight[16]+0.012422599874998832*rho[3]*weight[16]+0.037267799624996496*rho[2]*weight[16]-0.012422599874998832*rho[1]*weight[16]-0.021516574145596764*rho[0]*weight[16]-0.021825396825396828*weight[15]*rho[16]+0.011111111111111112*weight[14]*rho[16]+0.011111111111111112*weight[13]*rho[16]-0.011111111111111112*weight[12]*rho[16]-0.022360679774997897*weight[10]*rho[16]+0.010309826235529031*weight[9]*rho[16]-0.01924500897298753*weight[8]*rho[16]+0.004303314829119352*weight[6]*rho[16]+0.021516574145596764*weight[5]*rho[16]+0.021516574145596764*weight[4]*rho[16]+0.012422599874998832*weight[3]*rho[16]+0.037267799624996496*weight[2]*rho[16]-0.012422599874998832*weight[1]*rho[16]-0.021516574145596764*weight[0]*rho[16]-0.06785714285714287*rho[15]*weight[15]-0.011111111111111112*rho[14]*weight[15]-0.011111111111111112*rho[13]*weight[15]-0.011111111111111112*rho[11]*weight[15]+0.022360679774997897*rho[10]*weight[15]-0.010309826235529031*rho[9]*weight[15]+0.01924500897298753*rho[7]*weight[15]+0.021516574145596764*rho[6]*weight[15]+0.004303314829119352*rho[5]*weight[15]-0.021516574145596764*rho[4]*weight[15]-0.012422599874998832*rho[3]*weight[15]-0.012422599874998832*rho[2]*weight[15]+0.037267799624996496*rho[1]*weight[15]+0.021516574145596764*rho[0]*weight[15]-0.011111111111111112*weight[14]*rho[15]-0.011111111111111112*weight[13]*rho[15]-0.011111111111111112*weight[11]*rho[15]+0.022360679774997897*weight[10]*rho[15]-0.010309826235529031*weight[9]*rho[15]+0.01924500897298753*weight[7]*rho[15]+0.021516574145596764*weight[6]*rho[15]+0.004303314829119352*weight[5]*rho[15]-0.021516574145596764*weight[4]*rho[15]-0.012422599874998832*weight[3]*rho[15]-0.012422599874998832*weight[2]*rho[15]+0.037267799624996496*weight[1]*rho[15]+0.021516574145596764*weight[0]*rho[15]-0.06785714285714287*rho[14]*weight[14]-0.021825396825396828*rho[12]*weight[14]+0.011111111111111112*rho[11]*weight[14]-0.022360679774997897*rho[10]*weight[14]-0.01924500897298753*rho[9]*weight[14]+0.010309826235529031*rho[8]*weight[14]+0.004303314829119352*rho[6]*weight[14]+0.021516574145596764*rho[5]*weight[14]+0.021516574145596764*rho[4]*weight[14]+0.037267799624996496*rho[3]*weight[14]+0.012422599874998832*rho[2]*weight[14]-0.012422599874998832*rho[1]*weight[14]-0.021516574145596764*rho[0]*weight[14]-0.021825396825396828*weight[12]*rho[14]+0.011111111111111112*weight[11]*rho[14]-0.022360679774997897*weight[10]*rho[14]-0.01924500897298753*weight[9]*rho[14]+0.010309826235529031*weight[8]*rho[14]+0.004303314829119352*weight[6]*rho[14]+0.021516574145596764*weight[5]*rho[14]+0.021516574145596764*weight[4]*rho[14]+0.037267799624996496*weight[3]*rho[14]+0.012422599874998832*weight[2]*rho[14]-0.012422599874998832*weight[1]*rho[14]-0.021516574145596764*weight[0]*rho[14]-0.06785714285714287*rho[13]*weight[13]-0.011111111111111112*rho[12]*weight[13]+0.021825396825396828*rho[11]*weight[13]-0.022360679774997897*rho[10]*weight[13]-0.01924500897298753*rho[9]*weight[13]+0.010309826235529031*rho[7]*weight[13]-0.021516574145596764*rho[6]*weight[13]-0.004303314829119352*rho[5]*weight[13]+0.021516574145596764*rho[4]*weight[13]+0.037267799624996496*rho[3]*weight[13]+0.012422599874998832*rho[2]*weight[13]-0.012422599874998832*rho[1]*weight[13]-0.021516574145596764*rho[0]*weight[13]-0.011111111111111112*weight[12]*rho[13]+0.021825396825396828*weight[11]*rho[13]-0.022360679774997897*weight[10]*rho[13]-0.01924500897298753*weight[9]*rho[13]+0.010309826235529031*weight[7]*rho[13]-0.021516574145596764*weight[6]*rho[13]-0.004303314829119352*weight[5]*rho[13]+0.021516574145596764*weight[4]*rho[13]+0.037267799624996496*weight[3]*rho[13]+0.012422599874998832*weight[2]*rho[13]-0.012422599874998832*weight[1]*rho[13]-0.021516574145596764*weight[0]*rho[13]-0.06785714285714287*rho[12]*weight[12]-0.011111111111111112*rho[11]*weight[12]+0.022360679774997897*rho[10]*weight[12]-0.010309826235529031*rho[8]*weight[12]+0.01924500897298753*rho[7]*weight[12]+0.021516574145596764*rho[6]*weight[12]-0.021516574145596764*rho[5]*weight[12]+0.004303314829119352*rho[4]*weight[12]-0.012422599874998832*rho[3]*weight[12]-0.012422599874998832*rho[2]*weight[12]+0.037267799624996496*rho[1]*weight[12]+0.021516574145596764*rho[0]*weight[12]-0.011111111111111112*weight[11]*rho[12]+0.022360679774997897*weight[10]*rho[12]-0.010309826235529031*weight[8]*rho[12]+0.01924500897298753*weight[7]*rho[12]+0.021516574145596764*weight[6]*rho[12]-0.021516574145596764*weight[5]*rho[12]+0.004303314829119352*weight[4]*rho[12]-0.012422599874998832*weight[3]*rho[12]-0.012422599874998832*weight[2]*rho[12]+0.037267799624996496*weight[1]*rho[12]+0.021516574145596764*weight[0]*rho[12]-0.06785714285714287*rho[11]*weight[11]-0.022360679774997897*rho[10]*weight[11]-0.01924500897298753*rho[8]*weight[11]+0.010309826235529031*rho[7]*weight[11]-0.021516574145596764*rho[6]*weight[11]+0.021516574145596764*rho[5]*weight[11]-0.004303314829119352*rho[4]*weight[11]+0.012422599874998832*rho[3]*weight[11]+0.037267799624996496*rho[2]*weight[11]-0.012422599874998832*rho[1]*weight[11]-0.021516574145596764*rho[0]*weight[11]-0.022360679774997897*weight[10]*rho[11]-0.01924500897298753*weight[8]*rho[11]+0.010309826235529031*weight[7]*rho[11]-0.021516574145596764*weight[6]*rho[11]+0.021516574145596764*weight[5]*rho[11]-0.004303314829119352*weight[4]*rho[11]+0.012422599874998832*weight[3]*rho[11]+0.037267799624996496*weight[2]*rho[11]-0.012422599874998832*weight[1]*rho[11]-0.021516574145596764*weight[0]*rho[11]-0.025*rho[10]*weight[10]+0.02151657414559676*rho[9]*weight[10]+0.02151657414559676*rho[8]*weight[10]+0.02151657414559676*rho[7]*weight[10]+0.014433756729740645*rho[6]*weight[10]-0.014433756729740645*rho[5]*weight[10]-0.014433756729740645*rho[4]*weight[10]-0.025*rho[3]*weight[10]-0.025*rho[2]*weight[10]+0.025*rho[1]*weight[10]+0.024056261216234404*rho[0]*weight[10]+0.02151657414559676*weight[9]*rho[10]+0.02151657414559676*weight[8]*rho[10]+0.02151657414559676*weight[7]*rho[10]+0.014433756729740645*weight[6]*rho[10]-0.014433756729740645*weight[5]*rho[10]-0.014433756729740645*weight[4]*rho[10]-0.025*weight[3]*rho[10]-0.025*weight[2]*rho[10]+0.025*weight[1]*rho[10]+0.024056261216234404*weight[0]*rho[10]-0.10119047619047619*rho[9]*weight[9]+0.012422599874998833*rho[6]*weight[9]-0.012422599874998833*rho[5]*weight[9]-0.012422599874998833*rho[4]*weight[9]+0.02151657414559676*rho[3]*weight[9]-0.02151657414559676*rho[2]*weight[9]+0.02151657414559676*rho[1]*weight[9]+0.0372677996249965*rho[0]*weight[9]+0.012422599874998833*weight[6]*rho[9]-0.012422599874998833*weight[5]*rho[9]-0.012422599874998833*weight[4]*rho[9]+0.02151657414559676*weight[3]*rho[9]-0.02151657414559676*weight[2]*rho[9]+0.02151657414559676*weight[1]*rho[9]+0.0372677996249965*weight[0]*rho[9]-0.10119047619047619*rho[8]*weight[8]+0.012422599874998833*rho[6]*weight[8]-0.012422599874998833*rho[5]*weight[8]-0.012422599874998833*rho[4]*weight[8]-0.02151657414559676*rho[3]*weight[8]+0.02151657414559676*rho[2]*weight[8]+0.02151657414559676*rho[1]*weight[8]+0.0372677996249965*rho[0]*weight[8]+0.012422599874998833*weight[6]*rho[8]-0.012422599874998833*weight[5]*rho[8]-0.012422599874998833*weight[4]*rho[8]-0.02151657414559676*weight[3]*rho[8]+0.02151657414559676*weight[2]*rho[8]+0.02151657414559676*weight[1]*rho[8]+0.0372677996249965*weight[0]*rho[8]-0.10119047619047619*rho[7]*weight[7]+0.012422599874998833*rho[6]*weight[7]-0.012422599874998833*rho[5]*weight[7]-0.012422599874998833*rho[4]*weight[7]-0.02151657414559676*rho[3]*weight[7]-0.02151657414559676*rho[2]*weight[7]-0.02151657414559676*rho[1]*weight[7]+0.0372677996249965*rho[0]*weight[7]+0.012422599874998833*weight[6]*rho[7]-0.012422599874998833*weight[5]*rho[7]-0.012422599874998833*weight[4]*rho[7]-0.02151657414559676*weight[3]*rho[7]-0.02151657414559676*weight[2]*rho[7]-0.02151657414559676*weight[1]*rho[7]+0.0372677996249965*weight[0]*rho[7]-0.058333333333333334*rho[6]*weight[6]-0.025*rho[5]*weight[6]-0.025*rho[4]*weight[6]+0.004811252243246881*rho[3]*weight[6]+0.004811252243246881*rho[2]*weight[6]+0.024056261216234404*rho[1]*weight[6]+0.01388888888888889*rho[0]*weight[6]-0.025*weight[5]*rho[6]-0.025*weight[4]*rho[6]+0.004811252243246881*weight[3]*rho[6]+0.004811252243246881*weight[2]*rho[6]+0.024056261216234404*weight[1]*rho[6]+0.01388888888888889*weight[0]*rho[6]-0.058333333333333334*rho[5]*weight[5]+0.025*rho[4]*weight[5]-0.004811252243246881*rho[3]*weight[5]+0.024056261216234404*rho[2]*weight[5]+0.004811252243246881*rho[1]*weight[5]-0.01388888888888889*rho[0]*weight[5]+0.025*weight[4]*rho[5]-0.004811252243246881*weight[3]*rho[5]+0.024056261216234404*weight[2]*rho[5]+0.004811252243246881*weight[1]*rho[5]-0.01388888888888889*weight[0]*rho[5]-0.058333333333333334*rho[4]*weight[4]+0.024056261216234404*rho[3]*weight[4]-0.004811252243246881*rho[2]*weight[4]+0.004811252243246881*rho[1]*weight[4]-0.01388888888888889*rho[0]*weight[4]+0.024056261216234404*weight[3]*rho[4]-0.004811252243246881*weight[2]*rho[4]+0.004811252243246881*weight[1]*rho[4]-0.01388888888888889*weight[0]*rho[4]-0.09166666666666667*rho[3]*weight[3]+0.01388888888888889*rho[2]*weight[3]-0.01388888888888889*rho[1]*weight[3]+0.024056261216234404*rho[0]*weight[3]+0.01388888888888889*weight[2]*rho[3]-0.01388888888888889*weight[1]*rho[3]+0.024056261216234404*weight[0]*rho[3]-0.09166666666666667*rho[2]*weight[2]-0.01388888888888889*rho[1]*weight[2]+0.024056261216234404*rho[0]*weight[2]-0.01388888888888889*weight[1]*rho[2]+0.024056261216234404*weight[0]*rho[2]-0.09166666666666667*rho[1]*weight[1]-0.024056261216234404*rho[0]*weight[1]-0.024056261216234404*weight[0]*rho[1]-0.125*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[3]],0.1*rho[19]*weight[19]+0.02666666666666667*rho[17]*weight[19]-0.05773502691896258*rho[16]*weight[19]-0.051639777949432225*rho[10]*weight[19]+0.029814239699997195*rho[6]*weight[19]+0.02666666666666667*weight[17]*rho[19]-0.05773502691896258*weight[16]*rho[19]-0.051639777949432225*weight[10]*rho[19]+0.029814239699997195*weight[6]*rho[19]+0.11904761904761905*rho[18]*weight[18]+0.03849001794597506*rho[15]*weight[18]-0.06873217490352689*rho[14]*weight[18]+0.03849001794597506*rho[13]*weight[18]-0.06873217490352689*rho[12]*weight[18]-0.022222222222222223*rho[9]*weight[18]+0.03968253968253969*rho[8]*weight[18]-0.022222222222222223*rho[7]*weight[18]-0.074535599249993*rho[5]*weight[18]+0.04303314829119352*rho[3]*weight[18]+0.04303314829119352*rho[1]*weight[18]-0.024845199749997667*rho[0]*weight[18]+0.03849001794597506*weight[15]*rho[18]-0.06873217490352689*weight[14]*rho[18]+0.03849001794597506*weight[13]*rho[18]-0.06873217490352689*weight[12]*rho[18]-0.022222222222222223*weight[9]*rho[18]+0.03968253968253969*weight[8]*rho[18]-0.022222222222222223*weight[7]*rho[18]-0.074535599249993*weight[5]*rho[18]+0.04303314829119352*weight[3]*rho[18]+0.04303314829119352*weight[1]*rho[18]-0.024845199749997667*weight[0]*rho[18]+0.1*rho[17]*weight[17]-0.05773502691896258*rho[11]*weight[17]-0.051639777949432225*rho[10]*weight[17]+0.029814239699997195*rho[4]*weight[17]-0.05773502691896258*weight[11]*rho[17]-0.051639777949432225*weight[10]*rho[17]+0.029814239699997195*weight[4]*rho[17]+0.1*rho[16]*weight[16]+0.029814239699997195*rho[10]*weight[16]-0.05163977794943223*rho[6]*weight[16]+0.029814239699997195*weight[10]*rho[16]-0.05163977794943223*weight[6]*rho[16]+0.16666666666666669*rho[15]*weight[15]-0.022222222222222223*rho[14]*weight[15]+0.044444444444444446*rho[13]*weight[15]-0.09622504486493764*rho[9]*weight[15]-0.08606629658238706*rho[5]*weight[15]+0.049690399499995326*rho[3]*weight[15]-0.022222222222222223*weight[14]*rho[15]+0.044444444444444446*weight[13]*rho[15]-0.09622504486493764*weight[9]*rho[15]-0.08606629658238706*weight[5]*rho[15]+0.049690399499995326*weight[3]*rho[15]+0.11904761904761905*rho[14]*weight[14]+0.03968253968253969*rho[12]*weight[14]+0.03849001794597506*rho[9]*weight[14]-0.06873217490352689*rho[8]*weight[14]+0.04303314829119353*rho[5]*weight[14]-0.07453559924999299*rho[3]*weight[14]-0.024845199749997663*rho[1]*weight[14]+0.04303314829119353*rho[0]*weight[14]+0.03968253968253969*weight[12]*rho[14]+0.03849001794597506*weight[9]*rho[14]-0.06873217490352689*weight[8]*rho[14]+0.04303314829119353*weight[5]*rho[14]-0.07453559924999299*weight[3]*rho[14]-0.024845199749997663*weight[1]*rho[14]+0.04303314829119353*weight[0]*rho[14]+0.16666666666666669*rho[13]*weight[13]-0.022222222222222223*rho[12]*weight[13]-0.09622504486493764*rho[7]*weight[13]-0.08606629658238706*rho[5]*weight[13]+0.049690399499995326*rho[1]*weight[13]-0.022222222222222223*weight[12]*rho[13]-0.09622504486493764*weight[7]*rho[13]-0.08606629658238706*weight[5]*rho[13]+0.049690399499995326*weight[1]*rho[13]+0.11904761904761905*rho[12]*weight[12]-0.06873217490352689*rho[8]*weight[12]+0.03849001794597506*rho[7]*weight[12]+0.04303314829119353*rho[5]*weight[12]-0.024845199749997663*rho[3]*weight[12]-0.07453559924999299*rho[1]*weight[12]+0.04303314829119353*rho[0]*weight[12]-0.06873217490352689*weight[8]*rho[12]+0.03849001794597506*weight[7]*rho[12]+0.04303314829119353*weight[5]*rho[12]-0.024845199749997663*weight[3]*rho[12]-0.07453559924999299*weight[1]*rho[12]+0.04303314829119353*weight[0]*rho[12]+0.1*rho[11]*weight[11]+0.029814239699997195*rho[10]*weight[11]-0.05163977794943223*rho[4]*weight[11]+0.029814239699997195*weight[10]*rho[11]-0.05163977794943223*weight[4]*rho[11]+0.1*rho[10]*weight[10]-0.05773502691896258*rho[6]*weight[10]-0.05773502691896258*rho[4]*weight[10]+0.03333333333333333*rho[2]*weight[10]-0.05773502691896258*weight[6]*rho[10]-0.05773502691896258*weight[4]*rho[10]+0.03333333333333333*weight[2]*rho[10]+0.16666666666666669*rho[9]*weight[9]+0.04969039949999533*rho[5]*weight[9]-0.08606629658238704*rho[3]*weight[9]+0.04969039949999533*weight[5]*rho[9]-0.08606629658238704*weight[3]*rho[9]+0.11904761904761905*rho[8]*weight[8]-0.024845199749997667*rho[5]*weight[8]+0.04303314829119352*rho[3]*weight[8]+0.04303314829119352*rho[1]*weight[8]-0.074535599249993*rho[0]*weight[8]-0.024845199749997667*weight[5]*rho[8]+0.04303314829119352*weight[3]*rho[8]+0.04303314829119352*weight[1]*rho[8]-0.074535599249993*weight[0]*rho[8]+0.16666666666666669*rho[7]*weight[7]+0.04969039949999533*rho[5]*weight[7]-0.08606629658238704*rho[1]*weight[7]+0.04969039949999533*weight[5]*rho[7]-0.08606629658238704*weight[1]*rho[7]+0.1*rho[6]*weight[6]+0.03333333333333333*rho[4]*weight[6]-0.05773502691896258*rho[2]*weight[6]+0.03333333333333333*weight[4]*rho[6]-0.05773502691896258*weight[2]*rho[6]+0.16666666666666669*rho[5]*weight[5]-0.09622504486493762*rho[3]*weight[5]-0.09622504486493762*rho[1]*weight[5]+0.05555555555555556*rho[0]*weight[5]-0.09622504486493762*weight[3]*rho[5]-0.09622504486493762*weight[1]*rho[5]+0.05555555555555556*weight[0]*rho[5]+0.1*rho[4]*weight[4]-0.05773502691896258*rho[2]*weight[4]-0.05773502691896258*weight[2]*rho[4]+0.16666666666666669*rho[3]*weight[3]+0.05555555555555556*rho[1]*weight[3]-0.09622504486493762*rho[0]*weight[3]+0.05555555555555556*weight[1]*rho[3]-0.09622504486493762*weight[0]*rho[3]+0.1*rho[2]*weight[2]+0.16666666666666669*rho[1]*weight[1]-0.09622504486493762*rho[0]*weight[1]-0.09622504486493762*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[3]] += 0.1*rho[19]*weight[19]+0.02666666666666667*rho[17]*weight[19]-0.05773502691896258*rho[16]*weight[19]-0.051639777949432225*rho[10]*weight[19]+0.029814239699997195*rho[6]*weight[19]+0.02666666666666667*weight[17]*rho[19]-0.05773502691896258*weight[16]*rho[19]-0.051639777949432225*weight[10]*rho[19]+0.029814239699997195*weight[6]*rho[19]+0.11904761904761905*rho[18]*weight[18]+0.03849001794597506*rho[15]*weight[18]-0.06873217490352689*rho[14]*weight[18]+0.03849001794597506*rho[13]*weight[18]-0.06873217490352689*rho[12]*weight[18]-0.022222222222222223*rho[9]*weight[18]+0.03968253968253969*rho[8]*weight[18]-0.022222222222222223*rho[7]*weight[18]-0.074535599249993*rho[5]*weight[18]+0.04303314829119352*rho[3]*weight[18]+0.04303314829119352*rho[1]*weight[18]-0.024845199749997667*rho[0]*weight[18]+0.03849001794597506*weight[15]*rho[18]-0.06873217490352689*weight[14]*rho[18]+0.03849001794597506*weight[13]*rho[18]-0.06873217490352689*weight[12]*rho[18]-0.022222222222222223*weight[9]*rho[18]+0.03968253968253969*weight[8]*rho[18]-0.022222222222222223*weight[7]*rho[18]-0.074535599249993*weight[5]*rho[18]+0.04303314829119352*weight[3]*rho[18]+0.04303314829119352*weight[1]*rho[18]-0.024845199749997667*weight[0]*rho[18]+0.1*rho[17]*weight[17]-0.05773502691896258*rho[11]*weight[17]-0.051639777949432225*rho[10]*weight[17]+0.029814239699997195*rho[4]*weight[17]-0.05773502691896258*weight[11]*rho[17]-0.051639777949432225*weight[10]*rho[17]+0.029814239699997195*weight[4]*rho[17]+0.1*rho[16]*weight[16]+0.029814239699997195*rho[10]*weight[16]-0.05163977794943223*rho[6]*weight[16]+0.029814239699997195*weight[10]*rho[16]-0.05163977794943223*weight[6]*rho[16]+0.16666666666666669*rho[15]*weight[15]-0.022222222222222223*rho[14]*weight[15]+0.044444444444444446*rho[13]*weight[15]-0.09622504486493764*rho[9]*weight[15]-0.08606629658238706*rho[5]*weight[15]+0.049690399499995326*rho[3]*weight[15]-0.022222222222222223*weight[14]*rho[15]+0.044444444444444446*weight[13]*rho[15]-0.09622504486493764*weight[9]*rho[15]-0.08606629658238706*weight[5]*rho[15]+0.049690399499995326*weight[3]*rho[15]+0.11904761904761905*rho[14]*weight[14]+0.03968253968253969*rho[12]*weight[14]+0.03849001794597506*rho[9]*weight[14]-0.06873217490352689*rho[8]*weight[14]+0.04303314829119353*rho[5]*weight[14]-0.07453559924999299*rho[3]*weight[14]-0.024845199749997663*rho[1]*weight[14]+0.04303314829119353*rho[0]*weight[14]+0.03968253968253969*weight[12]*rho[14]+0.03849001794597506*weight[9]*rho[14]-0.06873217490352689*weight[8]*rho[14]+0.04303314829119353*weight[5]*rho[14]-0.07453559924999299*weight[3]*rho[14]-0.024845199749997663*weight[1]*rho[14]+0.04303314829119353*weight[0]*rho[14]+0.16666666666666669*rho[13]*weight[13]-0.022222222222222223*rho[12]*weight[13]-0.09622504486493764*rho[7]*weight[13]-0.08606629658238706*rho[5]*weight[13]+0.049690399499995326*rho[1]*weight[13]-0.022222222222222223*weight[12]*rho[13]-0.09622504486493764*weight[7]*rho[13]-0.08606629658238706*weight[5]*rho[13]+0.049690399499995326*weight[1]*rho[13]+0.11904761904761905*rho[12]*weight[12]-0.06873217490352689*rho[8]*weight[12]+0.03849001794597506*rho[7]*weight[12]+0.04303314829119353*rho[5]*weight[12]-0.024845199749997663*rho[3]*weight[12]-0.07453559924999299*rho[1]*weight[12]+0.04303314829119353*rho[0]*weight[12]-0.06873217490352689*weight[8]*rho[12]+0.03849001794597506*weight[7]*rho[12]+0.04303314829119353*weight[5]*rho[12]-0.024845199749997663*weight[3]*rho[12]-0.07453559924999299*weight[1]*rho[12]+0.04303314829119353*weight[0]*rho[12]+0.1*rho[11]*weight[11]+0.029814239699997195*rho[10]*weight[11]-0.05163977794943223*rho[4]*weight[11]+0.029814239699997195*weight[10]*rho[11]-0.05163977794943223*weight[4]*rho[11]+0.1*rho[10]*weight[10]-0.05773502691896258*rho[6]*weight[10]-0.05773502691896258*rho[4]*weight[10]+0.03333333333333333*rho[2]*weight[10]-0.05773502691896258*weight[6]*rho[10]-0.05773502691896258*weight[4]*rho[10]+0.03333333333333333*weight[2]*rho[10]+0.16666666666666669*rho[9]*weight[9]+0.04969039949999533*rho[5]*weight[9]-0.08606629658238704*rho[3]*weight[9]+0.04969039949999533*weight[5]*rho[9]-0.08606629658238704*weight[3]*rho[9]+0.11904761904761905*rho[8]*weight[8]-0.024845199749997667*rho[5]*weight[8]+0.04303314829119352*rho[3]*weight[8]+0.04303314829119352*rho[1]*weight[8]-0.074535599249993*rho[0]*weight[8]-0.024845199749997667*weight[5]*rho[8]+0.04303314829119352*weight[3]*rho[8]+0.04303314829119352*weight[1]*rho[8]-0.074535599249993*weight[0]*rho[8]+0.16666666666666669*rho[7]*weight[7]+0.04969039949999533*rho[5]*weight[7]-0.08606629658238704*rho[1]*weight[7]+0.04969039949999533*weight[5]*rho[7]-0.08606629658238704*weight[1]*rho[7]+0.1*rho[6]*weight[6]+0.03333333333333333*rho[4]*weight[6]-0.05773502691896258*rho[2]*weight[6]+0.03333333333333333*weight[4]*rho[6]-0.05773502691896258*weight[2]*rho[6]+0.16666666666666669*rho[5]*weight[5]-0.09622504486493762*rho[3]*weight[5]-0.09622504486493762*rho[1]*weight[5]+0.05555555555555556*rho[0]*weight[5]-0.09622504486493762*weight[3]*rho[5]-0.09622504486493762*weight[1]*rho[5]+0.05555555555555556*weight[0]*rho[5]+0.1*rho[4]*weight[4]-0.05773502691896258*rho[2]*weight[4]-0.05773502691896258*weight[2]*rho[4]+0.16666666666666669*rho[3]*weight[3]+0.05555555555555556*rho[1]*weight[3]-0.09622504486493762*rho[0]*weight[3]+0.05555555555555556*weight[1]*rho[3]-0.09622504486493762*weight[0]*rho[3]+0.1*rho[2]*weight[2]+0.16666666666666669*rho[1]*weight[1]-0.09622504486493762*rho[0]*weight[1]-0.09622504486493762*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[4]],0.1*rho[19]*weight[19]-0.02666666666666667*rho[17]*weight[19]+0.05773502691896258*rho[16]*weight[19]-0.051639777949432225*rho[10]*weight[19]-0.029814239699997195*rho[6]*weight[19]-0.02666666666666667*weight[17]*rho[19]+0.05773502691896258*weight[16]*rho[19]-0.051639777949432225*weight[10]*rho[19]-0.029814239699997195*weight[6]*rho[19]+0.11904761904761905*rho[18]*weight[18]+0.03849001794597506*rho[15]*weight[18]+0.06873217490352689*rho[14]*weight[18]-0.03849001794597506*rho[13]*weight[18]-0.06873217490352689*rho[12]*weight[18]+0.022222222222222223*rho[9]*weight[18]-0.03968253968253969*rho[8]*weight[18]+0.022222222222222223*rho[7]*weight[18]-0.074535599249993*rho[5]*weight[18]-0.04303314829119352*rho[3]*weight[18]+0.04303314829119352*rho[1]*weight[18]+0.024845199749997667*rho[0]*weight[18]+0.03849001794597506*weight[15]*rho[18]+0.06873217490352689*weight[14]*rho[18]-0.03849001794597506*weight[13]*rho[18]-0.06873217490352689*weight[12]*rho[18]+0.022222222222222223*weight[9]*rho[18]-0.03968253968253969*weight[8]*rho[18]+0.022222222222222223*weight[7]*rho[18]-0.074535599249993*weight[5]*rho[18]-0.04303314829119352*weight[3]*rho[18]+0.04303314829119352*weight[1]*rho[18]+0.024845199749997667*weight[0]*rho[18]+0.1*rho[17]*weight[17]-0.05773502691896258*rho[11]*weight[17]+0.051639777949432225*rho[10]*weight[17]-0.029814239699997195*rho[4]*weight[17]-0.05773502691896258*weight[11]*rho[17]+0.051639777949432225*weight[10]*rho[17]-0.029814239699997195*weight[4]*rho[17]+0.1*rho[16]*weight[16]-0.029814239699997195*rho[10]*weight[16]-0.05163977794943223*rho[6]*weight[16]-0.029814239699997195*weight[10]*rho[16]-0.05163977794943223*weight[6]*rho[16]+0.16666666666666669*rho[15]*weight[15]+0.022222222222222223*rho[14]*weight[15]-0.044444444444444446*rho[13]*weight[15]+0.09622504486493764*rho[9]*weight[15]-0.08606629658238706*rho[5]*weight[15]-0.049690399499995326*rho[3]*weight[15]+0.022222222222222223*weight[14]*rho[15]-0.044444444444444446*weight[13]*rho[15]+0.09622504486493764*weight[9]*rho[15]-0.08606629658238706*weight[5]*rho[15]-0.049690399499995326*weight[3]*rho[15]+0.11904761904761905*rho[14]*weight[14]-0.03968253968253969*rho[12]*weight[14]+0.03849001794597506*rho[9]*weight[14]-0.06873217490352689*rho[8]*weight[14]-0.04303314829119353*rho[5]*weight[14]-0.07453559924999299*rho[3]*weight[14]+0.024845199749997663*rho[1]*weight[14]+0.04303314829119353*rho[0]*weight[14]-0.03968253968253969*weight[12]*rho[14]+0.03849001794597506*weight[9]*rho[14]-0.06873217490352689*weight[8]*rho[14]-0.04303314829119353*weight[5]*rho[14]-0.07453559924999299*weight[3]*rho[14]+0.024845199749997663*weight[1]*rho[14]+0.04303314829119353*weight[0]*rho[14]+0.16666666666666669*rho[13]*weight[13]+0.022222222222222223*rho[12]*weight[13]-0.09622504486493764*rho[7]*weight[13]+0.08606629658238706*rho[5]*weight[13]-0.049690399499995326*rho[1]*weight[13]+0.022222222222222223*weight[12]*rho[13]-0.09622504486493764*weight[7]*rho[13]+0.08606629658238706*weight[5]*rho[13]-0.049690399499995326*weight[1]*rho[13]+0.11904761904761905*rho[12]*weight[12]+0.06873217490352689*rho[8]*weight[12]-0.03849001794597506*rho[7]*weight[12]+0.04303314829119353*rho[5]*weight[12]+0.024845199749997663*rho[3]*weight[12]-0.07453559924999299*rho[1]*weight[12]-0.04303314829119353*rho[0]*weight[12]+0.06873217490352689*weight[8]*rho[12]-0.03849001794597506*weight[7]*rho[12]+0.04303314829119353*weight[5]*rho[12]+0.024845199749997663*weight[3]*rho[12]-0.07453559924999299*weight[1]*rho[12]-0.04303314829119353*weight[0]*rho[12]+0.1*rho[11]*weight[11]-0.029814239699997195*rho[10]*weight[11]+0.05163977794943223*rho[4]*weight[11]-0.029814239699997195*weight[10]*rho[11]+0.05163977794943223*weight[4]*rho[11]+0.1*rho[10]*weight[10]+0.05773502691896258*rho[6]*weight[10]-0.05773502691896258*rho[4]*weight[10]-0.03333333333333333*rho[2]*weight[10]+0.05773502691896258*weight[6]*rho[10]-0.05773502691896258*weight[4]*rho[10]-0.03333333333333333*weight[2]*rho[10]+0.16666666666666669*rho[9]*weight[9]-0.04969039949999533*rho[5]*weight[9]-0.08606629658238704*rho[3]*weight[9]-0.04969039949999533*weight[5]*rho[9]-0.08606629658238704*weight[3]*rho[9]+0.11904761904761905*rho[8]*weight[8]+0.024845199749997667*rho[5]*weight[8]+0.04303314829119352*rho[3]*weight[8]-0.04303314829119352*rho[1]*weight[8]-0.074535599249993*rho[0]*weight[8]+0.024845199749997667*weight[5]*rho[8]+0.04303314829119352*weight[3]*rho[8]-0.04303314829119352*weight[1]*rho[8]-0.074535599249993*weight[0]*rho[8]+0.16666666666666669*rho[7]*weight[7]-0.04969039949999533*rho[5]*weight[7]+0.08606629658238704*rho[1]*weight[7]-0.04969039949999533*weight[5]*rho[7]+0.08606629658238704*weight[1]*rho[7]+0.1*rho[6]*weight[6]-0.03333333333333333*rho[4]*weight[6]-0.05773502691896258*rho[2]*weight[6]-0.03333333333333333*weight[4]*rho[6]-0.05773502691896258*weight[2]*rho[6]+0.16666666666666669*rho[5]*weight[5]+0.09622504486493762*rho[3]*weight[5]-0.09622504486493762*rho[1]*weight[5]-0.05555555555555556*rho[0]*weight[5]+0.09622504486493762*weight[3]*rho[5]-0.09622504486493762*weight[1]*rho[5]-0.05555555555555556*weight[0]*rho[5]+0.1*rho[4]*weight[4]+0.05773502691896258*rho[2]*weight[4]+0.05773502691896258*weight[2]*rho[4]+0.16666666666666669*rho[3]*weight[3]-0.05555555555555556*rho[1]*weight[3]-0.09622504486493762*rho[0]*weight[3]-0.05555555555555556*weight[1]*rho[3]-0.09622504486493762*weight[0]*rho[3]+0.1*rho[2]*weight[2]+0.16666666666666669*rho[1]*weight[1]+0.09622504486493762*rho[0]*weight[1]+0.09622504486493762*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[4]] += 0.1*rho[19]*weight[19]-0.02666666666666667*rho[17]*weight[19]+0.05773502691896258*rho[16]*weight[19]-0.051639777949432225*rho[10]*weight[19]-0.029814239699997195*rho[6]*weight[19]-0.02666666666666667*weight[17]*rho[19]+0.05773502691896258*weight[16]*rho[19]-0.051639777949432225*weight[10]*rho[19]-0.029814239699997195*weight[6]*rho[19]+0.11904761904761905*rho[18]*weight[18]+0.03849001794597506*rho[15]*weight[18]+0.06873217490352689*rho[14]*weight[18]-0.03849001794597506*rho[13]*weight[18]-0.06873217490352689*rho[12]*weight[18]+0.022222222222222223*rho[9]*weight[18]-0.03968253968253969*rho[8]*weight[18]+0.022222222222222223*rho[7]*weight[18]-0.074535599249993*rho[5]*weight[18]-0.04303314829119352*rho[3]*weight[18]+0.04303314829119352*rho[1]*weight[18]+0.024845199749997667*rho[0]*weight[18]+0.03849001794597506*weight[15]*rho[18]+0.06873217490352689*weight[14]*rho[18]-0.03849001794597506*weight[13]*rho[18]-0.06873217490352689*weight[12]*rho[18]+0.022222222222222223*weight[9]*rho[18]-0.03968253968253969*weight[8]*rho[18]+0.022222222222222223*weight[7]*rho[18]-0.074535599249993*weight[5]*rho[18]-0.04303314829119352*weight[3]*rho[18]+0.04303314829119352*weight[1]*rho[18]+0.024845199749997667*weight[0]*rho[18]+0.1*rho[17]*weight[17]-0.05773502691896258*rho[11]*weight[17]+0.051639777949432225*rho[10]*weight[17]-0.029814239699997195*rho[4]*weight[17]-0.05773502691896258*weight[11]*rho[17]+0.051639777949432225*weight[10]*rho[17]-0.029814239699997195*weight[4]*rho[17]+0.1*rho[16]*weight[16]-0.029814239699997195*rho[10]*weight[16]-0.05163977794943223*rho[6]*weight[16]-0.029814239699997195*weight[10]*rho[16]-0.05163977794943223*weight[6]*rho[16]+0.16666666666666669*rho[15]*weight[15]+0.022222222222222223*rho[14]*weight[15]-0.044444444444444446*rho[13]*weight[15]+0.09622504486493764*rho[9]*weight[15]-0.08606629658238706*rho[5]*weight[15]-0.049690399499995326*rho[3]*weight[15]+0.022222222222222223*weight[14]*rho[15]-0.044444444444444446*weight[13]*rho[15]+0.09622504486493764*weight[9]*rho[15]-0.08606629658238706*weight[5]*rho[15]-0.049690399499995326*weight[3]*rho[15]+0.11904761904761905*rho[14]*weight[14]-0.03968253968253969*rho[12]*weight[14]+0.03849001794597506*rho[9]*weight[14]-0.06873217490352689*rho[8]*weight[14]-0.04303314829119353*rho[5]*weight[14]-0.07453559924999299*rho[3]*weight[14]+0.024845199749997663*rho[1]*weight[14]+0.04303314829119353*rho[0]*weight[14]-0.03968253968253969*weight[12]*rho[14]+0.03849001794597506*weight[9]*rho[14]-0.06873217490352689*weight[8]*rho[14]-0.04303314829119353*weight[5]*rho[14]-0.07453559924999299*weight[3]*rho[14]+0.024845199749997663*weight[1]*rho[14]+0.04303314829119353*weight[0]*rho[14]+0.16666666666666669*rho[13]*weight[13]+0.022222222222222223*rho[12]*weight[13]-0.09622504486493764*rho[7]*weight[13]+0.08606629658238706*rho[5]*weight[13]-0.049690399499995326*rho[1]*weight[13]+0.022222222222222223*weight[12]*rho[13]-0.09622504486493764*weight[7]*rho[13]+0.08606629658238706*weight[5]*rho[13]-0.049690399499995326*weight[1]*rho[13]+0.11904761904761905*rho[12]*weight[12]+0.06873217490352689*rho[8]*weight[12]-0.03849001794597506*rho[7]*weight[12]+0.04303314829119353*rho[5]*weight[12]+0.024845199749997663*rho[3]*weight[12]-0.07453559924999299*rho[1]*weight[12]-0.04303314829119353*rho[0]*weight[12]+0.06873217490352689*weight[8]*rho[12]-0.03849001794597506*weight[7]*rho[12]+0.04303314829119353*weight[5]*rho[12]+0.024845199749997663*weight[3]*rho[12]-0.07453559924999299*weight[1]*rho[12]-0.04303314829119353*weight[0]*rho[12]+0.1*rho[11]*weight[11]-0.029814239699997195*rho[10]*weight[11]+0.05163977794943223*rho[4]*weight[11]-0.029814239699997195*weight[10]*rho[11]+0.05163977794943223*weight[4]*rho[11]+0.1*rho[10]*weight[10]+0.05773502691896258*rho[6]*weight[10]-0.05773502691896258*rho[4]*weight[10]-0.03333333333333333*rho[2]*weight[10]+0.05773502691896258*weight[6]*rho[10]-0.05773502691896258*weight[4]*rho[10]-0.03333333333333333*weight[2]*rho[10]+0.16666666666666669*rho[9]*weight[9]-0.04969039949999533*rho[5]*weight[9]-0.08606629658238704*rho[3]*weight[9]-0.04969039949999533*weight[5]*rho[9]-0.08606629658238704*weight[3]*rho[9]+0.11904761904761905*rho[8]*weight[8]+0.024845199749997667*rho[5]*weight[8]+0.04303314829119352*rho[3]*weight[8]-0.04303314829119352*rho[1]*weight[8]-0.074535599249993*rho[0]*weight[8]+0.024845199749997667*weight[5]*rho[8]+0.04303314829119352*weight[3]*rho[8]-0.04303314829119352*weight[1]*rho[8]-0.074535599249993*weight[0]*rho[8]+0.16666666666666669*rho[7]*weight[7]-0.04969039949999533*rho[5]*weight[7]+0.08606629658238704*rho[1]*weight[7]-0.04969039949999533*weight[5]*rho[7]+0.08606629658238704*weight[1]*rho[7]+0.1*rho[6]*weight[6]-0.03333333333333333*rho[4]*weight[6]-0.05773502691896258*rho[2]*weight[6]-0.03333333333333333*weight[4]*rho[6]-0.05773502691896258*weight[2]*rho[6]+0.16666666666666669*rho[5]*weight[5]+0.09622504486493762*rho[3]*weight[5]-0.09622504486493762*rho[1]*weight[5]-0.05555555555555556*rho[0]*weight[5]+0.09622504486493762*weight[3]*rho[5]-0.09622504486493762*weight[1]*rho[5]-0.05555555555555556*weight[0]*rho[5]+0.1*rho[4]*weight[4]+0.05773502691896258*rho[2]*weight[4]+0.05773502691896258*weight[2]*rho[4]+0.16666666666666669*rho[3]*weight[3]-0.05555555555555556*rho[1]*weight[3]-0.09622504486493762*rho[0]*weight[3]-0.05555555555555556*weight[1]*rho[3]-0.09622504486493762*weight[0]*rho[3]+0.1*rho[2]*weight[2]+0.16666666666666669*rho[1]*weight[1]+0.09622504486493762*rho[0]*weight[1]+0.09622504486493762*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[5]],-(0.034523809523809526*rho[19]*weight[19])-0.02*rho[18]*weight[19]+0.02*rho[17]*weight[19]-0.008935182737458497*rho[16]*weight[19]+0.008935182737458497*rho[15]*weight[19]+0.01924500897298753*rho[14]*weight[19]+0.01924500897298753*rho[13]*weight[19]+0.01924500897298753*rho[12]*weight[19]-0.01924500897298753*rho[11]*weight[19]-0.012909944487358056*rho[10]*weight[19]-0.021825396825396828*rho[9]*weight[19]-0.011111111111111112*rho[8]*weight[19]-0.011111111111111112*rho[7]*weight[19]+0.022360679774997897*rho[6]*weight[19]-0.022360679774997897*rho[5]*weight[19]+0.0372677996249965*rho[4]*weight[19]+0.02151657414559676*rho[3]*weight[19]-0.02151657414559676*rho[2]*weight[19]+0.02151657414559676*rho[1]*weight[19]-0.012422599874998833*rho[0]*weight[19]-0.02*weight[18]*rho[19]+0.02*weight[17]*rho[19]-0.008935182737458497*weight[16]*rho[19]+0.008935182737458497*weight[15]*rho[19]+0.01924500897298753*weight[14]*rho[19]+0.01924500897298753*weight[13]*rho[19]+0.01924500897298753*weight[12]*rho[19]-0.01924500897298753*weight[11]*rho[19]-0.012909944487358056*weight[10]*rho[19]-0.021825396825396828*weight[9]*rho[19]-0.011111111111111112*weight[8]*rho[19]-0.011111111111111112*weight[7]*rho[19]+0.022360679774997897*weight[6]*rho[19]-0.022360679774997897*weight[5]*rho[19]+0.0372677996249965*weight[4]*rho[19]+0.02151657414559676*weight[3]*rho[19]-0.02151657414559676*weight[2]*rho[19]+0.02151657414559676*weight[1]*rho[19]-0.012422599874998833*weight[0]*rho[19]-0.034523809523809526*rho[18]*weight[18]-0.02*rho[17]*weight[18]+0.01924500897298753*rho[16]*weight[18]-0.01924500897298753*rho[15]*weight[18]-0.008935182737458497*rho[14]*weight[18]-0.01924500897298753*rho[13]*weight[18]-0.008935182737458497*rho[12]*weight[18]+0.01924500897298753*rho[11]*weight[18]+0.012909944487358056*rho[10]*weight[18]+0.011111111111111112*rho[9]*weight[18]+0.021825396825396828*rho[8]*weight[18]+0.011111111111111112*rho[7]*weight[18]-0.022360679774997897*rho[6]*weight[18]+0.0372677996249965*rho[5]*weight[18]-0.022360679774997897*rho[4]*weight[18]-0.02151657414559676*rho[3]*weight[18]+0.02151657414559676*rho[2]*weight[18]-0.02151657414559676*rho[1]*weight[18]+0.012422599874998833*rho[0]*weight[18]-0.02*weight[17]*rho[18]+0.01924500897298753*weight[16]*rho[18]-0.01924500897298753*weight[15]*rho[18]-0.008935182737458497*weight[14]*rho[18]-0.01924500897298753*weight[13]*rho[18]-0.008935182737458497*weight[12]*rho[18]+0.01924500897298753*weight[11]*rho[18]+0.012909944487358056*weight[10]*rho[18]+0.011111111111111112*weight[9]*rho[18]+0.021825396825396828*weight[8]*rho[18]+0.011111111111111112*weight[7]*rho[18]-0.022360679774997897*weight[6]*rho[18]+0.0372677996249965*weight[5]*rho[18]-0.022360679774997897*weight[4]*rho[18]-0.02151657414559676*weight[3]*rho[18]+0.02151657414559676*weight[2]*rho[18]-0.02151657414559676*weight[1]*rho[18]+0.012422599874998833*weight[0]*rho[18]-0.034523809523809526*rho[17]*weight[17]-0.01924500897298753*rho[16]*weight[17]+0.01924500897298753*rho[15]*weight[17]+0.01924500897298753*rho[14]*weight[17]+0.008935182737458497*rho[13]*weight[17]+0.01924500897298753*rho[12]*weight[17]-0.008935182737458497*rho[11]*weight[17]-0.012909944487358056*rho[10]*weight[17]-0.011111111111111112*rho[9]*weight[17]-0.011111111111111112*rho[8]*weight[17]-0.021825396825396828*rho[7]*weight[17]+0.0372677996249965*rho[6]*weight[17]-0.022360679774997897*rho[5]*weight[17]+0.022360679774997897*rho[4]*weight[17]+0.02151657414559676*rho[3]*weight[17]-0.02151657414559676*rho[2]*weight[17]+0.02151657414559676*rho[1]*weight[17]-0.012422599874998833*rho[0]*weight[17]-0.01924500897298753*weight[16]*rho[17]+0.01924500897298753*weight[15]*rho[17]+0.01924500897298753*weight[14]*rho[17]+0.008935182737458497*weight[13]*rho[17]+0.01924500897298753*weight[12]*rho[17]-0.008935182737458497*weight[11]*rho[17]-0.012909944487358056*weight[10]*rho[17]-0.011111111111111112*weight[9]*rho[17]-0.011111111111111112*weight[8]*rho[17]-0.021825396825396828*weight[7]*rho[17]+0.0372677996249965*weight[6]*rho[17]-0.022360679774997897*weight[5]*rho[17]+0.022360679774997897*weight[4]*rho[17]+0.02151657414559676*weight[3]*rho[17]-0.02151657414559676*weight[2]*rho[17]+0.02151657414559676*weight[1]*rho[17]-0.012422599874998833*weight[0]*rho[17]-0.06785714285714287*rho[16]*weight[16]-0.021825396825396828*rho[15]*weight[16]-0.011111111111111112*rho[14]*weight[16]-0.011111111111111112*rho[13]*weight[16]-0.011111111111111112*rho[12]*weight[16]+0.022360679774997897*rho[10]*weight[16]-0.010309826235529031*rho[9]*weight[16]+0.01924500897298753*rho[8]*weight[16]+0.004303314829119352*rho[6]*weight[16]+0.021516574145596764*rho[5]*weight[16]-0.021516574145596764*rho[4]*weight[16]-0.012422599874998832*rho[3]*weight[16]+0.037267799624996496*rho[2]*weight[16]-0.012422599874998832*rho[1]*weight[16]+0.021516574145596764*rho[0]*weight[16]-0.021825396825396828*weight[15]*rho[16]-0.011111111111111112*weight[14]*rho[16]-0.011111111111111112*weight[13]*rho[16]-0.011111111111111112*weight[12]*rho[16]+0.022360679774997897*weight[10]*rho[16]-0.010309826235529031*weight[9]*rho[16]+0.01924500897298753*weight[8]*rho[16]+0.004303314829119352*weight[6]*rho[16]+0.021516574145596764*weight[5]*rho[16]-0.021516574145596764*weight[4]*rho[16]-0.012422599874998832*weight[3]*rho[16]+0.037267799624996496*weight[2]*rho[16]-0.012422599874998832*weight[1]*rho[16]+0.021516574145596764*weight[0]*rho[16]-0.06785714285714287*rho[15]*weight[15]+0.011111111111111112*rho[14]*weight[15]+0.011111111111111112*rho[13]*weight[15]-0.011111111111111112*rho[11]*weight[15]-0.022360679774997897*rho[10]*weight[15]+0.010309826235529031*rho[9]*weight[15]-0.01924500897298753*rho[7]*weight[15]+0.021516574145596764*rho[6]*weight[15]+0.004303314829119352*rho[5]*weight[15]+0.021516574145596764*rho[4]*weight[15]+0.012422599874998832*rho[3]*weight[15]-0.012422599874998832*rho[2]*weight[15]+0.037267799624996496*rho[1]*weight[15]-0.021516574145596764*rho[0]*weight[15]+0.011111111111111112*weight[14]*rho[15]+0.011111111111111112*weight[13]*rho[15]-0.011111111111111112*weight[11]*rho[15]-0.022360679774997897*weight[10]*rho[15]+0.010309826235529031*weight[9]*rho[15]-0.01924500897298753*weight[7]*rho[15]+0.021516574145596764*weight[6]*rho[15]+0.004303314829119352*weight[5]*rho[15]+0.021516574145596764*weight[4]*rho[15]+0.012422599874998832*weight[3]*rho[15]-0.012422599874998832*weight[2]*rho[15]+0.037267799624996496*weight[1]*rho[15]-0.021516574145596764*weight[0]*rho[15]-0.06785714285714287*rho[14]*weight[14]+0.021825396825396828*rho[12]*weight[14]-0.011111111111111112*rho[11]*weight[14]-0.022360679774997897*rho[10]*weight[14]-0.01924500897298753*rho[9]*weight[14]+0.010309826235529031*rho[8]*weight[14]-0.004303314829119352*rho[6]*weight[14]-0.021516574145596764*rho[5]*weight[14]+0.021516574145596764*rho[4]*weight[14]+0.037267799624996496*rho[3]*weight[14]-0.012422599874998832*rho[2]*weight[14]+0.012422599874998832*rho[1]*weight[14]-0.021516574145596764*rho[0]*weight[14]+0.021825396825396828*weight[12]*rho[14]-0.011111111111111112*weight[11]*rho[14]-0.022360679774997897*weight[10]*rho[14]-0.01924500897298753*weight[9]*rho[14]+0.010309826235529031*weight[8]*rho[14]-0.004303314829119352*weight[6]*rho[14]-0.021516574145596764*weight[5]*rho[14]+0.021516574145596764*weight[4]*rho[14]+0.037267799624996496*weight[3]*rho[14]-0.012422599874998832*weight[2]*rho[14]+0.012422599874998832*weight[1]*rho[14]-0.021516574145596764*weight[0]*rho[14]-0.06785714285714287*rho[13]*weight[13]+0.011111111111111112*rho[12]*weight[13]-0.021825396825396828*rho[11]*weight[13]-0.022360679774997897*rho[10]*weight[13]-0.01924500897298753*rho[9]*weight[13]+0.010309826235529031*rho[7]*weight[13]+0.021516574145596764*rho[6]*weight[13]+0.004303314829119352*rho[5]*weight[13]+0.021516574145596764*rho[4]*weight[13]+0.037267799624996496*rho[3]*weight[13]-0.012422599874998832*rho[2]*weight[13]+0.012422599874998832*rho[1]*weight[13]-0.021516574145596764*rho[0]*weight[13]+0.011111111111111112*weight[12]*rho[13]-0.021825396825396828*weight[11]*rho[13]-0.022360679774997897*weight[10]*rho[13]-0.01924500897298753*weight[9]*rho[13]+0.010309826235529031*weight[7]*rho[13]+0.021516574145596764*weight[6]*rho[13]+0.004303314829119352*weight[5]*rho[13]+0.021516574145596764*weight[4]*rho[13]+0.037267799624996496*weight[3]*rho[13]-0.012422599874998832*weight[2]*rho[13]+0.012422599874998832*weight[1]*rho[13]-0.021516574145596764*weight[0]*rho[13]-0.06785714285714287*rho[12]*weight[12]-0.011111111111111112*rho[11]*weight[12]-0.022360679774997897*rho[10]*weight[12]+0.010309826235529031*rho[8]*weight[12]-0.01924500897298753*rho[7]*weight[12]+0.021516574145596764*rho[6]*weight[12]-0.021516574145596764*rho[5]*weight[12]-0.004303314829119352*rho[4]*weight[12]+0.012422599874998832*rho[3]*weight[12]-0.012422599874998832*rho[2]*weight[12]+0.037267799624996496*rho[1]*weight[12]-0.021516574145596764*rho[0]*weight[12]-0.011111111111111112*weight[11]*rho[12]-0.022360679774997897*weight[10]*rho[12]+0.010309826235529031*weight[8]*rho[12]-0.01924500897298753*weight[7]*rho[12]+0.021516574145596764*weight[6]*rho[12]-0.021516574145596764*weight[5]*rho[12]-0.004303314829119352*weight[4]*rho[12]+0.012422599874998832*weight[3]*rho[12]-0.012422599874998832*weight[2]*rho[12]+0.037267799624996496*weight[1]*rho[12]-0.021516574145596764*weight[0]*rho[12]-0.06785714285714287*rho[11]*weight[11]+0.022360679774997897*rho[10]*weight[11]+0.01924500897298753*rho[8]*weight[11]-0.010309826235529031*rho[7]*weight[11]-0.021516574145596764*rho[6]*weight[11]+0.021516574145596764*rho[5]*weight[11]+0.004303314829119352*rho[4]*weight[11]-0.012422599874998832*rho[3]*weight[11]+0.037267799624996496*rho[2]*weight[11]-0.012422599874998832*rho[1]*weight[11]+0.021516574145596764*rho[0]*weight[11]+0.022360679774997897*weight[10]*rho[11]+0.01924500897298753*weight[8]*rho[11]-0.010309826235529031*weight[7]*rho[11]-0.021516574145596764*weight[6]*rho[11]+0.021516574145596764*weight[5]*rho[11]+0.004303314829119352*weight[4]*rho[11]-0.012422599874998832*weight[3]*rho[11]+0.037267799624996496*weight[2]*rho[11]-0.012422599874998832*weight[1]*rho[11]+0.021516574145596764*weight[0]*rho[11]-0.025*rho[10]*weight[10]+0.02151657414559676*rho[9]*weight[10]+0.02151657414559676*rho[8]*weight[10]+0.02151657414559676*rho[7]*weight[10]-0.014433756729740645*rho[6]*weight[10]+0.014433756729740645*rho[5]*weight[10]-0.014433756729740645*rho[4]*weight[10]-0.025*rho[3]*weight[10]+0.025*rho[2]*weight[10]-0.025*rho[1]*weight[10]+0.024056261216234404*rho[0]*weight[10]+0.02151657414559676*weight[9]*rho[10]+0.02151657414559676*weight[8]*rho[10]+0.02151657414559676*weight[7]*rho[10]-0.014433756729740645*weight[6]*rho[10]+0.014433756729740645*weight[5]*rho[10]-0.014433756729740645*weight[4]*rho[10]-0.025*weight[3]*rho[10]+0.025*weight[2]*rho[10]-0.025*weight[1]*rho[10]+0.024056261216234404*weight[0]*rho[10]-0.10119047619047619*rho[9]*weight[9]-0.012422599874998833*rho[6]*weight[9]+0.012422599874998833*rho[5]*weight[9]-0.012422599874998833*rho[4]*weight[9]+0.02151657414559676*rho[3]*weight[9]+0.02151657414559676*rho[2]*weight[9]-0.02151657414559676*rho[1]*weight[9]+0.0372677996249965*rho[0]*weight[9]-0.012422599874998833*weight[6]*rho[9]+0.012422599874998833*weight[5]*rho[9]-0.012422599874998833*weight[4]*rho[9]+0.02151657414559676*weight[3]*rho[9]+0.02151657414559676*weight[2]*rho[9]-0.02151657414559676*weight[1]*rho[9]+0.0372677996249965*weight[0]*rho[9]-0.10119047619047619*rho[8]*weight[8]-0.012422599874998833*rho[6]*weight[8]+0.012422599874998833*rho[5]*weight[8]-0.012422599874998833*rho[4]*weight[8]-0.02151657414559676*rho[3]*weight[8]-0.02151657414559676*rho[2]*weight[8]-0.02151657414559676*rho[1]*weight[8]+0.0372677996249965*rho[0]*weight[8]-0.012422599874998833*weight[6]*rho[8]+0.012422599874998833*weight[5]*rho[8]-0.012422599874998833*weight[4]*rho[8]-0.02151657414559676*weight[3]*rho[8]-0.02151657414559676*weight[2]*rho[8]-0.02151657414559676*weight[1]*rho[8]+0.0372677996249965*weight[0]*rho[8]-0.10119047619047619*rho[7]*weight[7]-0.012422599874998833*rho[6]*weight[7]+0.012422599874998833*rho[5]*weight[7]-0.012422599874998833*rho[4]*weight[7]-0.02151657414559676*rho[3]*weight[7]+0.02151657414559676*rho[2]*weight[7]+0.02151657414559676*rho[1]*weight[7]+0.0372677996249965*rho[0]*weight[7]-0.012422599874998833*weight[6]*rho[7]+0.012422599874998833*weight[5]*rho[7]-0.012422599874998833*weight[4]*rho[7]-0.02151657414559676*weight[3]*rho[7]+0.02151657414559676*weight[2]*rho[7]+0.02151657414559676*weight[1]*rho[7]+0.0372677996249965*weight[0]*rho[7]-0.058333333333333334*rho[6]*weight[6]-0.025*rho[5]*weight[6]+0.025*rho[4]*weight[6]-0.004811252243246881*rho[3]*weight[6]+0.004811252243246881*rho[2]*weight[6]+0.024056261216234404*rho[1]*weight[6]-0.01388888888888889*rho[0]*weight[6]-0.025*weight[5]*rho[6]+0.025*weight[4]*rho[6]-0.004811252243246881*weight[3]*rho[6]+0.004811252243246881*weight[2]*rho[6]+0.024056261216234404*weight[1]*rho[6]-0.01388888888888889*weight[0]*rho[6]-0.058333333333333334*rho[5]*weight[5]-0.025*rho[4]*weight[5]+0.004811252243246881*rho[3]*weight[5]+0.024056261216234404*rho[2]*weight[5]+0.004811252243246881*rho[1]*weight[5]+0.01388888888888889*rho[0]*weight[5]-0.025*weight[4]*rho[5]+0.004811252243246881*weight[3]*rho[5]+0.024056261216234404*weight[2]*rho[5]+0.004811252243246881*weight[1]*rho[5]+0.01388888888888889*weight[0]*rho[5]-0.058333333333333334*rho[4]*weight[4]+0.024056261216234404*rho[3]*weight[4]+0.004811252243246881*rho[2]*weight[4]-0.004811252243246881*rho[1]*weight[4]-0.01388888888888889*rho[0]*weight[4]+0.024056261216234404*weight[3]*rho[4]+0.004811252243246881*weight[2]*rho[4]-0.004811252243246881*weight[1]*rho[4]-0.01388888888888889*weight[0]*rho[4]-0.09166666666666667*rho[3]*weight[3]-0.01388888888888889*rho[2]*weight[3]+0.01388888888888889*rho[1]*weight[3]+0.024056261216234404*rho[0]*weight[3]-0.01388888888888889*weight[2]*rho[3]+0.01388888888888889*weight[1]*rho[3]+0.024056261216234404*weight[0]*rho[3]-0.09166666666666667*rho[2]*weight[2]-0.01388888888888889*rho[1]*weight[2]-0.024056261216234404*rho[0]*weight[2]-0.01388888888888889*weight[1]*rho[2]-0.024056261216234404*weight[0]*rho[2]-0.09166666666666667*rho[1]*weight[1]+0.024056261216234404*rho[0]*weight[1]+0.024056261216234404*weight[0]*rho[1]-0.125*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[5]] += -(0.034523809523809526*rho[19]*weight[19])-0.02*rho[18]*weight[19]+0.02*rho[17]*weight[19]-0.008935182737458497*rho[16]*weight[19]+0.008935182737458497*rho[15]*weight[19]+0.01924500897298753*rho[14]*weight[19]+0.01924500897298753*rho[13]*weight[19]+0.01924500897298753*rho[12]*weight[19]-0.01924500897298753*rho[11]*weight[19]-0.012909944487358056*rho[10]*weight[19]-0.021825396825396828*rho[9]*weight[19]-0.011111111111111112*rho[8]*weight[19]-0.011111111111111112*rho[7]*weight[19]+0.022360679774997897*rho[6]*weight[19]-0.022360679774997897*rho[5]*weight[19]+0.0372677996249965*rho[4]*weight[19]+0.02151657414559676*rho[3]*weight[19]-0.02151657414559676*rho[2]*weight[19]+0.02151657414559676*rho[1]*weight[19]-0.012422599874998833*rho[0]*weight[19]-0.02*weight[18]*rho[19]+0.02*weight[17]*rho[19]-0.008935182737458497*weight[16]*rho[19]+0.008935182737458497*weight[15]*rho[19]+0.01924500897298753*weight[14]*rho[19]+0.01924500897298753*weight[13]*rho[19]+0.01924500897298753*weight[12]*rho[19]-0.01924500897298753*weight[11]*rho[19]-0.012909944487358056*weight[10]*rho[19]-0.021825396825396828*weight[9]*rho[19]-0.011111111111111112*weight[8]*rho[19]-0.011111111111111112*weight[7]*rho[19]+0.022360679774997897*weight[6]*rho[19]-0.022360679774997897*weight[5]*rho[19]+0.0372677996249965*weight[4]*rho[19]+0.02151657414559676*weight[3]*rho[19]-0.02151657414559676*weight[2]*rho[19]+0.02151657414559676*weight[1]*rho[19]-0.012422599874998833*weight[0]*rho[19]-0.034523809523809526*rho[18]*weight[18]-0.02*rho[17]*weight[18]+0.01924500897298753*rho[16]*weight[18]-0.01924500897298753*rho[15]*weight[18]-0.008935182737458497*rho[14]*weight[18]-0.01924500897298753*rho[13]*weight[18]-0.008935182737458497*rho[12]*weight[18]+0.01924500897298753*rho[11]*weight[18]+0.012909944487358056*rho[10]*weight[18]+0.011111111111111112*rho[9]*weight[18]+0.021825396825396828*rho[8]*weight[18]+0.011111111111111112*rho[7]*weight[18]-0.022360679774997897*rho[6]*weight[18]+0.0372677996249965*rho[5]*weight[18]-0.022360679774997897*rho[4]*weight[18]-0.02151657414559676*rho[3]*weight[18]+0.02151657414559676*rho[2]*weight[18]-0.02151657414559676*rho[1]*weight[18]+0.012422599874998833*rho[0]*weight[18]-0.02*weight[17]*rho[18]+0.01924500897298753*weight[16]*rho[18]-0.01924500897298753*weight[15]*rho[18]-0.008935182737458497*weight[14]*rho[18]-0.01924500897298753*weight[13]*rho[18]-0.008935182737458497*weight[12]*rho[18]+0.01924500897298753*weight[11]*rho[18]+0.012909944487358056*weight[10]*rho[18]+0.011111111111111112*weight[9]*rho[18]+0.021825396825396828*weight[8]*rho[18]+0.011111111111111112*weight[7]*rho[18]-0.022360679774997897*weight[6]*rho[18]+0.0372677996249965*weight[5]*rho[18]-0.022360679774997897*weight[4]*rho[18]-0.02151657414559676*weight[3]*rho[18]+0.02151657414559676*weight[2]*rho[18]-0.02151657414559676*weight[1]*rho[18]+0.012422599874998833*weight[0]*rho[18]-0.034523809523809526*rho[17]*weight[17]-0.01924500897298753*rho[16]*weight[17]+0.01924500897298753*rho[15]*weight[17]+0.01924500897298753*rho[14]*weight[17]+0.008935182737458497*rho[13]*weight[17]+0.01924500897298753*rho[12]*weight[17]-0.008935182737458497*rho[11]*weight[17]-0.012909944487358056*rho[10]*weight[17]-0.011111111111111112*rho[9]*weight[17]-0.011111111111111112*rho[8]*weight[17]-0.021825396825396828*rho[7]*weight[17]+0.0372677996249965*rho[6]*weight[17]-0.022360679774997897*rho[5]*weight[17]+0.022360679774997897*rho[4]*weight[17]+0.02151657414559676*rho[3]*weight[17]-0.02151657414559676*rho[2]*weight[17]+0.02151657414559676*rho[1]*weight[17]-0.012422599874998833*rho[0]*weight[17]-0.01924500897298753*weight[16]*rho[17]+0.01924500897298753*weight[15]*rho[17]+0.01924500897298753*weight[14]*rho[17]+0.008935182737458497*weight[13]*rho[17]+0.01924500897298753*weight[12]*rho[17]-0.008935182737458497*weight[11]*rho[17]-0.012909944487358056*weight[10]*rho[17]-0.011111111111111112*weight[9]*rho[17]-0.011111111111111112*weight[8]*rho[17]-0.021825396825396828*weight[7]*rho[17]+0.0372677996249965*weight[6]*rho[17]-0.022360679774997897*weight[5]*rho[17]+0.022360679774997897*weight[4]*rho[17]+0.02151657414559676*weight[3]*rho[17]-0.02151657414559676*weight[2]*rho[17]+0.02151657414559676*weight[1]*rho[17]-0.012422599874998833*weight[0]*rho[17]-0.06785714285714287*rho[16]*weight[16]-0.021825396825396828*rho[15]*weight[16]-0.011111111111111112*rho[14]*weight[16]-0.011111111111111112*rho[13]*weight[16]-0.011111111111111112*rho[12]*weight[16]+0.022360679774997897*rho[10]*weight[16]-0.010309826235529031*rho[9]*weight[16]+0.01924500897298753*rho[8]*weight[16]+0.004303314829119352*rho[6]*weight[16]+0.021516574145596764*rho[5]*weight[16]-0.021516574145596764*rho[4]*weight[16]-0.012422599874998832*rho[3]*weight[16]+0.037267799624996496*rho[2]*weight[16]-0.012422599874998832*rho[1]*weight[16]+0.021516574145596764*rho[0]*weight[16]-0.021825396825396828*weight[15]*rho[16]-0.011111111111111112*weight[14]*rho[16]-0.011111111111111112*weight[13]*rho[16]-0.011111111111111112*weight[12]*rho[16]+0.022360679774997897*weight[10]*rho[16]-0.010309826235529031*weight[9]*rho[16]+0.01924500897298753*weight[8]*rho[16]+0.004303314829119352*weight[6]*rho[16]+0.021516574145596764*weight[5]*rho[16]-0.021516574145596764*weight[4]*rho[16]-0.012422599874998832*weight[3]*rho[16]+0.037267799624996496*weight[2]*rho[16]-0.012422599874998832*weight[1]*rho[16]+0.021516574145596764*weight[0]*rho[16]-0.06785714285714287*rho[15]*weight[15]+0.011111111111111112*rho[14]*weight[15]+0.011111111111111112*rho[13]*weight[15]-0.011111111111111112*rho[11]*weight[15]-0.022360679774997897*rho[10]*weight[15]+0.010309826235529031*rho[9]*weight[15]-0.01924500897298753*rho[7]*weight[15]+0.021516574145596764*rho[6]*weight[15]+0.004303314829119352*rho[5]*weight[15]+0.021516574145596764*rho[4]*weight[15]+0.012422599874998832*rho[3]*weight[15]-0.012422599874998832*rho[2]*weight[15]+0.037267799624996496*rho[1]*weight[15]-0.021516574145596764*rho[0]*weight[15]+0.011111111111111112*weight[14]*rho[15]+0.011111111111111112*weight[13]*rho[15]-0.011111111111111112*weight[11]*rho[15]-0.022360679774997897*weight[10]*rho[15]+0.010309826235529031*weight[9]*rho[15]-0.01924500897298753*weight[7]*rho[15]+0.021516574145596764*weight[6]*rho[15]+0.004303314829119352*weight[5]*rho[15]+0.021516574145596764*weight[4]*rho[15]+0.012422599874998832*weight[3]*rho[15]-0.012422599874998832*weight[2]*rho[15]+0.037267799624996496*weight[1]*rho[15]-0.021516574145596764*weight[0]*rho[15]-0.06785714285714287*rho[14]*weight[14]+0.021825396825396828*rho[12]*weight[14]-0.011111111111111112*rho[11]*weight[14]-0.022360679774997897*rho[10]*weight[14]-0.01924500897298753*rho[9]*weight[14]+0.010309826235529031*rho[8]*weight[14]-0.004303314829119352*rho[6]*weight[14]-0.021516574145596764*rho[5]*weight[14]+0.021516574145596764*rho[4]*weight[14]+0.037267799624996496*rho[3]*weight[14]-0.012422599874998832*rho[2]*weight[14]+0.012422599874998832*rho[1]*weight[14]-0.021516574145596764*rho[0]*weight[14]+0.021825396825396828*weight[12]*rho[14]-0.011111111111111112*weight[11]*rho[14]-0.022360679774997897*weight[10]*rho[14]-0.01924500897298753*weight[9]*rho[14]+0.010309826235529031*weight[8]*rho[14]-0.004303314829119352*weight[6]*rho[14]-0.021516574145596764*weight[5]*rho[14]+0.021516574145596764*weight[4]*rho[14]+0.037267799624996496*weight[3]*rho[14]-0.012422599874998832*weight[2]*rho[14]+0.012422599874998832*weight[1]*rho[14]-0.021516574145596764*weight[0]*rho[14]-0.06785714285714287*rho[13]*weight[13]+0.011111111111111112*rho[12]*weight[13]-0.021825396825396828*rho[11]*weight[13]-0.022360679774997897*rho[10]*weight[13]-0.01924500897298753*rho[9]*weight[13]+0.010309826235529031*rho[7]*weight[13]+0.021516574145596764*rho[6]*weight[13]+0.004303314829119352*rho[5]*weight[13]+0.021516574145596764*rho[4]*weight[13]+0.037267799624996496*rho[3]*weight[13]-0.012422599874998832*rho[2]*weight[13]+0.012422599874998832*rho[1]*weight[13]-0.021516574145596764*rho[0]*weight[13]+0.011111111111111112*weight[12]*rho[13]-0.021825396825396828*weight[11]*rho[13]-0.022360679774997897*weight[10]*rho[13]-0.01924500897298753*weight[9]*rho[13]+0.010309826235529031*weight[7]*rho[13]+0.021516574145596764*weight[6]*rho[13]+0.004303314829119352*weight[5]*rho[13]+0.021516574145596764*weight[4]*rho[13]+0.037267799624996496*weight[3]*rho[13]-0.012422599874998832*weight[2]*rho[13]+0.012422599874998832*weight[1]*rho[13]-0.021516574145596764*weight[0]*rho[13]-0.06785714285714287*rho[12]*weight[12]-0.011111111111111112*rho[11]*weight[12]-0.022360679774997897*rho[10]*weight[12]+0.010309826235529031*rho[8]*weight[12]-0.01924500897298753*rho[7]*weight[12]+0.021516574145596764*rho[6]*weight[12]-0.021516574145596764*rho[5]*weight[12]-0.004303314829119352*rho[4]*weight[12]+0.012422599874998832*rho[3]*weight[12]-0.012422599874998832*rho[2]*weight[12]+0.037267799624996496*rho[1]*weight[12]-0.021516574145596764*rho[0]*weight[12]-0.011111111111111112*weight[11]*rho[12]-0.022360679774997897*weight[10]*rho[12]+0.010309826235529031*weight[8]*rho[12]-0.01924500897298753*weight[7]*rho[12]+0.021516574145596764*weight[6]*rho[12]-0.021516574145596764*weight[5]*rho[12]-0.004303314829119352*weight[4]*rho[12]+0.012422599874998832*weight[3]*rho[12]-0.012422599874998832*weight[2]*rho[12]+0.037267799624996496*weight[1]*rho[12]-0.021516574145596764*weight[0]*rho[12]-0.06785714285714287*rho[11]*weight[11]+0.022360679774997897*rho[10]*weight[11]+0.01924500897298753*rho[8]*weight[11]-0.010309826235529031*rho[7]*weight[11]-0.021516574145596764*rho[6]*weight[11]+0.021516574145596764*rho[5]*weight[11]+0.004303314829119352*rho[4]*weight[11]-0.012422599874998832*rho[3]*weight[11]+0.037267799624996496*rho[2]*weight[11]-0.012422599874998832*rho[1]*weight[11]+0.021516574145596764*rho[0]*weight[11]+0.022360679774997897*weight[10]*rho[11]+0.01924500897298753*weight[8]*rho[11]-0.010309826235529031*weight[7]*rho[11]-0.021516574145596764*weight[6]*rho[11]+0.021516574145596764*weight[5]*rho[11]+0.004303314829119352*weight[4]*rho[11]-0.012422599874998832*weight[3]*rho[11]+0.037267799624996496*weight[2]*rho[11]-0.012422599874998832*weight[1]*rho[11]+0.021516574145596764*weight[0]*rho[11]-0.025*rho[10]*weight[10]+0.02151657414559676*rho[9]*weight[10]+0.02151657414559676*rho[8]*weight[10]+0.02151657414559676*rho[7]*weight[10]-0.014433756729740645*rho[6]*weight[10]+0.014433756729740645*rho[5]*weight[10]-0.014433756729740645*rho[4]*weight[10]-0.025*rho[3]*weight[10]+0.025*rho[2]*weight[10]-0.025*rho[1]*weight[10]+0.024056261216234404*rho[0]*weight[10]+0.02151657414559676*weight[9]*rho[10]+0.02151657414559676*weight[8]*rho[10]+0.02151657414559676*weight[7]*rho[10]-0.014433756729740645*weight[6]*rho[10]+0.014433756729740645*weight[5]*rho[10]-0.014433756729740645*weight[4]*rho[10]-0.025*weight[3]*rho[10]+0.025*weight[2]*rho[10]-0.025*weight[1]*rho[10]+0.024056261216234404*weight[0]*rho[10]-0.10119047619047619*rho[9]*weight[9]-0.012422599874998833*rho[6]*weight[9]+0.012422599874998833*rho[5]*weight[9]-0.012422599874998833*rho[4]*weight[9]+0.02151657414559676*rho[3]*weight[9]+0.02151657414559676*rho[2]*weight[9]-0.02151657414559676*rho[1]*weight[9]+0.0372677996249965*rho[0]*weight[9]-0.012422599874998833*weight[6]*rho[9]+0.012422599874998833*weight[5]*rho[9]-0.012422599874998833*weight[4]*rho[9]+0.02151657414559676*weight[3]*rho[9]+0.02151657414559676*weight[2]*rho[9]-0.02151657414559676*weight[1]*rho[9]+0.0372677996249965*weight[0]*rho[9]-0.10119047619047619*rho[8]*weight[8]-0.012422599874998833*rho[6]*weight[8]+0.012422599874998833*rho[5]*weight[8]-0.012422599874998833*rho[4]*weight[8]-0.02151657414559676*rho[3]*weight[8]-0.02151657414559676*rho[2]*weight[8]-0.02151657414559676*rho[1]*weight[8]+0.0372677996249965*rho[0]*weight[8]-0.012422599874998833*weight[6]*rho[8]+0.012422599874998833*weight[5]*rho[8]-0.012422599874998833*weight[4]*rho[8]-0.02151657414559676*weight[3]*rho[8]-0.02151657414559676*weight[2]*rho[8]-0.02151657414559676*weight[1]*rho[8]+0.0372677996249965*weight[0]*rho[8]-0.10119047619047619*rho[7]*weight[7]-0.012422599874998833*rho[6]*weight[7]+0.012422599874998833*rho[5]*weight[7]-0.012422599874998833*rho[4]*weight[7]-0.02151657414559676*rho[3]*weight[7]+0.02151657414559676*rho[2]*weight[7]+0.02151657414559676*rho[1]*weight[7]+0.0372677996249965*rho[0]*weight[7]-0.012422599874998833*weight[6]*rho[7]+0.012422599874998833*weight[5]*rho[7]-0.012422599874998833*weight[4]*rho[7]-0.02151657414559676*weight[3]*rho[7]+0.02151657414559676*weight[2]*rho[7]+0.02151657414559676*weight[1]*rho[7]+0.0372677996249965*weight[0]*rho[7]-0.058333333333333334*rho[6]*weight[6]-0.025*rho[5]*weight[6]+0.025*rho[4]*weight[6]-0.004811252243246881*rho[3]*weight[6]+0.004811252243246881*rho[2]*weight[6]+0.024056261216234404*rho[1]*weight[6]-0.01388888888888889*rho[0]*weight[6]-0.025*weight[5]*rho[6]+0.025*weight[4]*rho[6]-0.004811252243246881*weight[3]*rho[6]+0.004811252243246881*weight[2]*rho[6]+0.024056261216234404*weight[1]*rho[6]-0.01388888888888889*weight[0]*rho[6]-0.058333333333333334*rho[5]*weight[5]-0.025*rho[4]*weight[5]+0.004811252243246881*rho[3]*weight[5]+0.024056261216234404*rho[2]*weight[5]+0.004811252243246881*rho[1]*weight[5]+0.01388888888888889*rho[0]*weight[5]-0.025*weight[4]*rho[5]+0.004811252243246881*weight[3]*rho[5]+0.024056261216234404*weight[2]*rho[5]+0.004811252243246881*weight[1]*rho[5]+0.01388888888888889*weight[0]*rho[5]-0.058333333333333334*rho[4]*weight[4]+0.024056261216234404*rho[3]*weight[4]+0.004811252243246881*rho[2]*weight[4]-0.004811252243246881*rho[1]*weight[4]-0.01388888888888889*rho[0]*weight[4]+0.024056261216234404*weight[3]*rho[4]+0.004811252243246881*weight[2]*rho[4]-0.004811252243246881*weight[1]*rho[4]-0.01388888888888889*weight[0]*rho[4]-0.09166666666666667*rho[3]*weight[3]-0.01388888888888889*rho[2]*weight[3]+0.01388888888888889*rho[1]*weight[3]+0.024056261216234404*rho[0]*weight[3]-0.01388888888888889*weight[2]*rho[3]+0.01388888888888889*weight[1]*rho[3]+0.024056261216234404*weight[0]*rho[3]-0.09166666666666667*rho[2]*weight[2]-0.01388888888888889*rho[1]*weight[2]-0.024056261216234404*rho[0]*weight[2]-0.01388888888888889*weight[1]*rho[2]-0.024056261216234404*weight[0]*rho[2]-0.09166666666666667*rho[1]*weight[1]+0.024056261216234404*rho[0]*weight[1]+0.024056261216234404*weight[0]*rho[1]-0.125*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[6]],0.1*rho[19]*weight[19]-0.02666666666666667*rho[18]*weight[19]+0.05773502691896258*rho[15]*weight[19]-0.051639777949432225*rho[10]*weight[19]-0.029814239699997195*rho[5]*weight[19]-0.02666666666666667*weight[18]*rho[19]+0.05773502691896258*weight[15]*rho[19]-0.051639777949432225*weight[10]*rho[19]-0.029814239699997195*weight[5]*rho[19]+0.1*rho[18]*weight[18]-0.05773502691896258*rho[12]*weight[18]+0.051639777949432225*rho[10]*weight[18]-0.029814239699997195*rho[4]*weight[18]-0.05773502691896258*weight[12]*rho[18]+0.051639777949432225*weight[10]*rho[18]-0.029814239699997195*weight[4]*rho[18]+0.11904761904761905*rho[17]*weight[17]+0.03849001794597506*rho[16]*weight[17]-0.03849001794597506*rho[14]*weight[17]+0.06873217490352689*rho[13]*weight[17]-0.06873217490352689*rho[11]*weight[17]+0.022222222222222223*rho[9]*weight[17]+0.022222222222222223*rho[8]*weight[17]-0.03968253968253969*rho[7]*weight[17]-0.074535599249993*rho[6]*weight[17]-0.04303314829119352*rho[3]*weight[17]+0.04303314829119352*rho[2]*weight[17]+0.024845199749997667*rho[0]*weight[17]+0.03849001794597506*weight[16]*rho[17]-0.03849001794597506*weight[14]*rho[17]+0.06873217490352689*weight[13]*rho[17]-0.06873217490352689*weight[11]*rho[17]+0.022222222222222223*weight[9]*rho[17]+0.022222222222222223*weight[8]*rho[17]-0.03968253968253969*weight[7]*rho[17]-0.074535599249993*weight[6]*rho[17]-0.04303314829119352*weight[3]*rho[17]+0.04303314829119352*weight[2]*rho[17]+0.024845199749997667*weight[0]*rho[17]+0.16666666666666669*rho[16]*weight[16]-0.044444444444444446*rho[14]*weight[16]+0.022222222222222223*rho[13]*weight[16]+0.09622504486493764*rho[9]*weight[16]-0.08606629658238706*rho[6]*weight[16]-0.049690399499995326*rho[3]*weight[16]-0.044444444444444446*weight[14]*rho[16]+0.022222222222222223*weight[13]*rho[16]+0.09622504486493764*weight[9]*rho[16]-0.08606629658238706*weight[6]*rho[16]-0.049690399499995326*weight[3]*rho[16]+0.1*rho[15]*weight[15]-0.029814239699997195*rho[10]*weight[15]-0.05163977794943223*rho[5]*weight[15]-0.029814239699997195*weight[10]*rho[15]-0.05163977794943223*weight[5]*rho[15]+0.16666666666666669*rho[14]*weight[14]+0.022222222222222223*rho[11]*weight[14]-0.09622504486493764*rho[8]*weight[14]+0.08606629658238706*rho[6]*weight[14]-0.049690399499995326*rho[2]*weight[14]+0.022222222222222223*weight[11]*rho[14]-0.09622504486493764*weight[8]*rho[14]+0.08606629658238706*weight[6]*rho[14]-0.049690399499995326*weight[2]*rho[14]+0.11904761904761905*rho[13]*weight[13]-0.03968253968253969*rho[11]*weight[13]+0.03849001794597506*rho[9]*weight[13]-0.06873217490352689*rho[7]*weight[13]-0.04303314829119353*rho[6]*weight[13]-0.07453559924999299*rho[3]*weight[13]+0.024845199749997663*rho[2]*weight[13]+0.04303314829119353*rho[0]*weight[13]-0.03968253968253969*weight[11]*rho[13]+0.03849001794597506*weight[9]*rho[13]-0.06873217490352689*weight[7]*rho[13]-0.04303314829119353*weight[6]*rho[13]-0.07453559924999299*weight[3]*rho[13]+0.024845199749997663*weight[2]*rho[13]+0.04303314829119353*weight[0]*rho[13]+0.1*rho[12]*weight[12]-0.029814239699997195*rho[10]*weight[12]+0.05163977794943223*rho[4]*weight[12]-0.029814239699997195*weight[10]*rho[12]+0.05163977794943223*weight[4]*rho[12]+0.11904761904761905*rho[11]*weight[11]-0.03849001794597506*rho[8]*weight[11]+0.06873217490352689*rho[7]*weight[11]+0.04303314829119353*rho[6]*weight[11]+0.024845199749997663*rho[3]*weight[11]-0.07453559924999299*rho[2]*weight[11]-0.04303314829119353*rho[0]*weight[11]-0.03849001794597506*weight[8]*rho[11]+0.06873217490352689*weight[7]*rho[11]+0.04303314829119353*weight[6]*rho[11]+0.024845199749997663*weight[3]*rho[11]-0.07453559924999299*weight[2]*rho[11]-0.04303314829119353*weight[0]*rho[11]+0.1*rho[10]*weight[10]+0.05773502691896258*rho[5]*weight[10]-0.05773502691896258*rho[4]*weight[10]-0.03333333333333333*rho[1]*weight[10]+0.05773502691896258*weight[5]*rho[10]-0.05773502691896258*weight[4]*rho[10]-0.03333333333333333*weight[1]*rho[10]+0.16666666666666669*rho[9]*weight[9]-0.04969039949999533*rho[6]*weight[9]-0.08606629658238704*rho[3]*weight[9]-0.04969039949999533*weight[6]*rho[9]-0.08606629658238704*weight[3]*rho[9]+0.16666666666666669*rho[8]*weight[8]-0.04969039949999533*rho[6]*weight[8]+0.08606629658238704*rho[2]*weight[8]-0.04969039949999533*weight[6]*rho[8]+0.08606629658238704*weight[2]*rho[8]+0.11904761904761905*rho[7]*weight[7]+0.024845199749997667*rho[6]*weight[7]+0.04303314829119352*rho[3]*weight[7]-0.04303314829119352*rho[2]*weight[7]-0.074535599249993*rho[0]*weight[7]+0.024845199749997667*weight[6]*rho[7]+0.04303314829119352*weight[3]*rho[7]-0.04303314829119352*weight[2]*rho[7]-0.074535599249993*weight[0]*rho[7]+0.16666666666666669*rho[6]*weight[6]+0.09622504486493762*rho[3]*weight[6]-0.09622504486493762*rho[2]*weight[6]-0.05555555555555556*rho[0]*weight[6]+0.09622504486493762*weight[3]*rho[6]-0.09622504486493762*weight[2]*rho[6]-0.05555555555555556*weight[0]*rho[6]+0.1*rho[5]*weight[5]-0.03333333333333333*rho[4]*weight[5]-0.05773502691896258*rho[1]*weight[5]-0.03333333333333333*weight[4]*rho[5]-0.05773502691896258*weight[1]*rho[5]+0.1*rho[4]*weight[4]+0.05773502691896258*rho[1]*weight[4]+0.05773502691896258*weight[1]*rho[4]+0.16666666666666669*rho[3]*weight[3]-0.05555555555555556*rho[2]*weight[3]-0.09622504486493762*rho[0]*weight[3]-0.05555555555555556*weight[2]*rho[3]-0.09622504486493762*weight[0]*rho[3]+0.16666666666666669*rho[2]*weight[2]+0.09622504486493762*rho[0]*weight[2]+0.09622504486493762*weight[0]*rho[2]+0.1*rho[1]*weight[1]+0.16666666666666669*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[6]] += 0.1*rho[19]*weight[19]-0.02666666666666667*rho[18]*weight[19]+0.05773502691896258*rho[15]*weight[19]-0.051639777949432225*rho[10]*weight[19]-0.029814239699997195*rho[5]*weight[19]-0.02666666666666667*weight[18]*rho[19]+0.05773502691896258*weight[15]*rho[19]-0.051639777949432225*weight[10]*rho[19]-0.029814239699997195*weight[5]*rho[19]+0.1*rho[18]*weight[18]-0.05773502691896258*rho[12]*weight[18]+0.051639777949432225*rho[10]*weight[18]-0.029814239699997195*rho[4]*weight[18]-0.05773502691896258*weight[12]*rho[18]+0.051639777949432225*weight[10]*rho[18]-0.029814239699997195*weight[4]*rho[18]+0.11904761904761905*rho[17]*weight[17]+0.03849001794597506*rho[16]*weight[17]-0.03849001794597506*rho[14]*weight[17]+0.06873217490352689*rho[13]*weight[17]-0.06873217490352689*rho[11]*weight[17]+0.022222222222222223*rho[9]*weight[17]+0.022222222222222223*rho[8]*weight[17]-0.03968253968253969*rho[7]*weight[17]-0.074535599249993*rho[6]*weight[17]-0.04303314829119352*rho[3]*weight[17]+0.04303314829119352*rho[2]*weight[17]+0.024845199749997667*rho[0]*weight[17]+0.03849001794597506*weight[16]*rho[17]-0.03849001794597506*weight[14]*rho[17]+0.06873217490352689*weight[13]*rho[17]-0.06873217490352689*weight[11]*rho[17]+0.022222222222222223*weight[9]*rho[17]+0.022222222222222223*weight[8]*rho[17]-0.03968253968253969*weight[7]*rho[17]-0.074535599249993*weight[6]*rho[17]-0.04303314829119352*weight[3]*rho[17]+0.04303314829119352*weight[2]*rho[17]+0.024845199749997667*weight[0]*rho[17]+0.16666666666666669*rho[16]*weight[16]-0.044444444444444446*rho[14]*weight[16]+0.022222222222222223*rho[13]*weight[16]+0.09622504486493764*rho[9]*weight[16]-0.08606629658238706*rho[6]*weight[16]-0.049690399499995326*rho[3]*weight[16]-0.044444444444444446*weight[14]*rho[16]+0.022222222222222223*weight[13]*rho[16]+0.09622504486493764*weight[9]*rho[16]-0.08606629658238706*weight[6]*rho[16]-0.049690399499995326*weight[3]*rho[16]+0.1*rho[15]*weight[15]-0.029814239699997195*rho[10]*weight[15]-0.05163977794943223*rho[5]*weight[15]-0.029814239699997195*weight[10]*rho[15]-0.05163977794943223*weight[5]*rho[15]+0.16666666666666669*rho[14]*weight[14]+0.022222222222222223*rho[11]*weight[14]-0.09622504486493764*rho[8]*weight[14]+0.08606629658238706*rho[6]*weight[14]-0.049690399499995326*rho[2]*weight[14]+0.022222222222222223*weight[11]*rho[14]-0.09622504486493764*weight[8]*rho[14]+0.08606629658238706*weight[6]*rho[14]-0.049690399499995326*weight[2]*rho[14]+0.11904761904761905*rho[13]*weight[13]-0.03968253968253969*rho[11]*weight[13]+0.03849001794597506*rho[9]*weight[13]-0.06873217490352689*rho[7]*weight[13]-0.04303314829119353*rho[6]*weight[13]-0.07453559924999299*rho[3]*weight[13]+0.024845199749997663*rho[2]*weight[13]+0.04303314829119353*rho[0]*weight[13]-0.03968253968253969*weight[11]*rho[13]+0.03849001794597506*weight[9]*rho[13]-0.06873217490352689*weight[7]*rho[13]-0.04303314829119353*weight[6]*rho[13]-0.07453559924999299*weight[3]*rho[13]+0.024845199749997663*weight[2]*rho[13]+0.04303314829119353*weight[0]*rho[13]+0.1*rho[12]*weight[12]-0.029814239699997195*rho[10]*weight[12]+0.05163977794943223*rho[4]*weight[12]-0.029814239699997195*weight[10]*rho[12]+0.05163977794943223*weight[4]*rho[12]+0.11904761904761905*rho[11]*weight[11]-0.03849001794597506*rho[8]*weight[11]+0.06873217490352689*rho[7]*weight[11]+0.04303314829119353*rho[6]*weight[11]+0.024845199749997663*rho[3]*weight[11]-0.07453559924999299*rho[2]*weight[11]-0.04303314829119353*rho[0]*weight[11]-0.03849001794597506*weight[8]*rho[11]+0.06873217490352689*weight[7]*rho[11]+0.04303314829119353*weight[6]*rho[11]+0.024845199749997663*weight[3]*rho[11]-0.07453559924999299*weight[2]*rho[11]-0.04303314829119353*weight[0]*rho[11]+0.1*rho[10]*weight[10]+0.05773502691896258*rho[5]*weight[10]-0.05773502691896258*rho[4]*weight[10]-0.03333333333333333*rho[1]*weight[10]+0.05773502691896258*weight[5]*rho[10]-0.05773502691896258*weight[4]*rho[10]-0.03333333333333333*weight[1]*rho[10]+0.16666666666666669*rho[9]*weight[9]-0.04969039949999533*rho[6]*weight[9]-0.08606629658238704*rho[3]*weight[9]-0.04969039949999533*weight[6]*rho[9]-0.08606629658238704*weight[3]*rho[9]+0.16666666666666669*rho[8]*weight[8]-0.04969039949999533*rho[6]*weight[8]+0.08606629658238704*rho[2]*weight[8]-0.04969039949999533*weight[6]*rho[8]+0.08606629658238704*weight[2]*rho[8]+0.11904761904761905*rho[7]*weight[7]+0.024845199749997667*rho[6]*weight[7]+0.04303314829119352*rho[3]*weight[7]-0.04303314829119352*rho[2]*weight[7]-0.074535599249993*rho[0]*weight[7]+0.024845199749997667*weight[6]*rho[7]+0.04303314829119352*weight[3]*rho[7]-0.04303314829119352*weight[2]*rho[7]-0.074535599249993*weight[0]*rho[7]+0.16666666666666669*rho[6]*weight[6]+0.09622504486493762*rho[3]*weight[6]-0.09622504486493762*rho[2]*weight[6]-0.05555555555555556*rho[0]*weight[6]+0.09622504486493762*weight[3]*rho[6]-0.09622504486493762*weight[2]*rho[6]-0.05555555555555556*weight[0]*rho[6]+0.1*rho[5]*weight[5]-0.03333333333333333*rho[4]*weight[5]-0.05773502691896258*rho[1]*weight[5]-0.03333333333333333*weight[4]*rho[5]-0.05773502691896258*weight[1]*rho[5]+0.1*rho[4]*weight[4]+0.05773502691896258*rho[1]*weight[4]+0.05773502691896258*weight[1]*rho[4]+0.16666666666666669*rho[3]*weight[3]-0.05555555555555556*rho[2]*weight[3]-0.09622504486493762*rho[0]*weight[3]-0.05555555555555556*weight[2]*rho[3]-0.09622504486493762*weight[0]*rho[3]+0.16666666666666669*rho[2]*weight[2]+0.09622504486493762*rho[0]*weight[2]+0.09622504486493762*weight[0]*rho[2]+0.1*rho[1]*weight[1]+0.16666666666666669*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[7]],-(0.034523809523809526*rho[19]*weight[19])-0.02*rho[18]*weight[19]-0.02*rho[17]*weight[19]+0.008935182737458497*rho[16]*weight[19]+0.008935182737458497*rho[15]*weight[19]-0.01924500897298753*rho[14]*weight[19]-0.01924500897298753*rho[13]*weight[19]+0.01924500897298753*rho[12]*weight[19]+0.01924500897298753*rho[11]*weight[19]-0.012909944487358056*rho[10]*weight[19]+0.021825396825396828*rho[9]*weight[19]+0.011111111111111112*rho[8]*weight[19]+0.011111111111111112*rho[7]*weight[19]-0.022360679774997897*rho[6]*weight[19]-0.022360679774997897*rho[5]*weight[19]+0.0372677996249965*rho[4]*weight[19]-0.02151657414559676*rho[3]*weight[19]+0.02151657414559676*rho[2]*weight[19]+0.02151657414559676*rho[1]*weight[19]+0.012422599874998833*rho[0]*weight[19]-0.02*weight[18]*rho[19]-0.02*weight[17]*rho[19]+0.008935182737458497*weight[16]*rho[19]+0.008935182737458497*weight[15]*rho[19]-0.01924500897298753*weight[14]*rho[19]-0.01924500897298753*weight[13]*rho[19]+0.01924500897298753*weight[12]*rho[19]+0.01924500897298753*weight[11]*rho[19]-0.012909944487358056*weight[10]*rho[19]+0.021825396825396828*weight[9]*rho[19]+0.011111111111111112*weight[8]*rho[19]+0.011111111111111112*weight[7]*rho[19]-0.022360679774997897*weight[6]*rho[19]-0.022360679774997897*weight[5]*rho[19]+0.0372677996249965*weight[4]*rho[19]-0.02151657414559676*weight[3]*rho[19]+0.02151657414559676*weight[2]*rho[19]+0.02151657414559676*weight[1]*rho[19]+0.012422599874998833*weight[0]*rho[19]-0.034523809523809526*rho[18]*weight[18]+0.02*rho[17]*weight[18]-0.01924500897298753*rho[16]*weight[18]-0.01924500897298753*rho[15]*weight[18]+0.008935182737458497*rho[14]*weight[18]+0.01924500897298753*rho[13]*weight[18]-0.008935182737458497*rho[12]*weight[18]-0.01924500897298753*rho[11]*weight[18]+0.012909944487358056*rho[10]*weight[18]-0.011111111111111112*rho[9]*weight[18]-0.021825396825396828*rho[8]*weight[18]-0.011111111111111112*rho[7]*weight[18]+0.022360679774997897*rho[6]*weight[18]+0.0372677996249965*rho[5]*weight[18]-0.022360679774997897*rho[4]*weight[18]+0.02151657414559676*rho[3]*weight[18]-0.02151657414559676*rho[2]*weight[18]-0.02151657414559676*rho[1]*weight[18]-0.012422599874998833*rho[0]*weight[18]+0.02*weight[17]*rho[18]-0.01924500897298753*weight[16]*rho[18]-0.01924500897298753*weight[15]*rho[18]+0.008935182737458497*weight[14]*rho[18]+0.01924500897298753*weight[13]*rho[18]-0.008935182737458497*weight[12]*rho[18]-0.01924500897298753*weight[11]*rho[18]+0.012909944487358056*weight[10]*rho[18]-0.011111111111111112*weight[9]*rho[18]-0.021825396825396828*weight[8]*rho[18]-0.011111111111111112*weight[7]*rho[18]+0.022360679774997897*weight[6]*rho[18]+0.0372677996249965*weight[5]*rho[18]-0.022360679774997897*weight[4]*rho[18]+0.02151657414559676*weight[3]*rho[18]-0.02151657414559676*weight[2]*rho[18]-0.02151657414559676*weight[1]*rho[18]-0.012422599874998833*weight[0]*rho[18]-0.034523809523809526*rho[17]*weight[17]-0.01924500897298753*rho[16]*weight[17]-0.01924500897298753*rho[15]*weight[17]+0.01924500897298753*rho[14]*weight[17]+0.008935182737458497*rho[13]*weight[17]-0.01924500897298753*rho[12]*weight[17]-0.008935182737458497*rho[11]*weight[17]+0.012909944487358056*rho[10]*weight[17]-0.011111111111111112*rho[9]*weight[17]-0.011111111111111112*rho[8]*weight[17]-0.021825396825396828*rho[7]*weight[17]+0.0372677996249965*rho[6]*weight[17]+0.022360679774997897*rho[5]*weight[17]-0.022360679774997897*rho[4]*weight[17]+0.02151657414559676*rho[3]*weight[17]-0.02151657414559676*rho[2]*weight[17]-0.02151657414559676*rho[1]*weight[17]-0.012422599874998833*rho[0]*weight[17]-0.01924500897298753*weight[16]*rho[17]-0.01924500897298753*weight[15]*rho[17]+0.01924500897298753*weight[14]*rho[17]+0.008935182737458497*weight[13]*rho[17]-0.01924500897298753*weight[12]*rho[17]-0.008935182737458497*weight[11]*rho[17]+0.012909944487358056*weight[10]*rho[17]-0.011111111111111112*weight[9]*rho[17]-0.011111111111111112*weight[8]*rho[17]-0.021825396825396828*weight[7]*rho[17]+0.0372677996249965*weight[6]*rho[17]+0.022360679774997897*weight[5]*rho[17]-0.022360679774997897*weight[4]*rho[17]+0.02151657414559676*weight[3]*rho[17]-0.02151657414559676*weight[2]*rho[17]-0.02151657414559676*weight[1]*rho[17]-0.012422599874998833*weight[0]*rho[17]-0.06785714285714287*rho[16]*weight[16]+0.021825396825396828*rho[15]*weight[16]-0.011111111111111112*rho[14]*weight[16]-0.011111111111111112*rho[13]*weight[16]+0.011111111111111112*rho[12]*weight[16]-0.022360679774997897*rho[10]*weight[16]-0.010309826235529031*rho[9]*weight[16]+0.01924500897298753*rho[8]*weight[16]+0.004303314829119352*rho[6]*weight[16]-0.021516574145596764*rho[5]*weight[16]+0.021516574145596764*rho[4]*weight[16]-0.012422599874998832*rho[3]*weight[16]+0.037267799624996496*rho[2]*weight[16]+0.012422599874998832*rho[1]*weight[16]+0.021516574145596764*rho[0]*weight[16]+0.021825396825396828*weight[15]*rho[16]-0.011111111111111112*weight[14]*rho[16]-0.011111111111111112*weight[13]*rho[16]+0.011111111111111112*weight[12]*rho[16]-0.022360679774997897*weight[10]*rho[16]-0.010309826235529031*weight[9]*rho[16]+0.01924500897298753*weight[8]*rho[16]+0.004303314829119352*weight[6]*rho[16]-0.021516574145596764*weight[5]*rho[16]+0.021516574145596764*weight[4]*rho[16]-0.012422599874998832*weight[3]*rho[16]+0.037267799624996496*weight[2]*rho[16]+0.012422599874998832*weight[1]*rho[16]+0.021516574145596764*weight[0]*rho[16]-0.06785714285714287*rho[15]*weight[15]-0.011111111111111112*rho[14]*weight[15]-0.011111111111111112*rho[13]*weight[15]+0.011111111111111112*rho[11]*weight[15]-0.022360679774997897*rho[10]*weight[15]-0.010309826235529031*rho[9]*weight[15]+0.01924500897298753*rho[7]*weight[15]-0.021516574145596764*rho[6]*weight[15]+0.004303314829119352*rho[5]*weight[15]+0.021516574145596764*rho[4]*weight[15]-0.012422599874998832*rho[3]*weight[15]+0.012422599874998832*rho[2]*weight[15]+0.037267799624996496*rho[1]*weight[15]+0.021516574145596764*rho[0]*weight[15]-0.011111111111111112*weight[14]*rho[15]-0.011111111111111112*weight[13]*rho[15]+0.011111111111111112*weight[11]*rho[15]-0.022360679774997897*weight[10]*rho[15]-0.010309826235529031*weight[9]*rho[15]+0.01924500897298753*weight[7]*rho[15]-0.021516574145596764*weight[6]*rho[15]+0.004303314829119352*weight[5]*rho[15]+0.021516574145596764*weight[4]*rho[15]-0.012422599874998832*weight[3]*rho[15]+0.012422599874998832*weight[2]*rho[15]+0.037267799624996496*weight[1]*rho[15]+0.021516574145596764*weight[0]*rho[15]-0.06785714285714287*rho[14]*weight[14]-0.021825396825396828*rho[12]*weight[14]-0.011111111111111112*rho[11]*weight[14]+0.022360679774997897*rho[10]*weight[14]-0.01924500897298753*rho[9]*weight[14]+0.010309826235529031*rho[8]*weight[14]-0.004303314829119352*rho[6]*weight[14]+0.021516574145596764*rho[5]*weight[14]-0.021516574145596764*rho[4]*weight[14]+0.037267799624996496*rho[3]*weight[14]-0.012422599874998832*rho[2]*weight[14]-0.012422599874998832*rho[1]*weight[14]-0.021516574145596764*rho[0]*weight[14]-0.021825396825396828*weight[12]*rho[14]-0.011111111111111112*weight[11]*rho[14]+0.022360679774997897*weight[10]*rho[14]-0.01924500897298753*weight[9]*rho[14]+0.010309826235529031*weight[8]*rho[14]-0.004303314829119352*weight[6]*rho[14]+0.021516574145596764*weight[5]*rho[14]-0.021516574145596764*weight[4]*rho[14]+0.037267799624996496*weight[3]*rho[14]-0.012422599874998832*weight[2]*rho[14]-0.012422599874998832*weight[1]*rho[14]-0.021516574145596764*weight[0]*rho[14]-0.06785714285714287*rho[13]*weight[13]-0.011111111111111112*rho[12]*weight[13]-0.021825396825396828*rho[11]*weight[13]+0.022360679774997897*rho[10]*weight[13]-0.01924500897298753*rho[9]*weight[13]+0.010309826235529031*rho[7]*weight[13]+0.021516574145596764*rho[6]*weight[13]-0.004303314829119352*rho[5]*weight[13]-0.021516574145596764*rho[4]*weight[13]+0.037267799624996496*rho[3]*weight[13]-0.012422599874998832*rho[2]*weight[13]-0.012422599874998832*rho[1]*weight[13]-0.021516574145596764*rho[0]*weight[13]-0.011111111111111112*weight[12]*rho[13]-0.021825396825396828*weight[11]*rho[13]+0.022360679774997897*weight[10]*rho[13]-0.01924500897298753*weight[9]*rho[13]+0.010309826235529031*weight[7]*rho[13]+0.021516574145596764*weight[6]*rho[13]-0.004303314829119352*weight[5]*rho[13]-0.021516574145596764*weight[4]*rho[13]+0.037267799624996496*weight[3]*rho[13]-0.012422599874998832*weight[2]*rho[13]-0.012422599874998832*weight[1]*rho[13]-0.021516574145596764*weight[0]*rho[13]-0.06785714285714287*rho[12]*weight[12]+0.011111111111111112*rho[11]*weight[12]-0.022360679774997897*rho[10]*weight[12]-0.010309826235529031*rho[8]*weight[12]+0.01924500897298753*rho[7]*weight[12]-0.021516574145596764*rho[6]*weight[12]-0.021516574145596764*rho[5]*weight[12]-0.004303314829119352*rho[4]*weight[12]-0.012422599874998832*rho[3]*weight[12]+0.012422599874998832*rho[2]*weight[12]+0.037267799624996496*rho[1]*weight[12]+0.021516574145596764*rho[0]*weight[12]+0.011111111111111112*weight[11]*rho[12]-0.022360679774997897*weight[10]*rho[12]-0.010309826235529031*weight[8]*rho[12]+0.01924500897298753*weight[7]*rho[12]-0.021516574145596764*weight[6]*rho[12]-0.021516574145596764*weight[5]*rho[12]-0.004303314829119352*weight[4]*rho[12]-0.012422599874998832*weight[3]*rho[12]+0.012422599874998832*weight[2]*rho[12]+0.037267799624996496*weight[1]*rho[12]+0.021516574145596764*weight[0]*rho[12]-0.06785714285714287*rho[11]*weight[11]-0.022360679774997897*rho[10]*weight[11]+0.01924500897298753*rho[8]*weight[11]-0.010309826235529031*rho[7]*weight[11]-0.021516574145596764*rho[6]*weight[11]-0.021516574145596764*rho[5]*weight[11]-0.004303314829119352*rho[4]*weight[11]-0.012422599874998832*rho[3]*weight[11]+0.037267799624996496*rho[2]*weight[11]+0.012422599874998832*rho[1]*weight[11]+0.021516574145596764*rho[0]*weight[11]-0.022360679774997897*weight[10]*rho[11]+0.01924500897298753*weight[8]*rho[11]-0.010309826235529031*weight[7]*rho[11]-0.021516574145596764*weight[6]*rho[11]-0.021516574145596764*weight[5]*rho[11]-0.004303314829119352*weight[4]*rho[11]-0.012422599874998832*weight[3]*rho[11]+0.037267799624996496*weight[2]*rho[11]+0.012422599874998832*weight[1]*rho[11]+0.021516574145596764*weight[0]*rho[11]-0.025*rho[10]*weight[10]-0.02151657414559676*rho[9]*weight[10]-0.02151657414559676*rho[8]*weight[10]-0.02151657414559676*rho[7]*weight[10]+0.014433756729740645*rho[6]*weight[10]+0.014433756729740645*rho[5]*weight[10]-0.014433756729740645*rho[4]*weight[10]+0.025*rho[3]*weight[10]-0.025*rho[2]*weight[10]-0.025*rho[1]*weight[10]-0.024056261216234404*rho[0]*weight[10]-0.02151657414559676*weight[9]*rho[10]-0.02151657414559676*weight[8]*rho[10]-0.02151657414559676*weight[7]*rho[10]+0.014433756729740645*weight[6]*rho[10]+0.014433756729740645*weight[5]*rho[10]-0.014433756729740645*weight[4]*rho[10]+0.025*weight[3]*rho[10]-0.025*weight[2]*rho[10]-0.025*weight[1]*rho[10]-0.024056261216234404*weight[0]*rho[10]-0.10119047619047619*rho[9]*weight[9]-0.012422599874998833*rho[6]*weight[9]-0.012422599874998833*rho[5]*weight[9]+0.012422599874998833*rho[4]*weight[9]+0.02151657414559676*rho[3]*weight[9]+0.02151657414559676*rho[2]*weight[9]+0.02151657414559676*rho[1]*weight[9]+0.0372677996249965*rho[0]*weight[9]-0.012422599874998833*weight[6]*rho[9]-0.012422599874998833*weight[5]*rho[9]+0.012422599874998833*weight[4]*rho[9]+0.02151657414559676*weight[3]*rho[9]+0.02151657414559676*weight[2]*rho[9]+0.02151657414559676*weight[1]*rho[9]+0.0372677996249965*weight[0]*rho[9]-0.10119047619047619*rho[8]*weight[8]-0.012422599874998833*rho[6]*weight[8]-0.012422599874998833*rho[5]*weight[8]+0.012422599874998833*rho[4]*weight[8]-0.02151657414559676*rho[3]*weight[8]-0.02151657414559676*rho[2]*weight[8]+0.02151657414559676*rho[1]*weight[8]+0.0372677996249965*rho[0]*weight[8]-0.012422599874998833*weight[6]*rho[8]-0.012422599874998833*weight[5]*rho[8]+0.012422599874998833*weight[4]*rho[8]-0.02151657414559676*weight[3]*rho[8]-0.02151657414559676*weight[2]*rho[8]+0.02151657414559676*weight[1]*rho[8]+0.0372677996249965*weight[0]*rho[8]-0.10119047619047619*rho[7]*weight[7]-0.012422599874998833*rho[6]*weight[7]-0.012422599874998833*rho[5]*weight[7]+0.012422599874998833*rho[4]*weight[7]-0.02151657414559676*rho[3]*weight[7]+0.02151657414559676*rho[2]*weight[7]-0.02151657414559676*rho[1]*weight[7]+0.0372677996249965*rho[0]*weight[7]-0.012422599874998833*weight[6]*rho[7]-0.012422599874998833*weight[5]*rho[7]+0.012422599874998833*weight[4]*rho[7]-0.02151657414559676*weight[3]*rho[7]+0.02151657414559676*weight[2]*rho[7]-0.02151657414559676*weight[1]*rho[7]+0.0372677996249965*weight[0]*rho[7]-0.058333333333333334*rho[6]*weight[6]+0.025*rho[5]*weight[6]-0.025*rho[4]*weight[6]-0.004811252243246881*rho[3]*weight[6]+0.004811252243246881*rho[2]*weight[6]-0.024056261216234404*rho[1]*weight[6]-0.01388888888888889*rho[0]*weight[6]+0.025*weight[5]*rho[6]-0.025*weight[4]*rho[6]-0.004811252243246881*weight[3]*rho[6]+0.004811252243246881*weight[2]*rho[6]-0.024056261216234404*weight[1]*rho[6]-0.01388888888888889*weight[0]*rho[6]-0.058333333333333334*rho[5]*weight[5]-0.025*rho[4]*weight[5]-0.004811252243246881*rho[3]*weight[5]-0.024056261216234404*rho[2]*weight[5]+0.004811252243246881*rho[1]*weight[5]-0.01388888888888889*rho[0]*weight[5]-0.025*weight[4]*rho[5]-0.004811252243246881*weight[3]*rho[5]-0.024056261216234404*weight[2]*rho[5]+0.004811252243246881*weight[1]*rho[5]-0.01388888888888889*weight[0]*rho[5]-0.058333333333333334*rho[4]*weight[4]-0.024056261216234404*rho[3]*weight[4]-0.004811252243246881*rho[2]*weight[4]-0.004811252243246881*rho[1]*weight[4]+0.01388888888888889*rho[0]*weight[4]-0.024056261216234404*weight[3]*rho[4]-0.004811252243246881*weight[2]*rho[4]-0.004811252243246881*weight[1]*rho[4]+0.01388888888888889*weight[0]*rho[4]-0.09166666666666667*rho[3]*weight[3]-0.01388888888888889*rho[2]*weight[3]-0.01388888888888889*rho[1]*weight[3]+0.024056261216234404*rho[0]*weight[3]-0.01388888888888889*weight[2]*rho[3]-0.01388888888888889*weight[1]*rho[3]+0.024056261216234404*weight[0]*rho[3]-0.09166666666666667*rho[2]*weight[2]+0.01388888888888889*rho[1]*weight[2]-0.024056261216234404*rho[0]*weight[2]+0.01388888888888889*weight[1]*rho[2]-0.024056261216234404*weight[0]*rho[2]-0.09166666666666667*rho[1]*weight[1]-0.024056261216234404*rho[0]*weight[1]-0.024056261216234404*weight[0]*rho[1]-0.125*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[7]] += -(0.034523809523809526*rho[19]*weight[19])-0.02*rho[18]*weight[19]-0.02*rho[17]*weight[19]+0.008935182737458497*rho[16]*weight[19]+0.008935182737458497*rho[15]*weight[19]-0.01924500897298753*rho[14]*weight[19]-0.01924500897298753*rho[13]*weight[19]+0.01924500897298753*rho[12]*weight[19]+0.01924500897298753*rho[11]*weight[19]-0.012909944487358056*rho[10]*weight[19]+0.021825396825396828*rho[9]*weight[19]+0.011111111111111112*rho[8]*weight[19]+0.011111111111111112*rho[7]*weight[19]-0.022360679774997897*rho[6]*weight[19]-0.022360679774997897*rho[5]*weight[19]+0.0372677996249965*rho[4]*weight[19]-0.02151657414559676*rho[3]*weight[19]+0.02151657414559676*rho[2]*weight[19]+0.02151657414559676*rho[1]*weight[19]+0.012422599874998833*rho[0]*weight[19]-0.02*weight[18]*rho[19]-0.02*weight[17]*rho[19]+0.008935182737458497*weight[16]*rho[19]+0.008935182737458497*weight[15]*rho[19]-0.01924500897298753*weight[14]*rho[19]-0.01924500897298753*weight[13]*rho[19]+0.01924500897298753*weight[12]*rho[19]+0.01924500897298753*weight[11]*rho[19]-0.012909944487358056*weight[10]*rho[19]+0.021825396825396828*weight[9]*rho[19]+0.011111111111111112*weight[8]*rho[19]+0.011111111111111112*weight[7]*rho[19]-0.022360679774997897*weight[6]*rho[19]-0.022360679774997897*weight[5]*rho[19]+0.0372677996249965*weight[4]*rho[19]-0.02151657414559676*weight[3]*rho[19]+0.02151657414559676*weight[2]*rho[19]+0.02151657414559676*weight[1]*rho[19]+0.012422599874998833*weight[0]*rho[19]-0.034523809523809526*rho[18]*weight[18]+0.02*rho[17]*weight[18]-0.01924500897298753*rho[16]*weight[18]-0.01924500897298753*rho[15]*weight[18]+0.008935182737458497*rho[14]*weight[18]+0.01924500897298753*rho[13]*weight[18]-0.008935182737458497*rho[12]*weight[18]-0.01924500897298753*rho[11]*weight[18]+0.012909944487358056*rho[10]*weight[18]-0.011111111111111112*rho[9]*weight[18]-0.021825396825396828*rho[8]*weight[18]-0.011111111111111112*rho[7]*weight[18]+0.022360679774997897*rho[6]*weight[18]+0.0372677996249965*rho[5]*weight[18]-0.022360679774997897*rho[4]*weight[18]+0.02151657414559676*rho[3]*weight[18]-0.02151657414559676*rho[2]*weight[18]-0.02151657414559676*rho[1]*weight[18]-0.012422599874998833*rho[0]*weight[18]+0.02*weight[17]*rho[18]-0.01924500897298753*weight[16]*rho[18]-0.01924500897298753*weight[15]*rho[18]+0.008935182737458497*weight[14]*rho[18]+0.01924500897298753*weight[13]*rho[18]-0.008935182737458497*weight[12]*rho[18]-0.01924500897298753*weight[11]*rho[18]+0.012909944487358056*weight[10]*rho[18]-0.011111111111111112*weight[9]*rho[18]-0.021825396825396828*weight[8]*rho[18]-0.011111111111111112*weight[7]*rho[18]+0.022360679774997897*weight[6]*rho[18]+0.0372677996249965*weight[5]*rho[18]-0.022360679774997897*weight[4]*rho[18]+0.02151657414559676*weight[3]*rho[18]-0.02151657414559676*weight[2]*rho[18]-0.02151657414559676*weight[1]*rho[18]-0.012422599874998833*weight[0]*rho[18]-0.034523809523809526*rho[17]*weight[17]-0.01924500897298753*rho[16]*weight[17]-0.01924500897298753*rho[15]*weight[17]+0.01924500897298753*rho[14]*weight[17]+0.008935182737458497*rho[13]*weight[17]-0.01924500897298753*rho[12]*weight[17]-0.008935182737458497*rho[11]*weight[17]+0.012909944487358056*rho[10]*weight[17]-0.011111111111111112*rho[9]*weight[17]-0.011111111111111112*rho[8]*weight[17]-0.021825396825396828*rho[7]*weight[17]+0.0372677996249965*rho[6]*weight[17]+0.022360679774997897*rho[5]*weight[17]-0.022360679774997897*rho[4]*weight[17]+0.02151657414559676*rho[3]*weight[17]-0.02151657414559676*rho[2]*weight[17]-0.02151657414559676*rho[1]*weight[17]-0.012422599874998833*rho[0]*weight[17]-0.01924500897298753*weight[16]*rho[17]-0.01924500897298753*weight[15]*rho[17]+0.01924500897298753*weight[14]*rho[17]+0.008935182737458497*weight[13]*rho[17]-0.01924500897298753*weight[12]*rho[17]-0.008935182737458497*weight[11]*rho[17]+0.012909944487358056*weight[10]*rho[17]-0.011111111111111112*weight[9]*rho[17]-0.011111111111111112*weight[8]*rho[17]-0.021825396825396828*weight[7]*rho[17]+0.0372677996249965*weight[6]*rho[17]+0.022360679774997897*weight[5]*rho[17]-0.022360679774997897*weight[4]*rho[17]+0.02151657414559676*weight[3]*rho[17]-0.02151657414559676*weight[2]*rho[17]-0.02151657414559676*weight[1]*rho[17]-0.012422599874998833*weight[0]*rho[17]-0.06785714285714287*rho[16]*weight[16]+0.021825396825396828*rho[15]*weight[16]-0.011111111111111112*rho[14]*weight[16]-0.011111111111111112*rho[13]*weight[16]+0.011111111111111112*rho[12]*weight[16]-0.022360679774997897*rho[10]*weight[16]-0.010309826235529031*rho[9]*weight[16]+0.01924500897298753*rho[8]*weight[16]+0.004303314829119352*rho[6]*weight[16]-0.021516574145596764*rho[5]*weight[16]+0.021516574145596764*rho[4]*weight[16]-0.012422599874998832*rho[3]*weight[16]+0.037267799624996496*rho[2]*weight[16]+0.012422599874998832*rho[1]*weight[16]+0.021516574145596764*rho[0]*weight[16]+0.021825396825396828*weight[15]*rho[16]-0.011111111111111112*weight[14]*rho[16]-0.011111111111111112*weight[13]*rho[16]+0.011111111111111112*weight[12]*rho[16]-0.022360679774997897*weight[10]*rho[16]-0.010309826235529031*weight[9]*rho[16]+0.01924500897298753*weight[8]*rho[16]+0.004303314829119352*weight[6]*rho[16]-0.021516574145596764*weight[5]*rho[16]+0.021516574145596764*weight[4]*rho[16]-0.012422599874998832*weight[3]*rho[16]+0.037267799624996496*weight[2]*rho[16]+0.012422599874998832*weight[1]*rho[16]+0.021516574145596764*weight[0]*rho[16]-0.06785714285714287*rho[15]*weight[15]-0.011111111111111112*rho[14]*weight[15]-0.011111111111111112*rho[13]*weight[15]+0.011111111111111112*rho[11]*weight[15]-0.022360679774997897*rho[10]*weight[15]-0.010309826235529031*rho[9]*weight[15]+0.01924500897298753*rho[7]*weight[15]-0.021516574145596764*rho[6]*weight[15]+0.004303314829119352*rho[5]*weight[15]+0.021516574145596764*rho[4]*weight[15]-0.012422599874998832*rho[3]*weight[15]+0.012422599874998832*rho[2]*weight[15]+0.037267799624996496*rho[1]*weight[15]+0.021516574145596764*rho[0]*weight[15]-0.011111111111111112*weight[14]*rho[15]-0.011111111111111112*weight[13]*rho[15]+0.011111111111111112*weight[11]*rho[15]-0.022360679774997897*weight[10]*rho[15]-0.010309826235529031*weight[9]*rho[15]+0.01924500897298753*weight[7]*rho[15]-0.021516574145596764*weight[6]*rho[15]+0.004303314829119352*weight[5]*rho[15]+0.021516574145596764*weight[4]*rho[15]-0.012422599874998832*weight[3]*rho[15]+0.012422599874998832*weight[2]*rho[15]+0.037267799624996496*weight[1]*rho[15]+0.021516574145596764*weight[0]*rho[15]-0.06785714285714287*rho[14]*weight[14]-0.021825396825396828*rho[12]*weight[14]-0.011111111111111112*rho[11]*weight[14]+0.022360679774997897*rho[10]*weight[14]-0.01924500897298753*rho[9]*weight[14]+0.010309826235529031*rho[8]*weight[14]-0.004303314829119352*rho[6]*weight[14]+0.021516574145596764*rho[5]*weight[14]-0.021516574145596764*rho[4]*weight[14]+0.037267799624996496*rho[3]*weight[14]-0.012422599874998832*rho[2]*weight[14]-0.012422599874998832*rho[1]*weight[14]-0.021516574145596764*rho[0]*weight[14]-0.021825396825396828*weight[12]*rho[14]-0.011111111111111112*weight[11]*rho[14]+0.022360679774997897*weight[10]*rho[14]-0.01924500897298753*weight[9]*rho[14]+0.010309826235529031*weight[8]*rho[14]-0.004303314829119352*weight[6]*rho[14]+0.021516574145596764*weight[5]*rho[14]-0.021516574145596764*weight[4]*rho[14]+0.037267799624996496*weight[3]*rho[14]-0.012422599874998832*weight[2]*rho[14]-0.012422599874998832*weight[1]*rho[14]-0.021516574145596764*weight[0]*rho[14]-0.06785714285714287*rho[13]*weight[13]-0.011111111111111112*rho[12]*weight[13]-0.021825396825396828*rho[11]*weight[13]+0.022360679774997897*rho[10]*weight[13]-0.01924500897298753*rho[9]*weight[13]+0.010309826235529031*rho[7]*weight[13]+0.021516574145596764*rho[6]*weight[13]-0.004303314829119352*rho[5]*weight[13]-0.021516574145596764*rho[4]*weight[13]+0.037267799624996496*rho[3]*weight[13]-0.012422599874998832*rho[2]*weight[13]-0.012422599874998832*rho[1]*weight[13]-0.021516574145596764*rho[0]*weight[13]-0.011111111111111112*weight[12]*rho[13]-0.021825396825396828*weight[11]*rho[13]+0.022360679774997897*weight[10]*rho[13]-0.01924500897298753*weight[9]*rho[13]+0.010309826235529031*weight[7]*rho[13]+0.021516574145596764*weight[6]*rho[13]-0.004303314829119352*weight[5]*rho[13]-0.021516574145596764*weight[4]*rho[13]+0.037267799624996496*weight[3]*rho[13]-0.012422599874998832*weight[2]*rho[13]-0.012422599874998832*weight[1]*rho[13]-0.021516574145596764*weight[0]*rho[13]-0.06785714285714287*rho[12]*weight[12]+0.011111111111111112*rho[11]*weight[12]-0.022360679774997897*rho[10]*weight[12]-0.010309826235529031*rho[8]*weight[12]+0.01924500897298753*rho[7]*weight[12]-0.021516574145596764*rho[6]*weight[12]-0.021516574145596764*rho[5]*weight[12]-0.004303314829119352*rho[4]*weight[12]-0.012422599874998832*rho[3]*weight[12]+0.012422599874998832*rho[2]*weight[12]+0.037267799624996496*rho[1]*weight[12]+0.021516574145596764*rho[0]*weight[12]+0.011111111111111112*weight[11]*rho[12]-0.022360679774997897*weight[10]*rho[12]-0.010309826235529031*weight[8]*rho[12]+0.01924500897298753*weight[7]*rho[12]-0.021516574145596764*weight[6]*rho[12]-0.021516574145596764*weight[5]*rho[12]-0.004303314829119352*weight[4]*rho[12]-0.012422599874998832*weight[3]*rho[12]+0.012422599874998832*weight[2]*rho[12]+0.037267799624996496*weight[1]*rho[12]+0.021516574145596764*weight[0]*rho[12]-0.06785714285714287*rho[11]*weight[11]-0.022360679774997897*rho[10]*weight[11]+0.01924500897298753*rho[8]*weight[11]-0.010309826235529031*rho[7]*weight[11]-0.021516574145596764*rho[6]*weight[11]-0.021516574145596764*rho[5]*weight[11]-0.004303314829119352*rho[4]*weight[11]-0.012422599874998832*rho[3]*weight[11]+0.037267799624996496*rho[2]*weight[11]+0.012422599874998832*rho[1]*weight[11]+0.021516574145596764*rho[0]*weight[11]-0.022360679774997897*weight[10]*rho[11]+0.01924500897298753*weight[8]*rho[11]-0.010309826235529031*weight[7]*rho[11]-0.021516574145596764*weight[6]*rho[11]-0.021516574145596764*weight[5]*rho[11]-0.004303314829119352*weight[4]*rho[11]-0.012422599874998832*weight[3]*rho[11]+0.037267799624996496*weight[2]*rho[11]+0.012422599874998832*weight[1]*rho[11]+0.021516574145596764*weight[0]*rho[11]-0.025*rho[10]*weight[10]-0.02151657414559676*rho[9]*weight[10]-0.02151657414559676*rho[8]*weight[10]-0.02151657414559676*rho[7]*weight[10]+0.014433756729740645*rho[6]*weight[10]+0.014433756729740645*rho[5]*weight[10]-0.014433756729740645*rho[4]*weight[10]+0.025*rho[3]*weight[10]-0.025*rho[2]*weight[10]-0.025*rho[1]*weight[10]-0.024056261216234404*rho[0]*weight[10]-0.02151657414559676*weight[9]*rho[10]-0.02151657414559676*weight[8]*rho[10]-0.02151657414559676*weight[7]*rho[10]+0.014433756729740645*weight[6]*rho[10]+0.014433756729740645*weight[5]*rho[10]-0.014433756729740645*weight[4]*rho[10]+0.025*weight[3]*rho[10]-0.025*weight[2]*rho[10]-0.025*weight[1]*rho[10]-0.024056261216234404*weight[0]*rho[10]-0.10119047619047619*rho[9]*weight[9]-0.012422599874998833*rho[6]*weight[9]-0.012422599874998833*rho[5]*weight[9]+0.012422599874998833*rho[4]*weight[9]+0.02151657414559676*rho[3]*weight[9]+0.02151657414559676*rho[2]*weight[9]+0.02151657414559676*rho[1]*weight[9]+0.0372677996249965*rho[0]*weight[9]-0.012422599874998833*weight[6]*rho[9]-0.012422599874998833*weight[5]*rho[9]+0.012422599874998833*weight[4]*rho[9]+0.02151657414559676*weight[3]*rho[9]+0.02151657414559676*weight[2]*rho[9]+0.02151657414559676*weight[1]*rho[9]+0.0372677996249965*weight[0]*rho[9]-0.10119047619047619*rho[8]*weight[8]-0.012422599874998833*rho[6]*weight[8]-0.012422599874998833*rho[5]*weight[8]+0.012422599874998833*rho[4]*weight[8]-0.02151657414559676*rho[3]*weight[8]-0.02151657414559676*rho[2]*weight[8]+0.02151657414559676*rho[1]*weight[8]+0.0372677996249965*rho[0]*weight[8]-0.012422599874998833*weight[6]*rho[8]-0.012422599874998833*weight[5]*rho[8]+0.012422599874998833*weight[4]*rho[8]-0.02151657414559676*weight[3]*rho[8]-0.02151657414559676*weight[2]*rho[8]+0.02151657414559676*weight[1]*rho[8]+0.0372677996249965*weight[0]*rho[8]-0.10119047619047619*rho[7]*weight[7]-0.012422599874998833*rho[6]*weight[7]-0.012422599874998833*rho[5]*weight[7]+0.012422599874998833*rho[4]*weight[7]-0.02151657414559676*rho[3]*weight[7]+0.02151657414559676*rho[2]*weight[7]-0.02151657414559676*rho[1]*weight[7]+0.0372677996249965*rho[0]*weight[7]-0.012422599874998833*weight[6]*rho[7]-0.012422599874998833*weight[5]*rho[7]+0.012422599874998833*weight[4]*rho[7]-0.02151657414559676*weight[3]*rho[7]+0.02151657414559676*weight[2]*rho[7]-0.02151657414559676*weight[1]*rho[7]+0.0372677996249965*weight[0]*rho[7]-0.058333333333333334*rho[6]*weight[6]+0.025*rho[5]*weight[6]-0.025*rho[4]*weight[6]-0.004811252243246881*rho[3]*weight[6]+0.004811252243246881*rho[2]*weight[6]-0.024056261216234404*rho[1]*weight[6]-0.01388888888888889*rho[0]*weight[6]+0.025*weight[5]*rho[6]-0.025*weight[4]*rho[6]-0.004811252243246881*weight[3]*rho[6]+0.004811252243246881*weight[2]*rho[6]-0.024056261216234404*weight[1]*rho[6]-0.01388888888888889*weight[0]*rho[6]-0.058333333333333334*rho[5]*weight[5]-0.025*rho[4]*weight[5]-0.004811252243246881*rho[3]*weight[5]-0.024056261216234404*rho[2]*weight[5]+0.004811252243246881*rho[1]*weight[5]-0.01388888888888889*rho[0]*weight[5]-0.025*weight[4]*rho[5]-0.004811252243246881*weight[3]*rho[5]-0.024056261216234404*weight[2]*rho[5]+0.004811252243246881*weight[1]*rho[5]-0.01388888888888889*weight[0]*rho[5]-0.058333333333333334*rho[4]*weight[4]-0.024056261216234404*rho[3]*weight[4]-0.004811252243246881*rho[2]*weight[4]-0.004811252243246881*rho[1]*weight[4]+0.01388888888888889*rho[0]*weight[4]-0.024056261216234404*weight[3]*rho[4]-0.004811252243246881*weight[2]*rho[4]-0.004811252243246881*weight[1]*rho[4]+0.01388888888888889*weight[0]*rho[4]-0.09166666666666667*rho[3]*weight[3]-0.01388888888888889*rho[2]*weight[3]-0.01388888888888889*rho[1]*weight[3]+0.024056261216234404*rho[0]*weight[3]-0.01388888888888889*weight[2]*rho[3]-0.01388888888888889*weight[1]*rho[3]+0.024056261216234404*weight[0]*rho[3]-0.09166666666666667*rho[2]*weight[2]+0.01388888888888889*rho[1]*weight[2]-0.024056261216234404*rho[0]*weight[2]+0.01388888888888889*weight[1]*rho[2]-0.024056261216234404*weight[0]*rho[2]-0.09166666666666667*rho[1]*weight[1]-0.024056261216234404*rho[0]*weight[1]-0.024056261216234404*weight[0]*rho[1]-0.125*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[8]],0.11904761904761905*rho[19]*weight[19]-0.06873217490352689*rho[16]*weight[19]-0.06873217490352689*rho[15]*weight[19]+0.03849001794597506*rho[12]*weight[19]+0.03849001794597506*rho[11]*weight[19]+0.03968253968253969*rho[9]*weight[19]-0.022222222222222223*rho[8]*weight[19]-0.022222222222222223*rho[7]*weight[19]-0.074535599249993*rho[4]*weight[19]+0.04303314829119352*rho[2]*weight[19]+0.04303314829119352*rho[1]*weight[19]-0.024845199749997667*rho[0]*weight[19]-0.06873217490352689*weight[16]*rho[19]-0.06873217490352689*weight[15]*rho[19]+0.03849001794597506*weight[12]*rho[19]+0.03849001794597506*weight[11]*rho[19]+0.03968253968253969*weight[9]*rho[19]-0.022222222222222223*weight[8]*rho[19]-0.022222222222222223*weight[7]*rho[19]-0.074535599249993*weight[4]*rho[19]+0.04303314829119352*weight[2]*rho[19]+0.04303314829119352*weight[1]*rho[19]-0.024845199749997667*weight[0]*rho[19]+0.1*rho[18]*weight[18]+0.02666666666666667*rho[17]*weight[18]-0.05773502691896258*rho[14]*weight[18]-0.051639777949432225*rho[10]*weight[18]+0.029814239699997195*rho[6]*weight[18]+0.02666666666666667*weight[17]*rho[18]-0.05773502691896258*weight[14]*rho[18]-0.051639777949432225*weight[10]*rho[18]+0.029814239699997195*weight[6]*rho[18]+0.1*rho[17]*weight[17]-0.05773502691896258*rho[13]*weight[17]-0.051639777949432225*rho[10]*weight[17]+0.029814239699997195*rho[5]*weight[17]-0.05773502691896258*weight[13]*rho[17]-0.051639777949432225*weight[10]*rho[17]+0.029814239699997195*weight[5]*rho[17]+0.11904761904761905*rho[16]*weight[16]+0.03968253968253969*rho[15]*weight[16]-0.022222222222222223*rho[12]*weight[16]-0.06873217490352689*rho[9]*weight[16]+0.03849001794597506*rho[8]*weight[16]+0.04303314829119353*rho[4]*weight[16]-0.07453559924999299*rho[2]*weight[16]-0.024845199749997663*rho[1]*weight[16]+0.04303314829119353*rho[0]*weight[16]+0.03968253968253969*weight[15]*rho[16]-0.022222222222222223*weight[12]*rho[16]-0.06873217490352689*weight[9]*rho[16]+0.03849001794597506*weight[8]*rho[16]+0.04303314829119353*weight[4]*rho[16]-0.07453559924999299*weight[2]*rho[16]-0.024845199749997663*weight[1]*rho[16]+0.04303314829119353*weight[0]*rho[16]+0.11904761904761905*rho[15]*weight[15]-0.022222222222222223*rho[11]*weight[15]-0.06873217490352689*rho[9]*weight[15]+0.03849001794597506*rho[7]*weight[15]+0.04303314829119353*rho[4]*weight[15]-0.024845199749997663*rho[2]*weight[15]-0.07453559924999299*rho[1]*weight[15]+0.04303314829119353*rho[0]*weight[15]-0.022222222222222223*weight[11]*rho[15]-0.06873217490352689*weight[9]*rho[15]+0.03849001794597506*weight[7]*rho[15]+0.04303314829119353*weight[4]*rho[15]-0.024845199749997663*weight[2]*rho[15]-0.07453559924999299*weight[1]*rho[15]+0.04303314829119353*weight[0]*rho[15]+0.1*rho[14]*weight[14]+0.029814239699997195*rho[10]*weight[14]-0.05163977794943223*rho[6]*weight[14]+0.029814239699997195*weight[10]*rho[14]-0.05163977794943223*weight[6]*rho[14]+0.1*rho[13]*weight[13]+0.029814239699997195*rho[10]*weight[13]-0.05163977794943223*rho[5]*weight[13]+0.029814239699997195*weight[10]*rho[13]-0.05163977794943223*weight[5]*rho[13]+0.16666666666666669*rho[12]*weight[12]+0.044444444444444446*rho[11]*weight[12]-0.09622504486493764*rho[8]*weight[12]-0.08606629658238706*rho[4]*weight[12]+0.049690399499995326*rho[2]*weight[12]+0.044444444444444446*weight[11]*rho[12]-0.09622504486493764*weight[8]*rho[12]-0.08606629658238706*weight[4]*rho[12]+0.049690399499995326*weight[2]*rho[12]+0.16666666666666669*rho[11]*weight[11]-0.09622504486493764*rho[7]*weight[11]-0.08606629658238706*rho[4]*weight[11]+0.049690399499995326*rho[1]*weight[11]-0.09622504486493764*weight[7]*rho[11]-0.08606629658238706*weight[4]*rho[11]+0.049690399499995326*weight[1]*rho[11]+0.1*rho[10]*weight[10]-0.05773502691896258*rho[6]*weight[10]-0.05773502691896258*rho[5]*weight[10]+0.03333333333333333*rho[3]*weight[10]-0.05773502691896258*weight[6]*rho[10]-0.05773502691896258*weight[5]*rho[10]+0.03333333333333333*weight[3]*rho[10]+0.11904761904761905*rho[9]*weight[9]-0.024845199749997667*rho[4]*weight[9]+0.04303314829119352*rho[2]*weight[9]+0.04303314829119352*rho[1]*weight[9]-0.074535599249993*rho[0]*weight[9]-0.024845199749997667*weight[4]*rho[9]+0.04303314829119352*weight[2]*rho[9]+0.04303314829119352*weight[1]*rho[9]-0.074535599249993*weight[0]*rho[9]+0.16666666666666669*rho[8]*weight[8]+0.04969039949999533*rho[4]*weight[8]-0.08606629658238704*rho[2]*weight[8]+0.04969039949999533*weight[4]*rho[8]-0.08606629658238704*weight[2]*rho[8]+0.16666666666666669*rho[7]*weight[7]+0.04969039949999533*rho[4]*weight[7]-0.08606629658238704*rho[1]*weight[7]+0.04969039949999533*weight[4]*rho[7]-0.08606629658238704*weight[1]*rho[7]+0.1*rho[6]*weight[6]+0.03333333333333333*rho[5]*weight[6]-0.05773502691896258*rho[3]*weight[6]+0.03333333333333333*weight[5]*rho[6]-0.05773502691896258*weight[3]*rho[6]+0.1*rho[5]*weight[5]-0.05773502691896258*rho[3]*weight[5]-0.05773502691896258*weight[3]*rho[5]+0.16666666666666669*rho[4]*weight[4]-0.09622504486493762*rho[2]*weight[4]-0.09622504486493762*rho[1]*weight[4]+0.05555555555555556*rho[0]*weight[4]-0.09622504486493762*weight[2]*rho[4]-0.09622504486493762*weight[1]*rho[4]+0.05555555555555556*weight[0]*rho[4]+0.1*rho[3]*weight[3]+0.16666666666666669*rho[2]*weight[2]+0.05555555555555556*rho[1]*weight[2]-0.09622504486493762*rho[0]*weight[2]+0.05555555555555556*weight[1]*rho[2]-0.09622504486493762*weight[0]*rho[2]+0.16666666666666669*rho[1]*weight[1]-0.09622504486493762*rho[0]*weight[1]-0.09622504486493762*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[8]] += 0.11904761904761905*rho[19]*weight[19]-0.06873217490352689*rho[16]*weight[19]-0.06873217490352689*rho[15]*weight[19]+0.03849001794597506*rho[12]*weight[19]+0.03849001794597506*rho[11]*weight[19]+0.03968253968253969*rho[9]*weight[19]-0.022222222222222223*rho[8]*weight[19]-0.022222222222222223*rho[7]*weight[19]-0.074535599249993*rho[4]*weight[19]+0.04303314829119352*rho[2]*weight[19]+0.04303314829119352*rho[1]*weight[19]-0.024845199749997667*rho[0]*weight[19]-0.06873217490352689*weight[16]*rho[19]-0.06873217490352689*weight[15]*rho[19]+0.03849001794597506*weight[12]*rho[19]+0.03849001794597506*weight[11]*rho[19]+0.03968253968253969*weight[9]*rho[19]-0.022222222222222223*weight[8]*rho[19]-0.022222222222222223*weight[7]*rho[19]-0.074535599249993*weight[4]*rho[19]+0.04303314829119352*weight[2]*rho[19]+0.04303314829119352*weight[1]*rho[19]-0.024845199749997667*weight[0]*rho[19]+0.1*rho[18]*weight[18]+0.02666666666666667*rho[17]*weight[18]-0.05773502691896258*rho[14]*weight[18]-0.051639777949432225*rho[10]*weight[18]+0.029814239699997195*rho[6]*weight[18]+0.02666666666666667*weight[17]*rho[18]-0.05773502691896258*weight[14]*rho[18]-0.051639777949432225*weight[10]*rho[18]+0.029814239699997195*weight[6]*rho[18]+0.1*rho[17]*weight[17]-0.05773502691896258*rho[13]*weight[17]-0.051639777949432225*rho[10]*weight[17]+0.029814239699997195*rho[5]*weight[17]-0.05773502691896258*weight[13]*rho[17]-0.051639777949432225*weight[10]*rho[17]+0.029814239699997195*weight[5]*rho[17]+0.11904761904761905*rho[16]*weight[16]+0.03968253968253969*rho[15]*weight[16]-0.022222222222222223*rho[12]*weight[16]-0.06873217490352689*rho[9]*weight[16]+0.03849001794597506*rho[8]*weight[16]+0.04303314829119353*rho[4]*weight[16]-0.07453559924999299*rho[2]*weight[16]-0.024845199749997663*rho[1]*weight[16]+0.04303314829119353*rho[0]*weight[16]+0.03968253968253969*weight[15]*rho[16]-0.022222222222222223*weight[12]*rho[16]-0.06873217490352689*weight[9]*rho[16]+0.03849001794597506*weight[8]*rho[16]+0.04303314829119353*weight[4]*rho[16]-0.07453559924999299*weight[2]*rho[16]-0.024845199749997663*weight[1]*rho[16]+0.04303314829119353*weight[0]*rho[16]+0.11904761904761905*rho[15]*weight[15]-0.022222222222222223*rho[11]*weight[15]-0.06873217490352689*rho[9]*weight[15]+0.03849001794597506*rho[7]*weight[15]+0.04303314829119353*rho[4]*weight[15]-0.024845199749997663*rho[2]*weight[15]-0.07453559924999299*rho[1]*weight[15]+0.04303314829119353*rho[0]*weight[15]-0.022222222222222223*weight[11]*rho[15]-0.06873217490352689*weight[9]*rho[15]+0.03849001794597506*weight[7]*rho[15]+0.04303314829119353*weight[4]*rho[15]-0.024845199749997663*weight[2]*rho[15]-0.07453559924999299*weight[1]*rho[15]+0.04303314829119353*weight[0]*rho[15]+0.1*rho[14]*weight[14]+0.029814239699997195*rho[10]*weight[14]-0.05163977794943223*rho[6]*weight[14]+0.029814239699997195*weight[10]*rho[14]-0.05163977794943223*weight[6]*rho[14]+0.1*rho[13]*weight[13]+0.029814239699997195*rho[10]*weight[13]-0.05163977794943223*rho[5]*weight[13]+0.029814239699997195*weight[10]*rho[13]-0.05163977794943223*weight[5]*rho[13]+0.16666666666666669*rho[12]*weight[12]+0.044444444444444446*rho[11]*weight[12]-0.09622504486493764*rho[8]*weight[12]-0.08606629658238706*rho[4]*weight[12]+0.049690399499995326*rho[2]*weight[12]+0.044444444444444446*weight[11]*rho[12]-0.09622504486493764*weight[8]*rho[12]-0.08606629658238706*weight[4]*rho[12]+0.049690399499995326*weight[2]*rho[12]+0.16666666666666669*rho[11]*weight[11]-0.09622504486493764*rho[7]*weight[11]-0.08606629658238706*rho[4]*weight[11]+0.049690399499995326*rho[1]*weight[11]-0.09622504486493764*weight[7]*rho[11]-0.08606629658238706*weight[4]*rho[11]+0.049690399499995326*weight[1]*rho[11]+0.1*rho[10]*weight[10]-0.05773502691896258*rho[6]*weight[10]-0.05773502691896258*rho[5]*weight[10]+0.03333333333333333*rho[3]*weight[10]-0.05773502691896258*weight[6]*rho[10]-0.05773502691896258*weight[5]*rho[10]+0.03333333333333333*weight[3]*rho[10]+0.11904761904761905*rho[9]*weight[9]-0.024845199749997667*rho[4]*weight[9]+0.04303314829119352*rho[2]*weight[9]+0.04303314829119352*rho[1]*weight[9]-0.074535599249993*rho[0]*weight[9]-0.024845199749997667*weight[4]*rho[9]+0.04303314829119352*weight[2]*rho[9]+0.04303314829119352*weight[1]*rho[9]-0.074535599249993*weight[0]*rho[9]+0.16666666666666669*rho[8]*weight[8]+0.04969039949999533*rho[4]*weight[8]-0.08606629658238704*rho[2]*weight[8]+0.04969039949999533*weight[4]*rho[8]-0.08606629658238704*weight[2]*rho[8]+0.16666666666666669*rho[7]*weight[7]+0.04969039949999533*rho[4]*weight[7]-0.08606629658238704*rho[1]*weight[7]+0.04969039949999533*weight[4]*rho[7]-0.08606629658238704*weight[1]*rho[7]+0.1*rho[6]*weight[6]+0.03333333333333333*rho[5]*weight[6]-0.05773502691896258*rho[3]*weight[6]+0.03333333333333333*weight[5]*rho[6]-0.05773502691896258*weight[3]*rho[6]+0.1*rho[5]*weight[5]-0.05773502691896258*rho[3]*weight[5]-0.05773502691896258*weight[3]*rho[5]+0.16666666666666669*rho[4]*weight[4]-0.09622504486493762*rho[2]*weight[4]-0.09622504486493762*rho[1]*weight[4]+0.05555555555555556*rho[0]*weight[4]-0.09622504486493762*weight[2]*rho[4]-0.09622504486493762*weight[1]*rho[4]+0.05555555555555556*weight[0]*rho[4]+0.1*rho[3]*weight[3]+0.16666666666666669*rho[2]*weight[2]+0.05555555555555556*rho[1]*weight[2]-0.09622504486493762*rho[0]*weight[2]+0.05555555555555556*weight[1]*rho[2]-0.09622504486493762*weight[0]*rho[2]+0.16666666666666669*rho[1]*weight[1]-0.09622504486493762*rho[0]*weight[1]-0.09622504486493762*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[9]],0.11904761904761905*rho[19]*weight[19]+0.06873217490352689*rho[16]*weight[19]-0.06873217490352689*rho[15]*weight[19]+0.03849001794597506*rho[12]*weight[19]-0.03849001794597506*rho[11]*weight[19]-0.03968253968253969*rho[9]*weight[19]+0.022222222222222223*rho[8]*weight[19]+0.022222222222222223*rho[7]*weight[19]-0.074535599249993*rho[4]*weight[19]-0.04303314829119352*rho[2]*weight[19]+0.04303314829119352*rho[1]*weight[19]+0.024845199749997667*rho[0]*weight[19]+0.06873217490352689*weight[16]*rho[19]-0.06873217490352689*weight[15]*rho[19]+0.03849001794597506*weight[12]*rho[19]-0.03849001794597506*weight[11]*rho[19]-0.03968253968253969*weight[9]*rho[19]+0.022222222222222223*weight[8]*rho[19]+0.022222222222222223*weight[7]*rho[19]-0.074535599249993*weight[4]*rho[19]-0.04303314829119352*weight[2]*rho[19]+0.04303314829119352*weight[1]*rho[19]+0.024845199749997667*weight[0]*rho[19]+0.1*rho[18]*weight[18]-0.02666666666666667*rho[17]*weight[18]+0.05773502691896258*rho[14]*weight[18]-0.051639777949432225*rho[10]*weight[18]-0.029814239699997195*rho[6]*weight[18]-0.02666666666666667*weight[17]*rho[18]+0.05773502691896258*weight[14]*rho[18]-0.051639777949432225*weight[10]*rho[18]-0.029814239699997195*weight[6]*rho[18]+0.1*rho[17]*weight[17]-0.05773502691896258*rho[13]*weight[17]+0.051639777949432225*rho[10]*weight[17]-0.029814239699997195*rho[5]*weight[17]-0.05773502691896258*weight[13]*rho[17]+0.051639777949432225*weight[10]*rho[17]-0.029814239699997195*weight[5]*rho[17]+0.11904761904761905*rho[16]*weight[16]-0.03968253968253969*rho[15]*weight[16]+0.022222222222222223*rho[12]*weight[16]-0.06873217490352689*rho[9]*weight[16]+0.03849001794597506*rho[8]*weight[16]-0.04303314829119353*rho[4]*weight[16]-0.07453559924999299*rho[2]*weight[16]+0.024845199749997663*rho[1]*weight[16]+0.04303314829119353*rho[0]*weight[16]-0.03968253968253969*weight[15]*rho[16]+0.022222222222222223*weight[12]*rho[16]-0.06873217490352689*weight[9]*rho[16]+0.03849001794597506*weight[8]*rho[16]-0.04303314829119353*weight[4]*rho[16]-0.07453559924999299*weight[2]*rho[16]+0.024845199749997663*weight[1]*rho[16]+0.04303314829119353*weight[0]*rho[16]+0.11904761904761905*rho[15]*weight[15]+0.022222222222222223*rho[11]*weight[15]+0.06873217490352689*rho[9]*weight[15]-0.03849001794597506*rho[7]*weight[15]+0.04303314829119353*rho[4]*weight[15]+0.024845199749997663*rho[2]*weight[15]-0.07453559924999299*rho[1]*weight[15]-0.04303314829119353*rho[0]*weight[15]+0.022222222222222223*weight[11]*rho[15]+0.06873217490352689*weight[9]*rho[15]-0.03849001794597506*weight[7]*rho[15]+0.04303314829119353*weight[4]*rho[15]+0.024845199749997663*weight[2]*rho[15]-0.07453559924999299*weight[1]*rho[15]-0.04303314829119353*weight[0]*rho[15]+0.1*rho[14]*weight[14]-0.029814239699997195*rho[10]*weight[14]-0.05163977794943223*rho[6]*weight[14]-0.029814239699997195*weight[10]*rho[14]-0.05163977794943223*weight[6]*rho[14]+0.1*rho[13]*weight[13]-0.029814239699997195*rho[10]*weight[13]+0.05163977794943223*rho[5]*weight[13]-0.029814239699997195*weight[10]*rho[13]+0.05163977794943223*weight[5]*rho[13]+0.16666666666666669*rho[12]*weight[12]-0.044444444444444446*rho[11]*weight[12]+0.09622504486493764*rho[8]*weight[12]-0.08606629658238706*rho[4]*weight[12]-0.049690399499995326*rho[2]*weight[12]-0.044444444444444446*weight[11]*rho[12]+0.09622504486493764*weight[8]*rho[12]-0.08606629658238706*weight[4]*rho[12]-0.049690399499995326*weight[2]*rho[12]+0.16666666666666669*rho[11]*weight[11]-0.09622504486493764*rho[7]*weight[11]+0.08606629658238706*rho[4]*weight[11]-0.049690399499995326*rho[1]*weight[11]-0.09622504486493764*weight[7]*rho[11]+0.08606629658238706*weight[4]*rho[11]-0.049690399499995326*weight[1]*rho[11]+0.1*rho[10]*weight[10]+0.05773502691896258*rho[6]*weight[10]-0.05773502691896258*rho[5]*weight[10]-0.03333333333333333*rho[3]*weight[10]+0.05773502691896258*weight[6]*rho[10]-0.05773502691896258*weight[5]*rho[10]-0.03333333333333333*weight[3]*rho[10]+0.11904761904761905*rho[9]*weight[9]+0.024845199749997667*rho[4]*weight[9]+0.04303314829119352*rho[2]*weight[9]-0.04303314829119352*rho[1]*weight[9]-0.074535599249993*rho[0]*weight[9]+0.024845199749997667*weight[4]*rho[9]+0.04303314829119352*weight[2]*rho[9]-0.04303314829119352*weight[1]*rho[9]-0.074535599249993*weight[0]*rho[9]+0.16666666666666669*rho[8]*weight[8]-0.04969039949999533*rho[4]*weight[8]-0.08606629658238704*rho[2]*weight[8]-0.04969039949999533*weight[4]*rho[8]-0.08606629658238704*weight[2]*rho[8]+0.16666666666666669*rho[7]*weight[7]-0.04969039949999533*rho[4]*weight[7]+0.08606629658238704*rho[1]*weight[7]-0.04969039949999533*weight[4]*rho[7]+0.08606629658238704*weight[1]*rho[7]+0.1*rho[6]*weight[6]-0.03333333333333333*rho[5]*weight[6]-0.05773502691896258*rho[3]*weight[6]-0.03333333333333333*weight[5]*rho[6]-0.05773502691896258*weight[3]*rho[6]+0.1*rho[5]*weight[5]+0.05773502691896258*rho[3]*weight[5]+0.05773502691896258*weight[3]*rho[5]+0.16666666666666669*rho[4]*weight[4]+0.09622504486493762*rho[2]*weight[4]-0.09622504486493762*rho[1]*weight[4]-0.05555555555555556*rho[0]*weight[4]+0.09622504486493762*weight[2]*rho[4]-0.09622504486493762*weight[1]*rho[4]-0.05555555555555556*weight[0]*rho[4]+0.1*rho[3]*weight[3]+0.16666666666666669*rho[2]*weight[2]-0.05555555555555556*rho[1]*weight[2]-0.09622504486493762*rho[0]*weight[2]-0.05555555555555556*weight[1]*rho[2]-0.09622504486493762*weight[0]*rho[2]+0.16666666666666669*rho[1]*weight[1]+0.09622504486493762*rho[0]*weight[1]+0.09622504486493762*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[9]] += 0.11904761904761905*rho[19]*weight[19]+0.06873217490352689*rho[16]*weight[19]-0.06873217490352689*rho[15]*weight[19]+0.03849001794597506*rho[12]*weight[19]-0.03849001794597506*rho[11]*weight[19]-0.03968253968253969*rho[9]*weight[19]+0.022222222222222223*rho[8]*weight[19]+0.022222222222222223*rho[7]*weight[19]-0.074535599249993*rho[4]*weight[19]-0.04303314829119352*rho[2]*weight[19]+0.04303314829119352*rho[1]*weight[19]+0.024845199749997667*rho[0]*weight[19]+0.06873217490352689*weight[16]*rho[19]-0.06873217490352689*weight[15]*rho[19]+0.03849001794597506*weight[12]*rho[19]-0.03849001794597506*weight[11]*rho[19]-0.03968253968253969*weight[9]*rho[19]+0.022222222222222223*weight[8]*rho[19]+0.022222222222222223*weight[7]*rho[19]-0.074535599249993*weight[4]*rho[19]-0.04303314829119352*weight[2]*rho[19]+0.04303314829119352*weight[1]*rho[19]+0.024845199749997667*weight[0]*rho[19]+0.1*rho[18]*weight[18]-0.02666666666666667*rho[17]*weight[18]+0.05773502691896258*rho[14]*weight[18]-0.051639777949432225*rho[10]*weight[18]-0.029814239699997195*rho[6]*weight[18]-0.02666666666666667*weight[17]*rho[18]+0.05773502691896258*weight[14]*rho[18]-0.051639777949432225*weight[10]*rho[18]-0.029814239699997195*weight[6]*rho[18]+0.1*rho[17]*weight[17]-0.05773502691896258*rho[13]*weight[17]+0.051639777949432225*rho[10]*weight[17]-0.029814239699997195*rho[5]*weight[17]-0.05773502691896258*weight[13]*rho[17]+0.051639777949432225*weight[10]*rho[17]-0.029814239699997195*weight[5]*rho[17]+0.11904761904761905*rho[16]*weight[16]-0.03968253968253969*rho[15]*weight[16]+0.022222222222222223*rho[12]*weight[16]-0.06873217490352689*rho[9]*weight[16]+0.03849001794597506*rho[8]*weight[16]-0.04303314829119353*rho[4]*weight[16]-0.07453559924999299*rho[2]*weight[16]+0.024845199749997663*rho[1]*weight[16]+0.04303314829119353*rho[0]*weight[16]-0.03968253968253969*weight[15]*rho[16]+0.022222222222222223*weight[12]*rho[16]-0.06873217490352689*weight[9]*rho[16]+0.03849001794597506*weight[8]*rho[16]-0.04303314829119353*weight[4]*rho[16]-0.07453559924999299*weight[2]*rho[16]+0.024845199749997663*weight[1]*rho[16]+0.04303314829119353*weight[0]*rho[16]+0.11904761904761905*rho[15]*weight[15]+0.022222222222222223*rho[11]*weight[15]+0.06873217490352689*rho[9]*weight[15]-0.03849001794597506*rho[7]*weight[15]+0.04303314829119353*rho[4]*weight[15]+0.024845199749997663*rho[2]*weight[15]-0.07453559924999299*rho[1]*weight[15]-0.04303314829119353*rho[0]*weight[15]+0.022222222222222223*weight[11]*rho[15]+0.06873217490352689*weight[9]*rho[15]-0.03849001794597506*weight[7]*rho[15]+0.04303314829119353*weight[4]*rho[15]+0.024845199749997663*weight[2]*rho[15]-0.07453559924999299*weight[1]*rho[15]-0.04303314829119353*weight[0]*rho[15]+0.1*rho[14]*weight[14]-0.029814239699997195*rho[10]*weight[14]-0.05163977794943223*rho[6]*weight[14]-0.029814239699997195*weight[10]*rho[14]-0.05163977794943223*weight[6]*rho[14]+0.1*rho[13]*weight[13]-0.029814239699997195*rho[10]*weight[13]+0.05163977794943223*rho[5]*weight[13]-0.029814239699997195*weight[10]*rho[13]+0.05163977794943223*weight[5]*rho[13]+0.16666666666666669*rho[12]*weight[12]-0.044444444444444446*rho[11]*weight[12]+0.09622504486493764*rho[8]*weight[12]-0.08606629658238706*rho[4]*weight[12]-0.049690399499995326*rho[2]*weight[12]-0.044444444444444446*weight[11]*rho[12]+0.09622504486493764*weight[8]*rho[12]-0.08606629658238706*weight[4]*rho[12]-0.049690399499995326*weight[2]*rho[12]+0.16666666666666669*rho[11]*weight[11]-0.09622504486493764*rho[7]*weight[11]+0.08606629658238706*rho[4]*weight[11]-0.049690399499995326*rho[1]*weight[11]-0.09622504486493764*weight[7]*rho[11]+0.08606629658238706*weight[4]*rho[11]-0.049690399499995326*weight[1]*rho[11]+0.1*rho[10]*weight[10]+0.05773502691896258*rho[6]*weight[10]-0.05773502691896258*rho[5]*weight[10]-0.03333333333333333*rho[3]*weight[10]+0.05773502691896258*weight[6]*rho[10]-0.05773502691896258*weight[5]*rho[10]-0.03333333333333333*weight[3]*rho[10]+0.11904761904761905*rho[9]*weight[9]+0.024845199749997667*rho[4]*weight[9]+0.04303314829119352*rho[2]*weight[9]-0.04303314829119352*rho[1]*weight[9]-0.074535599249993*rho[0]*weight[9]+0.024845199749997667*weight[4]*rho[9]+0.04303314829119352*weight[2]*rho[9]-0.04303314829119352*weight[1]*rho[9]-0.074535599249993*weight[0]*rho[9]+0.16666666666666669*rho[8]*weight[8]-0.04969039949999533*rho[4]*weight[8]-0.08606629658238704*rho[2]*weight[8]-0.04969039949999533*weight[4]*rho[8]-0.08606629658238704*weight[2]*rho[8]+0.16666666666666669*rho[7]*weight[7]-0.04969039949999533*rho[4]*weight[7]+0.08606629658238704*rho[1]*weight[7]-0.04969039949999533*weight[4]*rho[7]+0.08606629658238704*weight[1]*rho[7]+0.1*rho[6]*weight[6]-0.03333333333333333*rho[5]*weight[6]-0.05773502691896258*rho[3]*weight[6]-0.03333333333333333*weight[5]*rho[6]-0.05773502691896258*weight[3]*rho[6]+0.1*rho[5]*weight[5]+0.05773502691896258*rho[3]*weight[5]+0.05773502691896258*weight[3]*rho[5]+0.16666666666666669*rho[4]*weight[4]+0.09622504486493762*rho[2]*weight[4]-0.09622504486493762*rho[1]*weight[4]-0.05555555555555556*rho[0]*weight[4]+0.09622504486493762*weight[2]*rho[4]-0.09622504486493762*weight[1]*rho[4]-0.05555555555555556*weight[0]*rho[4]+0.1*rho[3]*weight[3]+0.16666666666666669*rho[2]*weight[2]-0.05555555555555556*rho[1]*weight[2]-0.09622504486493762*rho[0]*weight[2]-0.05555555555555556*weight[1]*rho[2]-0.09622504486493762*weight[0]*rho[2]+0.16666666666666669*rho[1]*weight[1]+0.09622504486493762*rho[0]*weight[1]+0.09622504486493762*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[10]],0.11904761904761905*rho[19]*weight[19]-0.06873217490352689*rho[16]*weight[19]+0.06873217490352689*rho[15]*weight[19]-0.03849001794597506*rho[12]*weight[19]+0.03849001794597506*rho[11]*weight[19]-0.03968253968253969*rho[9]*weight[19]+0.022222222222222223*rho[8]*weight[19]+0.022222222222222223*rho[7]*weight[19]-0.074535599249993*rho[4]*weight[19]+0.04303314829119352*rho[2]*weight[19]-0.04303314829119352*rho[1]*weight[19]+0.024845199749997667*rho[0]*weight[19]-0.06873217490352689*weight[16]*rho[19]+0.06873217490352689*weight[15]*rho[19]-0.03849001794597506*weight[12]*rho[19]+0.03849001794597506*weight[11]*rho[19]-0.03968253968253969*weight[9]*rho[19]+0.022222222222222223*weight[8]*rho[19]+0.022222222222222223*weight[7]*rho[19]-0.074535599249993*weight[4]*rho[19]+0.04303314829119352*weight[2]*rho[19]-0.04303314829119352*weight[1]*rho[19]+0.024845199749997667*weight[0]*rho[19]+0.1*rho[18]*weight[18]-0.02666666666666667*rho[17]*weight[18]-0.05773502691896258*rho[14]*weight[18]+0.051639777949432225*rho[10]*weight[18]-0.029814239699997195*rho[6]*weight[18]-0.02666666666666667*weight[17]*rho[18]-0.05773502691896258*weight[14]*rho[18]+0.051639777949432225*weight[10]*rho[18]-0.029814239699997195*weight[6]*rho[18]+0.1*rho[17]*weight[17]+0.05773502691896258*rho[13]*weight[17]-0.051639777949432225*rho[10]*weight[17]-0.029814239699997195*rho[5]*weight[17]+0.05773502691896258*weight[13]*rho[17]-0.051639777949432225*weight[10]*rho[17]-0.029814239699997195*weight[5]*rho[17]+0.11904761904761905*rho[16]*weight[16]-0.03968253968253969*rho[15]*weight[16]+0.022222222222222223*rho[12]*weight[16]+0.06873217490352689*rho[9]*weight[16]-0.03849001794597506*rho[8]*weight[16]+0.04303314829119353*rho[4]*weight[16]-0.07453559924999299*rho[2]*weight[16]+0.024845199749997663*rho[1]*weight[16]-0.04303314829119353*rho[0]*weight[16]-0.03968253968253969*weight[15]*rho[16]+0.022222222222222223*weight[12]*rho[16]+0.06873217490352689*weight[9]*rho[16]-0.03849001794597506*weight[8]*rho[16]+0.04303314829119353*weight[4]*rho[16]-0.07453559924999299*weight[2]*rho[16]+0.024845199749997663*weight[1]*rho[16]-0.04303314829119353*weight[0]*rho[16]+0.11904761904761905*rho[15]*weight[15]+0.022222222222222223*rho[11]*weight[15]-0.06873217490352689*rho[9]*weight[15]+0.03849001794597506*rho[7]*weight[15]-0.04303314829119353*rho[4]*weight[15]+0.024845199749997663*rho[2]*weight[15]-0.07453559924999299*rho[1]*weight[15]+0.04303314829119353*rho[0]*weight[15]+0.022222222222222223*weight[11]*rho[15]-0.06873217490352689*weight[9]*rho[15]+0.03849001794597506*weight[7]*rho[15]-0.04303314829119353*weight[4]*rho[15]+0.024845199749997663*weight[2]*rho[15]-0.07453559924999299*weight[1]*rho[15]+0.04303314829119353*weight[0]*rho[15]+0.1*rho[14]*weight[14]-0.029814239699997195*rho[10]*weight[14]+0.05163977794943223*rho[6]*weight[14]-0.029814239699997195*weight[10]*rho[14]+0.05163977794943223*weight[6]*rho[14]+0.1*rho[13]*weight[13]-0.029814239699997195*rho[10]*weight[13]-0.05163977794943223*rho[5]*weight[13]-0.029814239699997195*weight[10]*rho[13]-0.05163977794943223*weight[5]*rho[13]+0.16666666666666669*rho[12]*weight[12]-0.044444444444444446*rho[11]*weight[12]-0.09622504486493764*rho[8]*weight[12]+0.08606629658238706*rho[4]*weight[12]-0.049690399499995326*rho[2]*weight[12]-0.044444444444444446*weight[11]*rho[12]-0.09622504486493764*weight[8]*rho[12]+0.08606629658238706*weight[4]*rho[12]-0.049690399499995326*weight[2]*rho[12]+0.16666666666666669*rho[11]*weight[11]+0.09622504486493764*rho[7]*weight[11]-0.08606629658238706*rho[4]*weight[11]-0.049690399499995326*rho[1]*weight[11]+0.09622504486493764*weight[7]*rho[11]-0.08606629658238706*weight[4]*rho[11]-0.049690399499995326*weight[1]*rho[11]+0.1*rho[10]*weight[10]-0.05773502691896258*rho[6]*weight[10]+0.05773502691896258*rho[5]*weight[10]-0.03333333333333333*rho[3]*weight[10]-0.05773502691896258*weight[6]*rho[10]+0.05773502691896258*weight[5]*rho[10]-0.03333333333333333*weight[3]*rho[10]+0.11904761904761905*rho[9]*weight[9]+0.024845199749997667*rho[4]*weight[9]-0.04303314829119352*rho[2]*weight[9]+0.04303314829119352*rho[1]*weight[9]-0.074535599249993*rho[0]*weight[9]+0.024845199749997667*weight[4]*rho[9]-0.04303314829119352*weight[2]*rho[9]+0.04303314829119352*weight[1]*rho[9]-0.074535599249993*weight[0]*rho[9]+0.16666666666666669*rho[8]*weight[8]-0.04969039949999533*rho[4]*weight[8]+0.08606629658238704*rho[2]*weight[8]-0.04969039949999533*weight[4]*rho[8]+0.08606629658238704*weight[2]*rho[8]+0.16666666666666669*rho[7]*weight[7]-0.04969039949999533*rho[4]*weight[7]-0.08606629658238704*rho[1]*weight[7]-0.04969039949999533*weight[4]*rho[7]-0.08606629658238704*weight[1]*rho[7]+0.1*rho[6]*weight[6]-0.03333333333333333*rho[5]*weight[6]+0.05773502691896258*rho[3]*weight[6]-0.03333333333333333*weight[5]*rho[6]+0.05773502691896258*weight[3]*rho[6]+0.1*rho[5]*weight[5]-0.05773502691896258*rho[3]*weight[5]-0.05773502691896258*weight[3]*rho[5]+0.16666666666666669*rho[4]*weight[4]-0.09622504486493762*rho[2]*weight[4]+0.09622504486493762*rho[1]*weight[4]-0.05555555555555556*rho[0]*weight[4]-0.09622504486493762*weight[2]*rho[4]+0.09622504486493762*weight[1]*rho[4]-0.05555555555555556*weight[0]*rho[4]+0.1*rho[3]*weight[3]+0.16666666666666669*rho[2]*weight[2]-0.05555555555555556*rho[1]*weight[2]+0.09622504486493762*rho[0]*weight[2]-0.05555555555555556*weight[1]*rho[2]+0.09622504486493762*weight[0]*rho[2]+0.16666666666666669*rho[1]*weight[1]-0.09622504486493762*rho[0]*weight[1]-0.09622504486493762*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[10]] += 0.11904761904761905*rho[19]*weight[19]-0.06873217490352689*rho[16]*weight[19]+0.06873217490352689*rho[15]*weight[19]-0.03849001794597506*rho[12]*weight[19]+0.03849001794597506*rho[11]*weight[19]-0.03968253968253969*rho[9]*weight[19]+0.022222222222222223*rho[8]*weight[19]+0.022222222222222223*rho[7]*weight[19]-0.074535599249993*rho[4]*weight[19]+0.04303314829119352*rho[2]*weight[19]-0.04303314829119352*rho[1]*weight[19]+0.024845199749997667*rho[0]*weight[19]-0.06873217490352689*weight[16]*rho[19]+0.06873217490352689*weight[15]*rho[19]-0.03849001794597506*weight[12]*rho[19]+0.03849001794597506*weight[11]*rho[19]-0.03968253968253969*weight[9]*rho[19]+0.022222222222222223*weight[8]*rho[19]+0.022222222222222223*weight[7]*rho[19]-0.074535599249993*weight[4]*rho[19]+0.04303314829119352*weight[2]*rho[19]-0.04303314829119352*weight[1]*rho[19]+0.024845199749997667*weight[0]*rho[19]+0.1*rho[18]*weight[18]-0.02666666666666667*rho[17]*weight[18]-0.05773502691896258*rho[14]*weight[18]+0.051639777949432225*rho[10]*weight[18]-0.029814239699997195*rho[6]*weight[18]-0.02666666666666667*weight[17]*rho[18]-0.05773502691896258*weight[14]*rho[18]+0.051639777949432225*weight[10]*rho[18]-0.029814239699997195*weight[6]*rho[18]+0.1*rho[17]*weight[17]+0.05773502691896258*rho[13]*weight[17]-0.051639777949432225*rho[10]*weight[17]-0.029814239699997195*rho[5]*weight[17]+0.05773502691896258*weight[13]*rho[17]-0.051639777949432225*weight[10]*rho[17]-0.029814239699997195*weight[5]*rho[17]+0.11904761904761905*rho[16]*weight[16]-0.03968253968253969*rho[15]*weight[16]+0.022222222222222223*rho[12]*weight[16]+0.06873217490352689*rho[9]*weight[16]-0.03849001794597506*rho[8]*weight[16]+0.04303314829119353*rho[4]*weight[16]-0.07453559924999299*rho[2]*weight[16]+0.024845199749997663*rho[1]*weight[16]-0.04303314829119353*rho[0]*weight[16]-0.03968253968253969*weight[15]*rho[16]+0.022222222222222223*weight[12]*rho[16]+0.06873217490352689*weight[9]*rho[16]-0.03849001794597506*weight[8]*rho[16]+0.04303314829119353*weight[4]*rho[16]-0.07453559924999299*weight[2]*rho[16]+0.024845199749997663*weight[1]*rho[16]-0.04303314829119353*weight[0]*rho[16]+0.11904761904761905*rho[15]*weight[15]+0.022222222222222223*rho[11]*weight[15]-0.06873217490352689*rho[9]*weight[15]+0.03849001794597506*rho[7]*weight[15]-0.04303314829119353*rho[4]*weight[15]+0.024845199749997663*rho[2]*weight[15]-0.07453559924999299*rho[1]*weight[15]+0.04303314829119353*rho[0]*weight[15]+0.022222222222222223*weight[11]*rho[15]-0.06873217490352689*weight[9]*rho[15]+0.03849001794597506*weight[7]*rho[15]-0.04303314829119353*weight[4]*rho[15]+0.024845199749997663*weight[2]*rho[15]-0.07453559924999299*weight[1]*rho[15]+0.04303314829119353*weight[0]*rho[15]+0.1*rho[14]*weight[14]-0.029814239699997195*rho[10]*weight[14]+0.05163977794943223*rho[6]*weight[14]-0.029814239699997195*weight[10]*rho[14]+0.05163977794943223*weight[6]*rho[14]+0.1*rho[13]*weight[13]-0.029814239699997195*rho[10]*weight[13]-0.05163977794943223*rho[5]*weight[13]-0.029814239699997195*weight[10]*rho[13]-0.05163977794943223*weight[5]*rho[13]+0.16666666666666669*rho[12]*weight[12]-0.044444444444444446*rho[11]*weight[12]-0.09622504486493764*rho[8]*weight[12]+0.08606629658238706*rho[4]*weight[12]-0.049690399499995326*rho[2]*weight[12]-0.044444444444444446*weight[11]*rho[12]-0.09622504486493764*weight[8]*rho[12]+0.08606629658238706*weight[4]*rho[12]-0.049690399499995326*weight[2]*rho[12]+0.16666666666666669*rho[11]*weight[11]+0.09622504486493764*rho[7]*weight[11]-0.08606629658238706*rho[4]*weight[11]-0.049690399499995326*rho[1]*weight[11]+0.09622504486493764*weight[7]*rho[11]-0.08606629658238706*weight[4]*rho[11]-0.049690399499995326*weight[1]*rho[11]+0.1*rho[10]*weight[10]-0.05773502691896258*rho[6]*weight[10]+0.05773502691896258*rho[5]*weight[10]-0.03333333333333333*rho[3]*weight[10]-0.05773502691896258*weight[6]*rho[10]+0.05773502691896258*weight[5]*rho[10]-0.03333333333333333*weight[3]*rho[10]+0.11904761904761905*rho[9]*weight[9]+0.024845199749997667*rho[4]*weight[9]-0.04303314829119352*rho[2]*weight[9]+0.04303314829119352*rho[1]*weight[9]-0.074535599249993*rho[0]*weight[9]+0.024845199749997667*weight[4]*rho[9]-0.04303314829119352*weight[2]*rho[9]+0.04303314829119352*weight[1]*rho[9]-0.074535599249993*weight[0]*rho[9]+0.16666666666666669*rho[8]*weight[8]-0.04969039949999533*rho[4]*weight[8]+0.08606629658238704*rho[2]*weight[8]-0.04969039949999533*weight[4]*rho[8]+0.08606629658238704*weight[2]*rho[8]+0.16666666666666669*rho[7]*weight[7]-0.04969039949999533*rho[4]*weight[7]-0.08606629658238704*rho[1]*weight[7]-0.04969039949999533*weight[4]*rho[7]-0.08606629658238704*weight[1]*rho[7]+0.1*rho[6]*weight[6]-0.03333333333333333*rho[5]*weight[6]+0.05773502691896258*rho[3]*weight[6]-0.03333333333333333*weight[5]*rho[6]+0.05773502691896258*weight[3]*rho[6]+0.1*rho[5]*weight[5]-0.05773502691896258*rho[3]*weight[5]-0.05773502691896258*weight[3]*rho[5]+0.16666666666666669*rho[4]*weight[4]-0.09622504486493762*rho[2]*weight[4]+0.09622504486493762*rho[1]*weight[4]-0.05555555555555556*rho[0]*weight[4]-0.09622504486493762*weight[2]*rho[4]+0.09622504486493762*weight[1]*rho[4]-0.05555555555555556*weight[0]*rho[4]+0.1*rho[3]*weight[3]+0.16666666666666669*rho[2]*weight[2]-0.05555555555555556*rho[1]*weight[2]+0.09622504486493762*rho[0]*weight[2]-0.05555555555555556*weight[1]*rho[2]+0.09622504486493762*weight[0]*rho[2]+0.16666666666666669*rho[1]*weight[1]-0.09622504486493762*rho[0]*weight[1]-0.09622504486493762*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicAdd(&bsrc[nodeOff+globalIdxs[11]],0.11904761904761905*rho[19]*weight[19]+0.06873217490352689*rho[16]*weight[19]+0.06873217490352689*rho[15]*weight[19]-0.03849001794597506*rho[12]*weight[19]-0.03849001794597506*rho[11]*weight[19]+0.03968253968253969*rho[9]*weight[19]-0.022222222222222223*rho[8]*weight[19]-0.022222222222222223*rho[7]*weight[19]-0.074535599249993*rho[4]*weight[19]-0.04303314829119352*rho[2]*weight[19]-0.04303314829119352*rho[1]*weight[19]-0.024845199749997667*rho[0]*weight[19]+0.06873217490352689*weight[16]*rho[19]+0.06873217490352689*weight[15]*rho[19]-0.03849001794597506*weight[12]*rho[19]-0.03849001794597506*weight[11]*rho[19]+0.03968253968253969*weight[9]*rho[19]-0.022222222222222223*weight[8]*rho[19]-0.022222222222222223*weight[7]*rho[19]-0.074535599249993*weight[4]*rho[19]-0.04303314829119352*weight[2]*rho[19]-0.04303314829119352*weight[1]*rho[19]-0.024845199749997667*weight[0]*rho[19]+0.1*rho[18]*weight[18]+0.02666666666666667*rho[17]*weight[18]+0.05773502691896258*rho[14]*weight[18]+0.051639777949432225*rho[10]*weight[18]+0.029814239699997195*rho[6]*weight[18]+0.02666666666666667*weight[17]*rho[18]+0.05773502691896258*weight[14]*rho[18]+0.051639777949432225*weight[10]*rho[18]+0.029814239699997195*weight[6]*rho[18]+0.1*rho[17]*weight[17]+0.05773502691896258*rho[13]*weight[17]+0.051639777949432225*rho[10]*weight[17]+0.029814239699997195*rho[5]*weight[17]+0.05773502691896258*weight[13]*rho[17]+0.051639777949432225*weight[10]*rho[17]+0.029814239699997195*weight[5]*rho[17]+0.11904761904761905*rho[16]*weight[16]+0.03968253968253969*rho[15]*weight[16]-0.022222222222222223*rho[12]*weight[16]+0.06873217490352689*rho[9]*weight[16]-0.03849001794597506*rho[8]*weight[16]-0.04303314829119353*rho[4]*weight[16]-0.07453559924999299*rho[2]*weight[16]-0.024845199749997663*rho[1]*weight[16]-0.04303314829119353*rho[0]*weight[16]+0.03968253968253969*weight[15]*rho[16]-0.022222222222222223*weight[12]*rho[16]+0.06873217490352689*weight[9]*rho[16]-0.03849001794597506*weight[8]*rho[16]-0.04303314829119353*weight[4]*rho[16]-0.07453559924999299*weight[2]*rho[16]-0.024845199749997663*weight[1]*rho[16]-0.04303314829119353*weight[0]*rho[16]+0.11904761904761905*rho[15]*weight[15]-0.022222222222222223*rho[11]*weight[15]+0.06873217490352689*rho[9]*weight[15]-0.03849001794597506*rho[7]*weight[15]-0.04303314829119353*rho[4]*weight[15]-0.024845199749997663*rho[2]*weight[15]-0.07453559924999299*rho[1]*weight[15]-0.04303314829119353*rho[0]*weight[15]-0.022222222222222223*weight[11]*rho[15]+0.06873217490352689*weight[9]*rho[15]-0.03849001794597506*weight[7]*rho[15]-0.04303314829119353*weight[4]*rho[15]-0.024845199749997663*weight[2]*rho[15]-0.07453559924999299*weight[1]*rho[15]-0.04303314829119353*weight[0]*rho[15]+0.1*rho[14]*weight[14]+0.029814239699997195*rho[10]*weight[14]+0.05163977794943223*rho[6]*weight[14]+0.029814239699997195*weight[10]*rho[14]+0.05163977794943223*weight[6]*rho[14]+0.1*rho[13]*weight[13]+0.029814239699997195*rho[10]*weight[13]+0.05163977794943223*rho[5]*weight[13]+0.029814239699997195*weight[10]*rho[13]+0.05163977794943223*weight[5]*rho[13]+0.16666666666666669*rho[12]*weight[12]+0.044444444444444446*rho[11]*weight[12]+0.09622504486493764*rho[8]*weight[12]+0.08606629658238706*rho[4]*weight[12]+0.049690399499995326*rho[2]*weight[12]+0.044444444444444446*weight[11]*rho[12]+0.09622504486493764*weight[8]*rho[12]+0.08606629658238706*weight[4]*rho[12]+0.049690399499995326*weight[2]*rho[12]+0.16666666666666669*rho[11]*weight[11]+0.09622504486493764*rho[7]*weight[11]+0.08606629658238706*rho[4]*weight[11]+0.049690399499995326*rho[1]*weight[11]+0.09622504486493764*weight[7]*rho[11]+0.08606629658238706*weight[4]*rho[11]+0.049690399499995326*weight[1]*rho[11]+0.1*rho[10]*weight[10]+0.05773502691896258*rho[6]*weight[10]+0.05773502691896258*rho[5]*weight[10]+0.03333333333333333*rho[3]*weight[10]+0.05773502691896258*weight[6]*rho[10]+0.05773502691896258*weight[5]*rho[10]+0.03333333333333333*weight[3]*rho[10]+0.11904761904761905*rho[9]*weight[9]-0.024845199749997667*rho[4]*weight[9]-0.04303314829119352*rho[2]*weight[9]-0.04303314829119352*rho[1]*weight[9]-0.074535599249993*rho[0]*weight[9]-0.024845199749997667*weight[4]*rho[9]-0.04303314829119352*weight[2]*rho[9]-0.04303314829119352*weight[1]*rho[9]-0.074535599249993*weight[0]*rho[9]+0.16666666666666669*rho[8]*weight[8]+0.04969039949999533*rho[4]*weight[8]+0.08606629658238704*rho[2]*weight[8]+0.04969039949999533*weight[4]*rho[8]+0.08606629658238704*weight[2]*rho[8]+0.16666666666666669*rho[7]*weight[7]+0.04969039949999533*rho[4]*weight[7]+0.08606629658238704*rho[1]*weight[7]+0.04969039949999533*weight[4]*rho[7]+0.08606629658238704*weight[1]*rho[7]+0.1*rho[6]*weight[6]+0.03333333333333333*rho[5]*weight[6]+0.05773502691896258*rho[3]*weight[6]+0.03333333333333333*weight[5]*rho[6]+0.05773502691896258*weight[3]*rho[6]+0.1*rho[5]*weight[5]+0.05773502691896258*rho[3]*weight[5]+0.05773502691896258*weight[3]*rho[5]+0.16666666666666669*rho[4]*weight[4]+0.09622504486493762*rho[2]*weight[4]+0.09622504486493762*rho[1]*weight[4]+0.05555555555555556*rho[0]*weight[4]+0.09622504486493762*weight[2]*rho[4]+0.09622504486493762*weight[1]*rho[4]+0.05555555555555556*weight[0]*rho[4]+0.1*rho[3]*weight[3]+0.16666666666666669*rho[2]*weight[2]+0.05555555555555556*rho[1]*weight[2]+0.09622504486493762*rho[0]*weight[2]+0.05555555555555556*weight[1]*rho[2]+0.09622504486493762*weight[0]*rho[2]+0.16666666666666669*rho[1]*weight[1]+0.09622504486493762*rho[0]*weight[1]+0.09622504486493762*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]); + #else + bsrc[nodeOff+globalIdxs[11]] += 0.11904761904761905*rho[19]*weight[19]+0.06873217490352689*rho[16]*weight[19]+0.06873217490352689*rho[15]*weight[19]-0.03849001794597506*rho[12]*weight[19]-0.03849001794597506*rho[11]*weight[19]+0.03968253968253969*rho[9]*weight[19]-0.022222222222222223*rho[8]*weight[19]-0.022222222222222223*rho[7]*weight[19]-0.074535599249993*rho[4]*weight[19]-0.04303314829119352*rho[2]*weight[19]-0.04303314829119352*rho[1]*weight[19]-0.024845199749997667*rho[0]*weight[19]+0.06873217490352689*weight[16]*rho[19]+0.06873217490352689*weight[15]*rho[19]-0.03849001794597506*weight[12]*rho[19]-0.03849001794597506*weight[11]*rho[19]+0.03968253968253969*weight[9]*rho[19]-0.022222222222222223*weight[8]*rho[19]-0.022222222222222223*weight[7]*rho[19]-0.074535599249993*weight[4]*rho[19]-0.04303314829119352*weight[2]*rho[19]-0.04303314829119352*weight[1]*rho[19]-0.024845199749997667*weight[0]*rho[19]+0.1*rho[18]*weight[18]+0.02666666666666667*rho[17]*weight[18]+0.05773502691896258*rho[14]*weight[18]+0.051639777949432225*rho[10]*weight[18]+0.029814239699997195*rho[6]*weight[18]+0.02666666666666667*weight[17]*rho[18]+0.05773502691896258*weight[14]*rho[18]+0.051639777949432225*weight[10]*rho[18]+0.029814239699997195*weight[6]*rho[18]+0.1*rho[17]*weight[17]+0.05773502691896258*rho[13]*weight[17]+0.051639777949432225*rho[10]*weight[17]+0.029814239699997195*rho[5]*weight[17]+0.05773502691896258*weight[13]*rho[17]+0.051639777949432225*weight[10]*rho[17]+0.029814239699997195*weight[5]*rho[17]+0.11904761904761905*rho[16]*weight[16]+0.03968253968253969*rho[15]*weight[16]-0.022222222222222223*rho[12]*weight[16]+0.06873217490352689*rho[9]*weight[16]-0.03849001794597506*rho[8]*weight[16]-0.04303314829119353*rho[4]*weight[16]-0.07453559924999299*rho[2]*weight[16]-0.024845199749997663*rho[1]*weight[16]-0.04303314829119353*rho[0]*weight[16]+0.03968253968253969*weight[15]*rho[16]-0.022222222222222223*weight[12]*rho[16]+0.06873217490352689*weight[9]*rho[16]-0.03849001794597506*weight[8]*rho[16]-0.04303314829119353*weight[4]*rho[16]-0.07453559924999299*weight[2]*rho[16]-0.024845199749997663*weight[1]*rho[16]-0.04303314829119353*weight[0]*rho[16]+0.11904761904761905*rho[15]*weight[15]-0.022222222222222223*rho[11]*weight[15]+0.06873217490352689*rho[9]*weight[15]-0.03849001794597506*rho[7]*weight[15]-0.04303314829119353*rho[4]*weight[15]-0.024845199749997663*rho[2]*weight[15]-0.07453559924999299*rho[1]*weight[15]-0.04303314829119353*rho[0]*weight[15]-0.022222222222222223*weight[11]*rho[15]+0.06873217490352689*weight[9]*rho[15]-0.03849001794597506*weight[7]*rho[15]-0.04303314829119353*weight[4]*rho[15]-0.024845199749997663*weight[2]*rho[15]-0.07453559924999299*weight[1]*rho[15]-0.04303314829119353*weight[0]*rho[15]+0.1*rho[14]*weight[14]+0.029814239699997195*rho[10]*weight[14]+0.05163977794943223*rho[6]*weight[14]+0.029814239699997195*weight[10]*rho[14]+0.05163977794943223*weight[6]*rho[14]+0.1*rho[13]*weight[13]+0.029814239699997195*rho[10]*weight[13]+0.05163977794943223*rho[5]*weight[13]+0.029814239699997195*weight[10]*rho[13]+0.05163977794943223*weight[5]*rho[13]+0.16666666666666669*rho[12]*weight[12]+0.044444444444444446*rho[11]*weight[12]+0.09622504486493764*rho[8]*weight[12]+0.08606629658238706*rho[4]*weight[12]+0.049690399499995326*rho[2]*weight[12]+0.044444444444444446*weight[11]*rho[12]+0.09622504486493764*weight[8]*rho[12]+0.08606629658238706*weight[4]*rho[12]+0.049690399499995326*weight[2]*rho[12]+0.16666666666666669*rho[11]*weight[11]+0.09622504486493764*rho[7]*weight[11]+0.08606629658238706*rho[4]*weight[11]+0.049690399499995326*rho[1]*weight[11]+0.09622504486493764*weight[7]*rho[11]+0.08606629658238706*weight[4]*rho[11]+0.049690399499995326*weight[1]*rho[11]+0.1*rho[10]*weight[10]+0.05773502691896258*rho[6]*weight[10]+0.05773502691896258*rho[5]*weight[10]+0.03333333333333333*rho[3]*weight[10]+0.05773502691896258*weight[6]*rho[10]+0.05773502691896258*weight[5]*rho[10]+0.03333333333333333*weight[3]*rho[10]+0.11904761904761905*rho[9]*weight[9]-0.024845199749997667*rho[4]*weight[9]-0.04303314829119352*rho[2]*weight[9]-0.04303314829119352*rho[1]*weight[9]-0.074535599249993*rho[0]*weight[9]-0.024845199749997667*weight[4]*rho[9]-0.04303314829119352*weight[2]*rho[9]-0.04303314829119352*weight[1]*rho[9]-0.074535599249993*weight[0]*rho[9]+0.16666666666666669*rho[8]*weight[8]+0.04969039949999533*rho[4]*weight[8]+0.08606629658238704*rho[2]*weight[8]+0.04969039949999533*weight[4]*rho[8]+0.08606629658238704*weight[2]*rho[8]+0.16666666666666669*rho[7]*weight[7]+0.04969039949999533*rho[4]*weight[7]+0.08606629658238704*rho[1]*weight[7]+0.04969039949999533*weight[4]*rho[7]+0.08606629658238704*weight[1]*rho[7]+0.1*rho[6]*weight[6]+0.03333333333333333*rho[5]*weight[6]+0.05773502691896258*rho[3]*weight[6]+0.03333333333333333*weight[5]*rho[6]+0.05773502691896258*weight[3]*rho[6]+0.1*rho[5]*weight[5]+0.05773502691896258*rho[3]*weight[5]+0.05773502691896258*weight[3]*rho[5]+0.16666666666666669*rho[4]*weight[4]+0.09622504486493762*rho[2]*weight[4]+0.09622504486493762*rho[1]*weight[4]+0.05555555555555556*rho[0]*weight[4]+0.09622504486493762*weight[2]*rho[4]+0.09622504486493762*weight[1]*rho[4]+0.05555555555555556*weight[0]*rho[4]+0.1*rho[3]*weight[3]+0.16666666666666669*rho[2]*weight[2]+0.05555555555555556*rho[1]*weight[2]+0.09622504486493762*rho[0]*weight[2]+0.05555555555555556*weight[1]*rho[2]+0.09622504486493762*weight[0]*rho[2]+0.16666666666666669*rho[1]*weight[1]+0.09622504486493762*rho[0]*weight[1]+0.09622504486493762*weight[0]*rho[1]+0.16666666666666669*rho[0]*weight[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[12]],__double_as_longlong(2.3717082451262845*phiBC[19]+2.3717082451262845*phiBC[18]+2.3717082451262845*phiBC[17]-1.3693063937629155*phiBC[16]-1.3693063937629155*phiBC[15]-1.3693063937629155*phiBC[14]-1.3693063937629155*phiBC[13]-1.3693063937629155*phiBC[12]-1.3693063937629155*phiBC[11]-1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]+1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); + #else + bsrc[nodeOff+globalIdxs[12]] = 2.3717082451262845*phiBC[19]+2.3717082451262845*phiBC[18]+2.3717082451262845*phiBC[17]-1.3693063937629155*phiBC[16]-1.3693063937629155*phiBC[15]-1.3693063937629155*phiBC[14]-1.3693063937629155*phiBC[13]-1.3693063937629155*phiBC[12]-1.3693063937629155*phiBC[11]-1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]+1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[13]],__double_as_longlong(-(1.1858541225631423*phiBC[17])-1.3693063937629155*phiBC[16]-1.3693063937629155*phiBC[14]+0.6846531968814578*phiBC[13]+0.6846531968814578*phiBC[11]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]-0.39528470752104744*phiBC[7]+1.0606601717798214*phiBC[6]-0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]+0.3535533905932738*phiBC[0])); + #else + bsrc[nodeOff+globalIdxs[13]] = -(1.1858541225631423*phiBC[17])-1.3693063937629155*phiBC[16]-1.3693063937629155*phiBC[14]+0.6846531968814578*phiBC[13]+0.6846531968814578*phiBC[11]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]-0.39528470752104744*phiBC[7]+1.0606601717798214*phiBC[6]-0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]+0.3535533905932738*phiBC[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[14]],__double_as_longlong(-(2.3717082451262845*phiBC[19])-2.3717082451262845*phiBC[18]+2.3717082451262845*phiBC[17]-1.3693063937629155*phiBC[16]+1.3693063937629155*phiBC[15]-1.3693063937629155*phiBC[14]-1.3693063937629155*phiBC[13]+1.3693063937629155*phiBC[12]-1.3693063937629155*phiBC[11]+1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]+1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); + #else + bsrc[nodeOff+globalIdxs[14]] = -(2.3717082451262845*phiBC[19])-2.3717082451262845*phiBC[18]+2.3717082451262845*phiBC[17]-1.3693063937629155*phiBC[16]+1.3693063937629155*phiBC[15]-1.3693063937629155*phiBC[14]-1.3693063937629155*phiBC[13]+1.3693063937629155*phiBC[12]-1.3693063937629155*phiBC[11]+1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]+1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[15]],__double_as_longlong(-(1.1858541225631423*phiBC[18])-1.3693063937629155*phiBC[15]+0.6846531968814578*phiBC[14]-1.3693063937629155*phiBC[13]+0.6846531968814578*phiBC[12]+0.7905694150420949*phiBC[9]-0.39528470752104744*phiBC[8]+0.7905694150420949*phiBC[7]+1.0606601717798214*phiBC[5]-0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); + #else + bsrc[nodeOff+globalIdxs[15]] = -(1.1858541225631423*phiBC[18])-1.3693063937629155*phiBC[15]+0.6846531968814578*phiBC[14]-1.3693063937629155*phiBC[13]+0.6846531968814578*phiBC[12]+0.7905694150420949*phiBC[9]-0.39528470752104744*phiBC[8]+0.7905694150420949*phiBC[7]+1.0606601717798214*phiBC[5]-0.6123724356957946*phiBC[3]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[16]],__double_as_longlong(1.1858541225631423*phiBC[18]+1.3693063937629155*phiBC[15]+0.6846531968814578*phiBC[14]-1.3693063937629155*phiBC[13]-0.6846531968814578*phiBC[12]+0.7905694150420949*phiBC[9]-0.39528470752104744*phiBC[8]+0.7905694150420949*phiBC[7]-1.0606601717798214*phiBC[5]-0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); + #else + bsrc[nodeOff+globalIdxs[16]] = 1.1858541225631423*phiBC[18]+1.3693063937629155*phiBC[15]+0.6846531968814578*phiBC[14]-1.3693063937629155*phiBC[13]-0.6846531968814578*phiBC[12]+0.7905694150420949*phiBC[9]-0.39528470752104744*phiBC[8]+0.7905694150420949*phiBC[7]-1.0606601717798214*phiBC[5]-0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[17]],__double_as_longlong(-(2.3717082451262845*phiBC[19])+2.3717082451262845*phiBC[18]-2.3717082451262845*phiBC[17]+1.3693063937629155*phiBC[16]-1.3693063937629155*phiBC[15]-1.3693063937629155*phiBC[14]-1.3693063937629155*phiBC[13]-1.3693063937629155*phiBC[12]+1.3693063937629155*phiBC[11]+1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]-1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); + #else + bsrc[nodeOff+globalIdxs[17]] = -(2.3717082451262845*phiBC[19])+2.3717082451262845*phiBC[18]-2.3717082451262845*phiBC[17]+1.3693063937629155*phiBC[16]-1.3693063937629155*phiBC[15]-1.3693063937629155*phiBC[14]-1.3693063937629155*phiBC[13]-1.3693063937629155*phiBC[12]+1.3693063937629155*phiBC[11]+1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]-1.0606601717798214*phiBC[6]+1.0606601717798214*phiBC[5]-1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]-0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[18]],__double_as_longlong(1.1858541225631423*phiBC[17]+1.3693063937629155*phiBC[16]-1.3693063937629155*phiBC[14]+0.6846531968814578*phiBC[13]-0.6846531968814578*phiBC[11]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]-0.39528470752104744*phiBC[7]-1.0606601717798214*phiBC[6]-0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]+0.3535533905932738*phiBC[0])); + #else + bsrc[nodeOff+globalIdxs[18]] = 1.1858541225631423*phiBC[17]+1.3693063937629155*phiBC[16]-1.3693063937629155*phiBC[14]+0.6846531968814578*phiBC[13]-0.6846531968814578*phiBC[11]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]-0.39528470752104744*phiBC[7]-1.0606601717798214*phiBC[6]-0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]+0.3535533905932738*phiBC[0]; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[nodeOff+globalIdxs[19]],__double_as_longlong(2.3717082451262845*phiBC[19]-2.3717082451262845*phiBC[18]-2.3717082451262845*phiBC[17]+1.3693063937629155*phiBC[16]+1.3693063937629155*phiBC[15]-1.3693063937629155*phiBC[14]-1.3693063937629155*phiBC[13]+1.3693063937629155*phiBC[12]+1.3693063937629155*phiBC[11]-1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]-1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0])); + #else + bsrc[nodeOff+globalIdxs[19]] = 2.3717082451262845*phiBC[19]-2.3717082451262845*phiBC[18]-2.3717082451262845*phiBC[17]+1.3693063937629155*phiBC[16]+1.3693063937629155*phiBC[15]-1.3693063937629155*phiBC[14]-1.3693063937629155*phiBC[13]+1.3693063937629155*phiBC[12]+1.3693063937629155*phiBC[11]-1.8371173070873836*phiBC[10]+0.7905694150420949*phiBC[9]+0.7905694150420949*phiBC[8]+0.7905694150420949*phiBC[7]-1.0606601717798214*phiBC[6]-1.0606601717798214*phiBC[5]+1.0606601717798214*phiBC[4]-0.6123724356957946*phiBC[3]+0.6123724356957946*phiBC[2]+0.6123724356957946*phiBC[1]+0.3535533905932738*phiBC[0]; + #endif + +} + +GKYL_CU_DH void fem_parproj_src_stencil_weighted_3x_ser_p1_upz_dirichlet_skinz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) { // rho: right side source. // weight: Weight in the projection operation. - // phiBC: Dirichlet boundary potential, given as a DG expansion in the ghost cell (volume). + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. // nodeOff: node offset (prob idx * global number of nodes). // globalIdxs: global linear index of each basis function/node in current cell. // bsrc: global right side source vector. @@ -2858,11 +4046,11 @@ GKYL_CU_DH void fem_parproj_src_stencil_weighted_3x_ser_p1_upz_dirichletz(const } -GKYL_CU_DH void fem_parproj_src_stencil_weighted_3x_ser_p2_upz_dirichletz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) +GKYL_CU_DH void fem_parproj_src_stencil_weighted_3x_ser_p2_upz_dirichlet_skinz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc) { // rho: right side source. // weight: Weight in the projection operation. - // phiBC: Dirichlet boundary potential, given as a DG expansion in the ghost cell (volume). + // phiBC: Dirichlet boundary potential, given as a DG (volume) expansion in the skin cell. // nodeOff: node offset (prob idx * global number of nodes). // globalIdxs: global linear index of each basis function/node in current cell. // bsrc: global right side source vector. diff --git a/gyrokinetic/ker/fem_parproj/gkyl_fem_parproj_kernels.h b/gyrokinetic/ker/fem_parproj/gkyl_fem_parproj_kernels.h index 1a98266fa9..d058ec5a98 100644 --- a/gyrokinetic/ker/fem_parproj/gkyl_fem_parproj_kernels.h +++ b/gyrokinetic/ker/fem_parproj/gkyl_fem_parproj_kernels.h @@ -35,14 +35,18 @@ void fem_parproj_lhs_stencil_weighted_1x_ser_p1_upx_dirichletx(const double *wei GKYL_CU_DH void fem_parproj_src_stencil_noweight_1x_ser_p1_inx_nondirichletx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); GKYL_CU_DH void fem_parproj_src_stencil_noweight_1x_ser_p1_lox_nondirichletx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); -GKYL_CU_DH void fem_parproj_src_stencil_noweight_1x_ser_p1_lox_dirichletx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_noweight_1x_ser_p1_lox_dirichlet_ghostx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_noweight_1x_ser_p1_lox_dirichlet_skinx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); GKYL_CU_DH void fem_parproj_src_stencil_noweight_1x_ser_p1_upx_nondirichletx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); -GKYL_CU_DH void fem_parproj_src_stencil_noweight_1x_ser_p1_upx_dirichletx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_noweight_1x_ser_p1_upx_dirichlet_ghostx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_noweight_1x_ser_p1_upx_dirichlet_skinx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); GKYL_CU_DH void fem_parproj_src_stencil_weighted_1x_ser_p1_inx_nondirichletx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); GKYL_CU_DH void fem_parproj_src_stencil_weighted_1x_ser_p1_lox_nondirichletx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); -GKYL_CU_DH void fem_parproj_src_stencil_weighted_1x_ser_p1_lox_dirichletx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_weighted_1x_ser_p1_lox_dirichlet_ghostx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_weighted_1x_ser_p1_lox_dirichlet_skinx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); GKYL_CU_DH void fem_parproj_src_stencil_weighted_1x_ser_p1_upx_nondirichletx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); -GKYL_CU_DH void fem_parproj_src_stencil_weighted_1x_ser_p1_upx_dirichletx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_weighted_1x_ser_p1_upx_dirichlet_ghostx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_weighted_1x_ser_p1_upx_dirichlet_skinx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); GKYL_CU_DH void fem_parproj_sol_stencil_1x_ser_p1(const double *sol_nodal_global, long nodeOff, const long *globalIdxs, double *sol_modal_local); @@ -67,14 +71,18 @@ void fem_parproj_lhs_stencil_weighted_1x_ser_p2_upx_dirichletx(const double *wei GKYL_CU_DH void fem_parproj_src_stencil_noweight_1x_ser_p2_inx_nondirichletx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); GKYL_CU_DH void fem_parproj_src_stencil_noweight_1x_ser_p2_lox_nondirichletx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); -GKYL_CU_DH void fem_parproj_src_stencil_noweight_1x_ser_p2_lox_dirichletx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_noweight_1x_ser_p2_lox_dirichlet_ghostx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_noweight_1x_ser_p2_lox_dirichlet_skinx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); GKYL_CU_DH void fem_parproj_src_stencil_noweight_1x_ser_p2_upx_nondirichletx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); -GKYL_CU_DH void fem_parproj_src_stencil_noweight_1x_ser_p2_upx_dirichletx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_noweight_1x_ser_p2_upx_dirichlet_ghostx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_noweight_1x_ser_p2_upx_dirichlet_skinx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); GKYL_CU_DH void fem_parproj_src_stencil_weighted_1x_ser_p2_inx_nondirichletx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); GKYL_CU_DH void fem_parproj_src_stencil_weighted_1x_ser_p2_lox_nondirichletx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); -GKYL_CU_DH void fem_parproj_src_stencil_weighted_1x_ser_p2_lox_dirichletx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_weighted_1x_ser_p2_lox_dirichlet_ghostx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_weighted_1x_ser_p2_lox_dirichlet_skinx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); GKYL_CU_DH void fem_parproj_src_stencil_weighted_1x_ser_p2_upx_nondirichletx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); -GKYL_CU_DH void fem_parproj_src_stencil_weighted_1x_ser_p2_upx_dirichletx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_weighted_1x_ser_p2_upx_dirichlet_ghostx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_weighted_1x_ser_p2_upx_dirichlet_skinx(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); GKYL_CU_DH void fem_parproj_sol_stencil_1x_ser_p2(const double *sol_nodal_global, long nodeOff, const long *globalIdxs, double *sol_modal_local); @@ -101,17 +109,23 @@ void fem_parproj_lhs_stencil_weighted_2x_ser_p1_upy_nondirichlety(const double * void fem_parproj_lhs_stencil_weighted_2x_ser_p1_upy_dirichlety(const double *weight, const long *globalIdxs, struct gkyl_mat_triples *tri); GKYL_CU_DH void fem_parproj_src_stencil_noweight_2x_ser_p1_iny_nondirichlety(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); -GKYL_CU_DH void fem_parproj_src_stencil_noweight_2x_ser_p1_iny_dirichlety(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_noweight_2x_ser_p1_iny_dirichlet_ghosty(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_noweight_2x_ser_p1_iny_dirichlet_skiny(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); GKYL_CU_DH void fem_parproj_src_stencil_noweight_2x_ser_p1_loy_nondirichlety(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); -GKYL_CU_DH void fem_parproj_src_stencil_noweight_2x_ser_p1_loy_dirichlety(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_noweight_2x_ser_p1_loy_dirichlet_ghosty(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_noweight_2x_ser_p1_loy_dirichlet_skiny(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); GKYL_CU_DH void fem_parproj_src_stencil_noweight_2x_ser_p1_upy_nondirichlety(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); -GKYL_CU_DH void fem_parproj_src_stencil_noweight_2x_ser_p1_upy_dirichlety(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_noweight_2x_ser_p1_upy_dirichlet_ghosty(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_noweight_2x_ser_p1_upy_dirichlet_skiny(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); GKYL_CU_DH void fem_parproj_src_stencil_weighted_2x_ser_p1_iny_nondirichlety(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); -GKYL_CU_DH void fem_parproj_src_stencil_weighted_2x_ser_p1_iny_dirichlety(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_weighted_2x_ser_p1_iny_dirichlet_ghosty(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_weighted_2x_ser_p1_iny_dirichlet_skiny(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); GKYL_CU_DH void fem_parproj_src_stencil_weighted_2x_ser_p1_loy_nondirichlety(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); -GKYL_CU_DH void fem_parproj_src_stencil_weighted_2x_ser_p1_loy_dirichlety(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_weighted_2x_ser_p1_loy_dirichlet_ghosty(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_weighted_2x_ser_p1_loy_dirichlet_skiny(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); GKYL_CU_DH void fem_parproj_src_stencil_weighted_2x_ser_p1_upy_nondirichlety(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); -GKYL_CU_DH void fem_parproj_src_stencil_weighted_2x_ser_p1_upy_dirichlety(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_weighted_2x_ser_p1_upy_dirichlet_ghosty(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_weighted_2x_ser_p1_upy_dirichlet_skiny(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); GKYL_CU_DH void fem_parproj_sol_stencil_2x_ser_p1(const double *sol_nodal_global, long nodeOff, const long *globalIdxs, double *sol_modal_local); @@ -137,17 +151,23 @@ void fem_parproj_lhs_stencil_weighted_2x_ser_p2_upy_nondirichlety(const double * void fem_parproj_lhs_stencil_weighted_2x_ser_p2_upy_dirichlety(const double *weight, const long *globalIdxs, struct gkyl_mat_triples *tri); GKYL_CU_DH void fem_parproj_src_stencil_noweight_2x_ser_p2_iny_nondirichlety(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); -GKYL_CU_DH void fem_parproj_src_stencil_noweight_2x_ser_p2_iny_dirichlety(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_noweight_2x_ser_p2_iny_dirichlet_ghosty(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_noweight_2x_ser_p2_iny_dirichlet_skiny(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); GKYL_CU_DH void fem_parproj_src_stencil_noweight_2x_ser_p2_loy_nondirichlety(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); -GKYL_CU_DH void fem_parproj_src_stencil_noweight_2x_ser_p2_loy_dirichlety(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_noweight_2x_ser_p2_loy_dirichlet_ghosty(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_noweight_2x_ser_p2_loy_dirichlet_skiny(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); GKYL_CU_DH void fem_parproj_src_stencil_noweight_2x_ser_p2_upy_nondirichlety(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); -GKYL_CU_DH void fem_parproj_src_stencil_noweight_2x_ser_p2_upy_dirichlety(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_noweight_2x_ser_p2_upy_dirichlet_ghosty(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_noweight_2x_ser_p2_upy_dirichlet_skiny(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); GKYL_CU_DH void fem_parproj_src_stencil_weighted_2x_ser_p2_iny_nondirichlety(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); -GKYL_CU_DH void fem_parproj_src_stencil_weighted_2x_ser_p2_iny_dirichlety(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_weighted_2x_ser_p2_iny_dirichlet_ghosty(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_weighted_2x_ser_p2_iny_dirichlet_skiny(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); GKYL_CU_DH void fem_parproj_src_stencil_weighted_2x_ser_p2_loy_nondirichlety(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); -GKYL_CU_DH void fem_parproj_src_stencil_weighted_2x_ser_p2_loy_dirichlety(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_weighted_2x_ser_p2_loy_dirichlet_ghosty(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_weighted_2x_ser_p2_loy_dirichlet_skiny(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); GKYL_CU_DH void fem_parproj_src_stencil_weighted_2x_ser_p2_upy_nondirichlety(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); -GKYL_CU_DH void fem_parproj_src_stencil_weighted_2x_ser_p2_upy_dirichlety(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_weighted_2x_ser_p2_upy_dirichlet_ghosty(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_weighted_2x_ser_p2_upy_dirichlet_skiny(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); GKYL_CU_DH void fem_parproj_sol_stencil_2x_ser_p2(const double *sol_nodal_global, long nodeOff, const long *globalIdxs, double *sol_modal_local); @@ -174,17 +194,23 @@ void fem_parproj_lhs_stencil_weighted_3x_ser_p1_upz_nondirichletz(const double * void fem_parproj_lhs_stencil_weighted_3x_ser_p1_upz_dirichletz(const double *weight, const long *globalIdxs, struct gkyl_mat_triples *tri); GKYL_CU_DH void fem_parproj_src_stencil_noweight_3x_ser_p1_inz_nondirichletz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); -GKYL_CU_DH void fem_parproj_src_stencil_noweight_3x_ser_p1_inz_dirichletz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_noweight_3x_ser_p1_inz_dirichlet_ghostz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_noweight_3x_ser_p1_inz_dirichlet_skinz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); GKYL_CU_DH void fem_parproj_src_stencil_noweight_3x_ser_p1_loz_nondirichletz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); -GKYL_CU_DH void fem_parproj_src_stencil_noweight_3x_ser_p1_loz_dirichletz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_noweight_3x_ser_p1_loz_dirichlet_ghostz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_noweight_3x_ser_p1_loz_dirichlet_skinz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); GKYL_CU_DH void fem_parproj_src_stencil_noweight_3x_ser_p1_upz_nondirichletz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); -GKYL_CU_DH void fem_parproj_src_stencil_noweight_3x_ser_p1_upz_dirichletz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_noweight_3x_ser_p1_upz_dirichlet_ghostz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_noweight_3x_ser_p1_upz_dirichlet_skinz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); GKYL_CU_DH void fem_parproj_src_stencil_weighted_3x_ser_p1_inz_nondirichletz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); -GKYL_CU_DH void fem_parproj_src_stencil_weighted_3x_ser_p1_inz_dirichletz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_weighted_3x_ser_p1_inz_dirichlet_ghostz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_weighted_3x_ser_p1_inz_dirichlet_skinz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); GKYL_CU_DH void fem_parproj_src_stencil_weighted_3x_ser_p1_loz_nondirichletz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); -GKYL_CU_DH void fem_parproj_src_stencil_weighted_3x_ser_p1_loz_dirichletz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_weighted_3x_ser_p1_loz_dirichlet_ghostz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_weighted_3x_ser_p1_loz_dirichlet_skinz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); GKYL_CU_DH void fem_parproj_src_stencil_weighted_3x_ser_p1_upz_nondirichletz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); -GKYL_CU_DH void fem_parproj_src_stencil_weighted_3x_ser_p1_upz_dirichletz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_weighted_3x_ser_p1_upz_dirichlet_ghostz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_weighted_3x_ser_p1_upz_dirichlet_skinz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); GKYL_CU_DH void fem_parproj_sol_stencil_3x_ser_p1(const double *sol_nodal_global, long nodeOff, const long *globalIdxs, double *sol_modal_local); @@ -210,17 +236,23 @@ void fem_parproj_lhs_stencil_weighted_3x_ser_p2_upz_nondirichletz(const double * void fem_parproj_lhs_stencil_weighted_3x_ser_p2_upz_dirichletz(const double *weight, const long *globalIdxs, struct gkyl_mat_triples *tri); GKYL_CU_DH void fem_parproj_src_stencil_noweight_3x_ser_p2_inz_nondirichletz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); -GKYL_CU_DH void fem_parproj_src_stencil_noweight_3x_ser_p2_inz_dirichletz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_noweight_3x_ser_p2_inz_dirichlet_ghostz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_noweight_3x_ser_p2_inz_dirichlet_skinz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); GKYL_CU_DH void fem_parproj_src_stencil_noweight_3x_ser_p2_loz_nondirichletz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); -GKYL_CU_DH void fem_parproj_src_stencil_noweight_3x_ser_p2_loz_dirichletz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_noweight_3x_ser_p2_loz_dirichlet_ghostz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_noweight_3x_ser_p2_loz_dirichlet_skinz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); GKYL_CU_DH void fem_parproj_src_stencil_noweight_3x_ser_p2_upz_nondirichletz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); -GKYL_CU_DH void fem_parproj_src_stencil_noweight_3x_ser_p2_upz_dirichletz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_noweight_3x_ser_p2_upz_dirichlet_ghostz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_noweight_3x_ser_p2_upz_dirichlet_skinz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); GKYL_CU_DH void fem_parproj_src_stencil_weighted_3x_ser_p2_inz_nondirichletz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); -GKYL_CU_DH void fem_parproj_src_stencil_weighted_3x_ser_p2_inz_dirichletz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_weighted_3x_ser_p2_inz_dirichlet_ghostz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_weighted_3x_ser_p2_inz_dirichlet_skinz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); GKYL_CU_DH void fem_parproj_src_stencil_weighted_3x_ser_p2_loz_nondirichletz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); -GKYL_CU_DH void fem_parproj_src_stencil_weighted_3x_ser_p2_loz_dirichletz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_weighted_3x_ser_p2_loz_dirichlet_ghostz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_weighted_3x_ser_p2_loz_dirichlet_skinz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); GKYL_CU_DH void fem_parproj_src_stencil_weighted_3x_ser_p2_upz_nondirichletz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); -GKYL_CU_DH void fem_parproj_src_stencil_weighted_3x_ser_p2_upz_dirichletz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_weighted_3x_ser_p2_upz_dirichlet_ghostz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_parproj_src_stencil_weighted_3x_ser_p2_upz_dirichlet_skinz(const double *weight, const double *rho, const double *phiBC, long nodeOff, const long *globalIdxs, double *bsrc); GKYL_CU_DH void fem_parproj_sol_stencil_3x_ser_p2(const double *sol_nodal_global, long nodeOff, const long *globalIdxs, double *sol_modal_local); diff --git a/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_bias_lhs_inx_2x_ser.c b/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_bias_lhs_inx_2x_ser.c new file mode 100644 index 0000000000..d3a5dfaff3 --- /dev/null +++ b/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_bias_lhs_inx_2x_ser.c @@ -0,0 +1,39 @@ +#include + +void fem_poisson_perp_bias_line_lhs_2x_ser_p1_inx(const int *edge, const int *perp_dir, const long *globalIdxs, gkyl_mat_triples *tri) +{ + // edge: -1/+1 for lower or upper edge of the cell in each perp_dir. + // perp_dirs: directions perpendicular to the biased line. + // globalIdxs: global linear index of each basis function/node in current cell. + // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + + if (edge[0] == -1 && edge[1] == -1) { + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[0], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[3], 0.0); + } + + if (edge[0] == -1 && edge[1] == 1) { + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[2], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[3], 0.0); + } + + if (edge[0] == 1 && edge[1] == -1) { + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[1], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[3], 0.0); + } + + if (edge[0] == 1 && edge[1] == 1) { + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[3], 1.0); + } + +} + diff --git a/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_bias_lhs_inx_iny_3x_ser.c b/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_bias_lhs_inx_iny_3x_ser.c new file mode 100644 index 0000000000..26ec999688 --- /dev/null +++ b/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_bias_lhs_inx_iny_3x_ser.c @@ -0,0 +1,87 @@ +#include + +void fem_poisson_perp_bias_line_lhs_3x_ser_p1_inx_iny(const int *edge, const int *perp_dir, const long *globalIdxs, gkyl_mat_triples *tri) +{ + // edge: -1/+1 for lower or upper edge of the cell in each perp_dir. + // perp_dirs: directions perpendicular to the biased line. + // globalIdxs: global linear index of each basis function/node in current cell. + // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + + if (edge[0] == -1 && edge[1] == -1) { + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[0], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[2], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[7], 0.0); + } + + if (edge[0] == -1 && edge[1] == 1) { + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[4], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[6], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[7], 0.0); + } + + if (edge[0] == 1 && edge[1] == -1) { + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[1], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[3], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[7], 0.0); + } + + if (edge[0] == 1 && edge[1] == 1) { + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[5], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[7], 1.0); + } + +} + diff --git a/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_bias_lhs_inx_upy_3x_ser.c b/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_bias_lhs_inx_upy_3x_ser.c new file mode 100644 index 0000000000..92094d38c5 --- /dev/null +++ b/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_bias_lhs_inx_upy_3x_ser.c @@ -0,0 +1,172 @@ +#include + +void fem_poisson_perp_bias_line_lhs_3x_ser_p1_inx_upy_periodicy(const int *edge, const int *perp_dir, const long *globalIdxs, gkyl_mat_triples *tri) +{ + // edge: -1/+1 for lower or upper edge of the cell in each perp_dir. + // perp_dirs: directions perpendicular to the biased line. + // globalIdxs: global linear index of each basis function/node in current cell. + // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + + if (edge[0] == -1 && edge[1] == -1) { + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[0], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[2], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[7], 0.0); + } + + if (edge[0] == -1 && edge[1] == 1) { + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[4], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[6], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[7], 0.0); + } + + if (edge[0] == 1 && edge[1] == -1) { + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[1], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[3], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[7], 0.0); + } + + if (edge[0] == 1 && edge[1] == 1) { + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[5], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[7], 1.0); + } + +} + +void fem_poisson_perp_bias_line_lhs_3x_ser_p1_inx_upy_nonperiodicy(const int *edge, const int *perp_dir, const long *globalIdxs, gkyl_mat_triples *tri) +{ + // edge: -1/+1 for lower or upper edge of the cell in each perp_dir. + // perp_dirs: directions perpendicular to the biased line. + // globalIdxs: global linear index of each basis function/node in current cell. + // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + + if (edge[0] == -1 && edge[1] == -1) { + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[0], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[2], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[7], 0.0); + } + + if (edge[0] == -1 && edge[1] == 1) { + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[4], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[6], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[7], 0.0); + } + + if (edge[0] == 1 && edge[1] == -1) { + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[1], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[3], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[7], 0.0); + } + + if (edge[0] == 1 && edge[1] == 1) { + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[5], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[7], 1.0); + } + +} + diff --git a/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_bias_lhs_upx_2x_ser.c b/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_bias_lhs_upx_2x_ser.c new file mode 100644 index 0000000000..c919428cb8 --- /dev/null +++ b/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_bias_lhs_upx_2x_ser.c @@ -0,0 +1,76 @@ +#include + +void fem_poisson_perp_bias_line_lhs_2x_ser_p1_upx_periodicx(const int *edge, const int *perp_dir, const long *globalIdxs, gkyl_mat_triples *tri) +{ + // edge: -1/+1 for lower or upper edge of the cell in each perp_dir. + // perp_dirs: directions perpendicular to the biased line. + // globalIdxs: global linear index of each basis function/node in current cell. + // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + + if (edge[0] == -1 && edge[1] == -1) { + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[0], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[3], 0.0); + } + + if (edge[0] == -1 && edge[1] == 1) { + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[2], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[3], 0.0); + } + + if (edge[0] == 1 && edge[1] == -1) { + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[1], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[3], 0.0); + } + + if (edge[0] == 1 && edge[1] == 1) { + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[3], 1.0); + } + +} + +void fem_poisson_perp_bias_line_lhs_2x_ser_p1_upx_nonperiodicx(const int *edge, const int *perp_dir, const long *globalIdxs, gkyl_mat_triples *tri) +{ + // edge: -1/+1 for lower or upper edge of the cell in each perp_dir. + // perp_dirs: directions perpendicular to the biased line. + // globalIdxs: global linear index of each basis function/node in current cell. + // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + + if (edge[0] == -1 && edge[1] == -1) { + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[0], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[3], 0.0); + } + + if (edge[0] == -1 && edge[1] == 1) { + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[2], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[3], 0.0); + } + + if (edge[0] == 1 && edge[1] == -1) { + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[1], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[3], 0.0); + } + + if (edge[0] == 1 && edge[1] == 1) { + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[3], 1.0); + } + +} + diff --git a/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_bias_lhs_upx_iny_3x_ser.c b/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_bias_lhs_upx_iny_3x_ser.c new file mode 100644 index 0000000000..d67ff80a04 --- /dev/null +++ b/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_bias_lhs_upx_iny_3x_ser.c @@ -0,0 +1,172 @@ +#include + +void fem_poisson_perp_bias_line_lhs_3x_ser_p1_upx_periodicx_iny(const int *edge, const int *perp_dir, const long *globalIdxs, gkyl_mat_triples *tri) +{ + // edge: -1/+1 for lower or upper edge of the cell in each perp_dir. + // perp_dirs: directions perpendicular to the biased line. + // globalIdxs: global linear index of each basis function/node in current cell. + // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + + if (edge[0] == -1 && edge[1] == -1) { + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[0], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[2], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[7], 0.0); + } + + if (edge[0] == -1 && edge[1] == 1) { + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[4], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[6], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[7], 0.0); + } + + if (edge[0] == 1 && edge[1] == -1) { + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[1], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[3], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[7], 0.0); + } + + if (edge[0] == 1 && edge[1] == 1) { + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[5], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[7], 1.0); + } + +} + +void fem_poisson_perp_bias_line_lhs_3x_ser_p1_upx_nonperiodicx_iny(const int *edge, const int *perp_dir, const long *globalIdxs, gkyl_mat_triples *tri) +{ + // edge: -1/+1 for lower or upper edge of the cell in each perp_dir. + // perp_dirs: directions perpendicular to the biased line. + // globalIdxs: global linear index of each basis function/node in current cell. + // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + + if (edge[0] == -1 && edge[1] == -1) { + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[0], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[2], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[7], 0.0); + } + + if (edge[0] == -1 && edge[1] == 1) { + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[4], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[6], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[7], 0.0); + } + + if (edge[0] == 1 && edge[1] == -1) { + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[1], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[3], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[7], 0.0); + } + + if (edge[0] == 1 && edge[1] == 1) { + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[5], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[7], 1.0); + } + +} + diff --git a/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_bias_lhs_upx_upy_3x_ser.c b/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_bias_lhs_upx_upy_3x_ser.c new file mode 100644 index 0000000000..666f01d194 --- /dev/null +++ b/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_bias_lhs_upx_upy_3x_ser.c @@ -0,0 +1,342 @@ +#include + +void fem_poisson_perp_bias_line_lhs_3x_ser_p1_upx_periodicx_upy_periodicy(const int *edge, const int *perp_dir, const long *globalIdxs, gkyl_mat_triples *tri) +{ + // edge: -1/+1 for lower or upper edge of the cell in each perp_dir. + // perp_dirs: directions perpendicular to the biased line. + // globalIdxs: global linear index of each basis function/node in current cell. + // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + + if (edge[0] == -1 && edge[1] == -1) { + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[0], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[2], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[7], 0.0); + } + + if (edge[0] == -1 && edge[1] == 1) { + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[4], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[6], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[7], 0.0); + } + + if (edge[0] == 1 && edge[1] == -1) { + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[1], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[3], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[7], 0.0); + } + + if (edge[0] == 1 && edge[1] == 1) { + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[5], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[7], 1.0); + } + +} + +void fem_poisson_perp_bias_line_lhs_3x_ser_p1_upx_periodicx_upy_nonperiodicy(const int *edge, const int *perp_dir, const long *globalIdxs, gkyl_mat_triples *tri) +{ + // edge: -1/+1 for lower or upper edge of the cell in each perp_dir. + // perp_dirs: directions perpendicular to the biased line. + // globalIdxs: global linear index of each basis function/node in current cell. + // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + + if (edge[0] == -1 && edge[1] == -1) { + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[0], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[2], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[7], 0.0); + } + + if (edge[0] == -1 && edge[1] == 1) { + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[4], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[6], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[7], 0.0); + } + + if (edge[0] == 1 && edge[1] == -1) { + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[1], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[3], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[7], 0.0); + } + + if (edge[0] == 1 && edge[1] == 1) { + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[5], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[7], 1.0); + } + +} + +void fem_poisson_perp_bias_line_lhs_3x_ser_p1_upx_nonperiodicx_upy_periodicy(const int *edge, const int *perp_dir, const long *globalIdxs, gkyl_mat_triples *tri) +{ + // edge: -1/+1 for lower or upper edge of the cell in each perp_dir. + // perp_dirs: directions perpendicular to the biased line. + // globalIdxs: global linear index of each basis function/node in current cell. + // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + + if (edge[0] == -1 && edge[1] == -1) { + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[0], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[2], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[7], 0.0); + } + + if (edge[0] == -1 && edge[1] == 1) { + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[4], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[6], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[7], 0.0); + } + + if (edge[0] == 1 && edge[1] == -1) { + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[1], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[3], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[7], 0.0); + } + + if (edge[0] == 1 && edge[1] == 1) { + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[5], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[7], 1.0); + } + +} + +void fem_poisson_perp_bias_line_lhs_3x_ser_p1_upx_nonperiodicx_upy_nonperiodicy(const int *edge, const int *perp_dir, const long *globalIdxs, gkyl_mat_triples *tri) +{ + // edge: -1/+1 for lower or upper edge of the cell in each perp_dir. + // perp_dirs: directions perpendicular to the biased line. + // globalIdxs: global linear index of each basis function/node in current cell. + // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + + if (edge[0] == -1 && edge[1] == -1) { + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[0], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[2], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[7], 0.0); + } + + if (edge[0] == -1 && edge[1] == 1) { + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[4], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[6], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[7], 0.0); + } + + if (edge[0] == 1 && edge[1] == -1) { + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[1], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[3], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[7], 0.0); + } + + if (edge[0] == 1 && edge[1] == 1) { + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[5], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[7], 1.0); + } + +} + diff --git a/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_bias_src_inx_2x_ser.c b/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_bias_src_inx_2x_ser.c new file mode 100644 index 0000000000..80bc355dd2 --- /dev/null +++ b/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_bias_src_inx_2x_ser.c @@ -0,0 +1,45 @@ +#include + +GKYL_CU_DH void fem_poisson_perp_bias_line_src_2x_ser_p1_inx(const int *edge, const int *perp_dirs, double val, long perpOff, const long *globalIdxs, double *bsrc) +{ + // edge: -1/+1 for lower or upper edge of the cell in each perp_dir. + // perp_dirs: directions perpendicular to the biased line. + // val: biasing value. + // perpOff: memory offset due to other perpendicular planes (perp index * global number of nodes). + // globalIdxs: global linear index of each basis function/node in current cell. + // bsrc: global right side source vector. + + if (edge[0] == -1 && edge[1] == -1) { + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[0]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[0]] = val; + #endif + } + + if (edge[0] == -1 && edge[1] == 1) { + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[2]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[2]] = val; + #endif + } + + if (edge[0] == 1 && edge[1] == -1) { + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[1]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[1]] = val; + #endif + } + + if (edge[0] == 1 && edge[1] == 1) { + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[3]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[3]] = val; + #endif + } + +} + diff --git a/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_bias_src_inx_iny_3x_ser.c b/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_bias_src_inx_iny_3x_ser.c new file mode 100644 index 0000000000..62895f868c --- /dev/null +++ b/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_bias_src_inx_iny_3x_ser.c @@ -0,0 +1,65 @@ +#include + +GKYL_CU_DH void fem_poisson_perp_bias_line_src_3x_ser_p1_inx_iny(const int *edge, const int *perp_dirs, double val, long perpOff, const long *globalIdxs, double *bsrc) +{ + // edge: -1/+1 for lower or upper edge of the cell in each perp_dir. + // perp_dirs: directions perpendicular to the biased line. + // val: biasing value. + // perpOff: memory offset due to other perpendicular planes (perp index * global number of nodes). + // globalIdxs: global linear index of each basis function/node in current cell. + // bsrc: global right side source vector. + + if (edge[0] == -1 && edge[1] == -1) { + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[0]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[0]] = val; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[2]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[2]] = val; + #endif + } + + if (edge[0] == -1 && edge[1] == 1) { + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[4]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[4]] = val; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[6]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[6]] = val; + #endif + } + + if (edge[0] == 1 && edge[1] == -1) { + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[1]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[1]] = val; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[3]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[3]] = val; + #endif + } + + if (edge[0] == 1 && edge[1] == 1) { + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[5]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[5]] = val; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[7]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[7]] = val; + #endif + } + +} + diff --git a/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_bias_src_inx_upy_3x_ser.c b/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_bias_src_inx_upy_3x_ser.c new file mode 100644 index 0000000000..e98b5ce6bd --- /dev/null +++ b/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_bias_src_inx_upy_3x_ser.c @@ -0,0 +1,128 @@ +#include + +GKYL_CU_DH void fem_poisson_perp_bias_line_src_3x_ser_p1_inx_upy_periodicy(const int *edge, const int *perp_dirs, double val, long perpOff, const long *globalIdxs, double *bsrc) +{ + // edge: -1/+1 for lower or upper edge of the cell in each perp_dir. + // perp_dirs: directions perpendicular to the biased line. + // val: biasing value. + // perpOff: memory offset due to other perpendicular planes (perp index * global number of nodes). + // globalIdxs: global linear index of each basis function/node in current cell. + // bsrc: global right side source vector. + + if (edge[0] == -1 && edge[1] == -1) { + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[0]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[0]] = val; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[2]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[2]] = val; + #endif + } + + if (edge[0] == -1 && edge[1] == 1) { + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[4]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[4]] = val; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[6]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[6]] = val; + #endif + } + + if (edge[0] == 1 && edge[1] == -1) { + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[1]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[1]] = val; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[3]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[3]] = val; + #endif + } + + if (edge[0] == 1 && edge[1] == 1) { + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[5]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[5]] = val; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[7]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[7]] = val; + #endif + } + +} + +GKYL_CU_DH void fem_poisson_perp_bias_line_src_3x_ser_p1_inx_upy_nonperiodicy(const int *edge, const int *perp_dirs, double val, long perpOff, const long *globalIdxs, double *bsrc) +{ + // edge: -1/+1 for lower or upper edge of the cell in each perp_dir. + // perp_dirs: directions perpendicular to the biased line. + // val: biasing value. + // perpOff: memory offset due to other perpendicular planes (perp index * global number of nodes). + // globalIdxs: global linear index of each basis function/node in current cell. + // bsrc: global right side source vector. + + if (edge[0] == -1 && edge[1] == -1) { + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[0]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[0]] = val; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[2]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[2]] = val; + #endif + } + + if (edge[0] == -1 && edge[1] == 1) { + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[4]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[4]] = val; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[6]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[6]] = val; + #endif + } + + if (edge[0] == 1 && edge[1] == -1) { + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[1]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[1]] = val; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[3]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[3]] = val; + #endif + } + + if (edge[0] == 1 && edge[1] == 1) { + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[5]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[5]] = val; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[7]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[7]] = val; + #endif + } + +} + diff --git a/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_bias_src_upx_2x_ser.c b/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_bias_src_upx_2x_ser.c new file mode 100644 index 0000000000..4e5aafef64 --- /dev/null +++ b/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_bias_src_upx_2x_ser.c @@ -0,0 +1,88 @@ +#include + +GKYL_CU_DH void fem_poisson_perp_bias_line_src_2x_ser_p1_upx_periodicx(const int *edge, const int *perp_dirs, double val, long perpOff, const long *globalIdxs, double *bsrc) +{ + // edge: -1/+1 for lower or upper edge of the cell in each perp_dir. + // perp_dirs: directions perpendicular to the biased line. + // val: biasing value. + // perpOff: memory offset due to other perpendicular planes (perp index * global number of nodes). + // globalIdxs: global linear index of each basis function/node in current cell. + // bsrc: global right side source vector. + + if (edge[0] == -1 && edge[1] == -1) { + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[0]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[0]] = val; + #endif + } + + if (edge[0] == -1 && edge[1] == 1) { + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[2]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[2]] = val; + #endif + } + + if (edge[0] == 1 && edge[1] == -1) { + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[1]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[1]] = val; + #endif + } + + if (edge[0] == 1 && edge[1] == 1) { + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[3]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[3]] = val; + #endif + } + +} + +GKYL_CU_DH void fem_poisson_perp_bias_line_src_2x_ser_p1_upx_nonperiodicx(const int *edge, const int *perp_dirs, double val, long perpOff, const long *globalIdxs, double *bsrc) +{ + // edge: -1/+1 for lower or upper edge of the cell in each perp_dir. + // perp_dirs: directions perpendicular to the biased line. + // val: biasing value. + // perpOff: memory offset due to other perpendicular planes (perp index * global number of nodes). + // globalIdxs: global linear index of each basis function/node in current cell. + // bsrc: global right side source vector. + + if (edge[0] == -1 && edge[1] == -1) { + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[0]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[0]] = val; + #endif + } + + if (edge[0] == -1 && edge[1] == 1) { + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[2]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[2]] = val; + #endif + } + + if (edge[0] == 1 && edge[1] == -1) { + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[1]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[1]] = val; + #endif + } + + if (edge[0] == 1 && edge[1] == 1) { + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[3]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[3]] = val; + #endif + } + +} + diff --git a/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_bias_src_upx_iny_3x_ser.c b/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_bias_src_upx_iny_3x_ser.c new file mode 100644 index 0000000000..87af872677 --- /dev/null +++ b/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_bias_src_upx_iny_3x_ser.c @@ -0,0 +1,128 @@ +#include + +GKYL_CU_DH void fem_poisson_perp_bias_line_src_3x_ser_p1_upx_periodicx_iny(const int *edge, const int *perp_dirs, double val, long perpOff, const long *globalIdxs, double *bsrc) +{ + // edge: -1/+1 for lower or upper edge of the cell in each perp_dir. + // perp_dirs: directions perpendicular to the biased line. + // val: biasing value. + // perpOff: memory offset due to other perpendicular planes (perp index * global number of nodes). + // globalIdxs: global linear index of each basis function/node in current cell. + // bsrc: global right side source vector. + + if (edge[0] == -1 && edge[1] == -1) { + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[0]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[0]] = val; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[2]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[2]] = val; + #endif + } + + if (edge[0] == -1 && edge[1] == 1) { + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[4]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[4]] = val; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[6]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[6]] = val; + #endif + } + + if (edge[0] == 1 && edge[1] == -1) { + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[1]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[1]] = val; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[3]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[3]] = val; + #endif + } + + if (edge[0] == 1 && edge[1] == 1) { + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[5]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[5]] = val; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[7]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[7]] = val; + #endif + } + +} + +GKYL_CU_DH void fem_poisson_perp_bias_line_src_3x_ser_p1_upx_nonperiodicx_iny(const int *edge, const int *perp_dirs, double val, long perpOff, const long *globalIdxs, double *bsrc) +{ + // edge: -1/+1 for lower or upper edge of the cell in each perp_dir. + // perp_dirs: directions perpendicular to the biased line. + // val: biasing value. + // perpOff: memory offset due to other perpendicular planes (perp index * global number of nodes). + // globalIdxs: global linear index of each basis function/node in current cell. + // bsrc: global right side source vector. + + if (edge[0] == -1 && edge[1] == -1) { + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[0]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[0]] = val; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[2]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[2]] = val; + #endif + } + + if (edge[0] == -1 && edge[1] == 1) { + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[4]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[4]] = val; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[6]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[6]] = val; + #endif + } + + if (edge[0] == 1 && edge[1] == -1) { + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[1]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[1]] = val; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[3]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[3]] = val; + #endif + } + + if (edge[0] == 1 && edge[1] == 1) { + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[5]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[5]] = val; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[7]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[7]] = val; + #endif + } + +} + diff --git a/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_bias_src_upx_upy_3x_ser.c b/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_bias_src_upx_upy_3x_ser.c new file mode 100644 index 0000000000..3065f9fdf2 --- /dev/null +++ b/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_bias_src_upx_upy_3x_ser.c @@ -0,0 +1,254 @@ +#include + +GKYL_CU_DH void fem_poisson_perp_bias_line_src_3x_ser_p1_upx_periodicx_upy_periodicy(const int *edge, const int *perp_dirs, double val, long perpOff, const long *globalIdxs, double *bsrc) +{ + // edge: -1/+1 for lower or upper edge of the cell in each perp_dir. + // perp_dirs: directions perpendicular to the biased line. + // val: biasing value. + // perpOff: memory offset due to other perpendicular planes (perp index * global number of nodes). + // globalIdxs: global linear index of each basis function/node in current cell. + // bsrc: global right side source vector. + + if (edge[0] == -1 && edge[1] == -1) { + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[0]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[0]] = val; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[2]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[2]] = val; + #endif + } + + if (edge[0] == -1 && edge[1] == 1) { + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[4]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[4]] = val; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[6]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[6]] = val; + #endif + } + + if (edge[0] == 1 && edge[1] == -1) { + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[1]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[1]] = val; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[3]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[3]] = val; + #endif + } + + if (edge[0] == 1 && edge[1] == 1) { + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[5]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[5]] = val; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[7]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[7]] = val; + #endif + } + +} + +GKYL_CU_DH void fem_poisson_perp_bias_line_src_3x_ser_p1_upx_periodicx_upy_nonperiodicy(const int *edge, const int *perp_dirs, double val, long perpOff, const long *globalIdxs, double *bsrc) +{ + // edge: -1/+1 for lower or upper edge of the cell in each perp_dir. + // perp_dirs: directions perpendicular to the biased line. + // val: biasing value. + // perpOff: memory offset due to other perpendicular planes (perp index * global number of nodes). + // globalIdxs: global linear index of each basis function/node in current cell. + // bsrc: global right side source vector. + + if (edge[0] == -1 && edge[1] == -1) { + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[0]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[0]] = val; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[2]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[2]] = val; + #endif + } + + if (edge[0] == -1 && edge[1] == 1) { + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[4]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[4]] = val; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[6]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[6]] = val; + #endif + } + + if (edge[0] == 1 && edge[1] == -1) { + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[1]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[1]] = val; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[3]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[3]] = val; + #endif + } + + if (edge[0] == 1 && edge[1] == 1) { + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[5]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[5]] = val; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[7]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[7]] = val; + #endif + } + +} + +GKYL_CU_DH void fem_poisson_perp_bias_line_src_3x_ser_p1_upx_nonperiodicx_upy_periodicy(const int *edge, const int *perp_dirs, double val, long perpOff, const long *globalIdxs, double *bsrc) +{ + // edge: -1/+1 for lower or upper edge of the cell in each perp_dir. + // perp_dirs: directions perpendicular to the biased line. + // val: biasing value. + // perpOff: memory offset due to other perpendicular planes (perp index * global number of nodes). + // globalIdxs: global linear index of each basis function/node in current cell. + // bsrc: global right side source vector. + + if (edge[0] == -1 && edge[1] == -1) { + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[0]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[0]] = val; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[2]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[2]] = val; + #endif + } + + if (edge[0] == -1 && edge[1] == 1) { + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[4]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[4]] = val; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[6]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[6]] = val; + #endif + } + + if (edge[0] == 1 && edge[1] == -1) { + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[1]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[1]] = val; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[3]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[3]] = val; + #endif + } + + if (edge[0] == 1 && edge[1] == 1) { + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[5]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[5]] = val; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[7]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[7]] = val; + #endif + } + +} + +GKYL_CU_DH void fem_poisson_perp_bias_line_src_3x_ser_p1_upx_nonperiodicx_upy_nonperiodicy(const int *edge, const int *perp_dirs, double val, long perpOff, const long *globalIdxs, double *bsrc) +{ + // edge: -1/+1 for lower or upper edge of the cell in each perp_dir. + // perp_dirs: directions perpendicular to the biased line. + // val: biasing value. + // perpOff: memory offset due to other perpendicular planes (perp index * global number of nodes). + // globalIdxs: global linear index of each basis function/node in current cell. + // bsrc: global right side source vector. + + if (edge[0] == -1 && edge[1] == -1) { + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[0]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[0]] = val; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[2]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[2]] = val; + #endif + } + + if (edge[0] == -1 && edge[1] == 1) { + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[4]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[4]] = val; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[6]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[6]] = val; + #endif + } + + if (edge[0] == 1 && edge[1] == -1) { + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[1]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[1]] = val; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[3]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[3]] = val; + #endif + } + + if (edge[0] == 1 && edge[1] == 1) { + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[5]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[5]] = val; + #endif + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &bsrc[perpOff+globalIdxs[7]],__double_as_longlong(val)); + #else + bsrc[perpOff+globalIdxs[7]] = val; + #endif + } + +} + diff --git a/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_lhs_stencil_inx_2x_ser.c b/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_lhs_stencil_inx_2x_ser.c index 3a3c733889..234751c177 100644 --- a/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_lhs_stencil_inx_2x_ser.c +++ b/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_lhs_stencil_inx_2x_ser.c @@ -1,34 +1,60 @@ #include -void fem_poisson_perp_lhs_stencil_2x_ser_p1_inx_periodicx(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri) +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_2x_ser_p1_inx_periodicx(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out) { // epsilon: permittivity tensor. // kSq: wave number squared (factor multiplying phi). // dx: cell length in each direction. // bcVals: values to impose as BCs, i.e. bcVals[off+0]*phi+bcVals[off+1]*epsilon^{ij}*d(phi)/dx_j=bcVals[off+2]. // globalIdxs: global linear index of each basis function/node in current cell. - // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (CPU): triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (GPU): double array to put nonzero values of the global matrix into. + + #ifdef __CUDA_ARCH__ + double *csr_vals = (double *) out; + #else + gkyl_mat_triples *tri = (gkyl_mat_triples *) out; + #endif const double *epsxx = &epsilon[0]; double rdx00 = 4.0/(dx[0]*dx[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], -(0.1443375672974064*epsxx[2]*rdx00)+0.16666666666666666*epsxx[0]*rdx00-0.16666666666666666*kSq[3]+0.19245008972987523*kSq[2]+0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], 0.1443375672974064*epsxx[2]*rdx00-0.16666666666666666*epsxx[0]*rdx00+0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], 0.08333333333333333*epsxx[0]*rdx00+0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], -(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], 0.1443375672974064*epsxx[2]*rdx00-0.16666666666666666*epsxx[0]*rdx00+0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.1443375672974064*epsxx[2]*rdx00)+0.16666666666666666*epsxx[0]*rdx00+0.16666666666666666*kSq[3]+0.19245008972987523*kSq[2]-0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], -(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.08333333333333333*epsxx[0]*rdx00-0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], 0.08333333333333333*epsxx[0]*rdx00+0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], -(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.1443375672974064*epsxx[2]*rdx00+0.16666666666666666*epsxx[0]*rdx00+0.16666666666666666*kSq[3]-0.19245008972987523*kSq[2]+0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.1443375672974064*epsxx[2]*rdx00)-0.16666666666666666*epsxx[0]*rdx00-0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], -(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.08333333333333333*epsxx[0]*rdx00-0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.1443375672974064*epsxx[2]*rdx00)-0.16666666666666666*epsxx[0]*rdx00-0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], 0.1443375672974064*epsxx[2]*rdx00+0.16666666666666666*epsxx[0]*rdx00-0.16666666666666666*kSq[3]-0.19245008972987523*kSq[2]-0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0]); + #ifdef __CUDA_ARCH__ + atomicAdd( &csr_vals[globalIdxs[0]],(-(0.1443375672974064*epsxx[2]*rdx00)+0.16666666666666666*epsxx[0]*rdx00-0.16666666666666666*kSq[3]+0.19245008972987523*kSq[2]+0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[1]],(0.1443375672974064*epsxx[2]*rdx00-0.16666666666666666*epsxx[0]*rdx00+0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[2]],(0.08333333333333333*epsxx[0]*rdx00+0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[3]],(-(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[4]],(0.1443375672974064*epsxx[2]*rdx00-0.16666666666666666*epsxx[0]*rdx00+0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[5]],(-(0.1443375672974064*epsxx[2]*rdx00)+0.16666666666666666*epsxx[0]*rdx00+0.16666666666666666*kSq[3]+0.19245008972987523*kSq[2]-0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[6]],(-(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[7]],(0.08333333333333333*epsxx[0]*rdx00-0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[8]],(0.08333333333333333*epsxx[0]*rdx00+0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[9]],(-(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[10]],(0.1443375672974064*epsxx[2]*rdx00+0.16666666666666666*epsxx[0]*rdx00+0.16666666666666666*kSq[3]-0.19245008972987523*kSq[2]+0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[11]],(-(0.1443375672974064*epsxx[2]*rdx00)-0.16666666666666666*epsxx[0]*rdx00-0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[12]],(-(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[13]],(0.08333333333333333*epsxx[0]*rdx00-0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[14]],(-(0.1443375672974064*epsxx[2]*rdx00)-0.16666666666666666*epsxx[0]*rdx00-0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[15]],(0.1443375672974064*epsxx[2]*rdx00+0.16666666666666666*epsxx[0]*rdx00-0.16666666666666666*kSq[3]-0.19245008972987523*kSq[2]-0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0])); + #else + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], -(0.1443375672974064*epsxx[2]*rdx00)+0.16666666666666666*epsxx[0]*rdx00-0.16666666666666666*kSq[3]+0.19245008972987523*kSq[2]+0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], 0.1443375672974064*epsxx[2]*rdx00-0.16666666666666666*epsxx[0]*rdx00+0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], 0.08333333333333333*epsxx[0]*rdx00+0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], -(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], 0.1443375672974064*epsxx[2]*rdx00-0.16666666666666666*epsxx[0]*rdx00+0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.1443375672974064*epsxx[2]*rdx00)+0.16666666666666666*epsxx[0]*rdx00+0.16666666666666666*kSq[3]+0.19245008972987523*kSq[2]-0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], -(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.08333333333333333*epsxx[0]*rdx00-0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], 0.08333333333333333*epsxx[0]*rdx00+0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], -(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.1443375672974064*epsxx[2]*rdx00+0.16666666666666666*epsxx[0]*rdx00+0.16666666666666666*kSq[3]-0.19245008972987523*kSq[2]+0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.1443375672974064*epsxx[2]*rdx00)-0.16666666666666666*epsxx[0]*rdx00-0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], -(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.08333333333333333*epsxx[0]*rdx00-0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.1443375672974064*epsxx[2]*rdx00)-0.16666666666666666*epsxx[0]*rdx00-0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], 0.1443375672974064*epsxx[2]*rdx00+0.16666666666666666*epsxx[0]*rdx00-0.16666666666666666*kSq[3]-0.19245008972987523*kSq[2]-0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0]); + #endif } diff --git a/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_lhs_stencil_inx_iny_3x_ser.c b/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_lhs_stencil_inx_iny_3x_ser.c index 5fc58951c8..53040c85e6 100644 --- a/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_lhs_stencil_inx_iny_3x_ser.c +++ b/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_lhs_stencil_inx_iny_3x_ser.c @@ -1,13 +1,20 @@ #include -void fem_poisson_perp_lhs_stencil_3x_ser_p1_inx_periodicx_iny_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri) +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_inx_periodicx_iny_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out) { // epsilon: permittivity tensor. // kSq: wave number squared (factor multiplying phi). // dx: cell length in each direction. // bcVals: values to impose as BCs, i.e. bcVals[off+0]*phi+bcVals[off+1]*epsilon^{ij}*d(phi)/dx_j=bcVals[off+2]. // globalIdxs: global linear index of each basis function/node in current cell. - // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (CPU): triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (GPU): double array to put nonzero values of the global matrix into. + + #ifdef __CUDA_ARCH__ + double *csr_vals = (double *) out; + #else + gkyl_mat_triples *tri = (gkyl_mat_triples *) out; + #endif const double *epsxx = &epsilon[0]; const double *epsxy = &epsilon[8]; @@ -17,70 +24,137 @@ void fem_poisson_perp_lhs_stencil_3x_ser_p1_inx_periodicx_iny_periodicy(const do double rdx01 = 4.0/(dx[0]*dx[1]); double rdx11 = 4.0/(dx[1]*dx[1]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #ifdef __CUDA_ARCH__ + atomicAdd( &csr_vals[globalIdxs[0]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[1]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[2]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[3]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[4]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[5]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[6]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[7]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[8]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[9]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[10]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[11]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[12]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[13]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[14]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[15]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[16]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[17]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[18]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[19]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[20]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[21]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[22]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[23]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[24]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[25]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[26]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[27]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[28]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[29]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[30]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[31]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[32]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[33]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[34]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[35]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[36]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[37]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[38]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[39]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[40]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[41]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[42]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[43]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[44]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[45]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[46]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[47]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[48]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[49]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[50]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[51]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[52]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[53]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[54]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[55]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[56]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[57]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[58]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[59]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[60]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[61]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[62]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[63]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + #else + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #endif } diff --git a/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_lhs_stencil_inx_loy_3x_ser.c b/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_lhs_stencil_inx_loy_3x_ser.c index 41566a8986..f60058cdcf 100644 --- a/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_lhs_stencil_inx_loy_3x_ser.c +++ b/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_lhs_stencil_inx_loy_3x_ser.c @@ -1,13 +1,20 @@ #include -void fem_poisson_perp_lhs_stencil_3x_ser_p1_inx_periodicx_loy_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri) +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_inx_periodicx_loy_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out) { // epsilon: permittivity tensor. // kSq: wave number squared (factor multiplying phi). // dx: cell length in each direction. // bcVals: values to impose as BCs, i.e. bcVals[off+0]*phi+bcVals[off+1]*epsilon^{ij}*d(phi)/dx_j=bcVals[off+2]. // globalIdxs: global linear index of each basis function/node in current cell. - // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (CPU): triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (GPU): double array to put nonzero values of the global matrix into. + + #ifdef __CUDA_ARCH__ + double *csr_vals = (double *) out; + #else + gkyl_mat_triples *tri = (gkyl_mat_triples *) out; + #endif const double *epsxx = &epsilon[0]; const double *epsxy = &epsilon[8]; @@ -17,81 +24,155 @@ void fem_poisson_perp_lhs_stencil_3x_ser_p1_inx_periodicx_loy_periodicy(const do double rdx01 = 4.0/(dx[0]*dx[1]); double rdx11 = 4.0/(dx[1]*dx[1]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #ifdef __CUDA_ARCH__ + atomicAdd( &csr_vals[globalIdxs[0]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[1]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[2]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[3]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[4]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[5]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[6]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[7]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[8]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[9]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[10]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[11]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[12]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[13]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[14]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[15]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[16]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[17]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[18]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[19]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[20]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[21]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[22]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[23]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[24]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[25]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[26]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[27]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[28]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[29]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[30]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[31]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[32]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[33]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[34]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[35]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[36]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[37]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[38]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[39]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[40]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[41]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[42]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[43]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[44]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[45]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[46]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[47]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[48]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[49]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[50]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[51]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[52]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[53]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[54]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[55]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[56]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[57]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[58]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[59]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[60]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[61]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[62]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[63]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + #else + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #endif } -void fem_poisson_perp_lhs_stencil_3x_ser_p1_inx_periodicx_loy_dirichlety(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri) +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_inx_periodicx_loy_dirichlety(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out) { // epsilon: permittivity tensor. // kSq: wave number squared (factor multiplying phi). // dx: cell length in each direction. // bcVals: values to impose as BCs, i.e. bcVals[off+0]*phi+bcVals[off+1]*epsilon^{ij}*d(phi)/dx_j=bcVals[off+2]. // globalIdxs: global linear index of each basis function/node in current cell. - // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (CPU): triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (GPU): double array to put nonzero values of the global matrix into. + + #ifdef __CUDA_ARCH__ + double *csr_vals = (double *) out; + #else + gkyl_mat_triples *tri = (gkyl_mat_triples *) out; + #endif const double *epsxx = &epsilon[0]; const double *epsxy = &epsilon[8]; @@ -101,81 +182,155 @@ void fem_poisson_perp_lhs_stencil_3x_ser_p1_inx_periodicx_loy_dirichlety(const d double rdx01 = 4.0/(dx[0]*dx[1]); double rdx11 = 4.0/(dx[1]*dx[1]); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[0], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[7], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[1], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[7], 0.0); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[4], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[7], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[5], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[7], 0.0); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[0]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[1]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[2]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[3]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[4]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[5]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[6]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[7]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[8]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[9]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[10]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[11]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[12]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[13]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[14]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[15]],__double_as_longlong(0.0)); + atomicAdd( &csr_vals[globalIdxs[16]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[17]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[18]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[19]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[20]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[21]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[22]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[23]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[24]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[25]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[26]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[27]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[28]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[29]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[30]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[31]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[32]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[33]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[34]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[35]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[36]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[37]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[38]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[39]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[40]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[41]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[42]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[43]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[44]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[45]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[46]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[47]],__double_as_longlong(0.0)); + atomicAdd( &csr_vals[globalIdxs[48]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[49]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[50]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[51]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[52]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[53]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[54]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[55]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[56]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[57]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[58]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[59]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[60]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[61]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[62]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[63]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + #else + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[0], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[1], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[7], 0.0); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[4], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[5], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[7], 0.0); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #endif } -void fem_poisson_perp_lhs_stencil_3x_ser_p1_inx_periodicx_loy_neumanny(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri) +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_inx_periodicx_loy_neumanny(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out) { // epsilon: permittivity tensor. // kSq: wave number squared (factor multiplying phi). // dx: cell length in each direction. // bcVals: values to impose as BCs, i.e. bcVals[off+0]*phi+bcVals[off+1]*epsilon^{ij}*d(phi)/dx_j=bcVals[off+2]. // globalIdxs: global linear index of each basis function/node in current cell. - // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (CPU): triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (GPU): double array to put nonzero values of the global matrix into. + + #ifdef __CUDA_ARCH__ + double *csr_vals = (double *) out; + #else + gkyl_mat_triples *tri = (gkyl_mat_triples *) out; + #endif const double *epsxx = &epsilon[0]; const double *epsxy = &epsilon[8]; @@ -189,70 +344,137 @@ void fem_poisson_perp_lhs_stencil_3x_ser_p1_inx_periodicx_loy_neumanny(const dou rdx2[0] = 2.0/dx[0]; rdx2[1] = 2.0/dx[1]; - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #ifdef __CUDA_ARCH__ + atomicAdd( &csr_vals[globalIdxs[0]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[1]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[2]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[3]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[4]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[5]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[6]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[7]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[8]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[9]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[10]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[11]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[12]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[13]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[14]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[15]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[16]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[17]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[18]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[19]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[20]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[21]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[22]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[23]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[24]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[25]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[26]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[27]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[28]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[29]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[30]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[31]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[32]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[33]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[34]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[35]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[36]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[37]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[38]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[39]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[40]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[41]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[42]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[43]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[44]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[45]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[46]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[47]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[48]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[49]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[50]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[51]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[52]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[53]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[54]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[55]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[56]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[57]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[58]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[59]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[60]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[61]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[62]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[63]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + #else + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #endif } diff --git a/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_lhs_stencil_inx_upy_3x_ser.c b/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_lhs_stencil_inx_upy_3x_ser.c index 1e255da860..f6a2017d14 100644 --- a/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_lhs_stencil_inx_upy_3x_ser.c +++ b/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_lhs_stencil_inx_upy_3x_ser.c @@ -1,13 +1,20 @@ #include -void fem_poisson_perp_lhs_stencil_3x_ser_p1_inx_periodicx_upy_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri) +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_inx_periodicx_upy_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out) { // epsilon: permittivity tensor. // kSq: wave number squared (factor multiplying phi). // dx: cell length in each direction. // bcVals: values to impose as BCs, i.e. bcVals[off+0]*phi+bcVals[off+1]*epsilon^{ij}*d(phi)/dx_j=bcVals[off+2]. // globalIdxs: global linear index of each basis function/node in current cell. - // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (CPU): triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (GPU): double array to put nonzero values of the global matrix into. + + #ifdef __CUDA_ARCH__ + double *csr_vals = (double *) out; + #else + gkyl_mat_triples *tri = (gkyl_mat_triples *) out; + #endif const double *epsxx = &epsilon[0]; const double *epsxy = &epsilon[8]; @@ -17,81 +24,155 @@ void fem_poisson_perp_lhs_stencil_3x_ser_p1_inx_periodicx_upy_periodicy(const do double rdx01 = 4.0/(dx[0]*dx[1]); double rdx11 = 4.0/(dx[1]*dx[1]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #ifdef __CUDA_ARCH__ + atomicAdd( &csr_vals[globalIdxs[0]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[1]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[2]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[3]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[4]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[5]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[6]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[7]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[8]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[9]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[10]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[11]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[12]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[13]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[14]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[15]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[16]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[17]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[18]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[19]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[20]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[21]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[22]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[23]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[24]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[25]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[26]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[27]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[28]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[29]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[30]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[31]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[32]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[33]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[34]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[35]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[36]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[37]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[38]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[39]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[40]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[41]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[42]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[43]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[44]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[45]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[46]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[47]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[48]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[49]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[50]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[51]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[52]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[53]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[54]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[55]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[56]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[57]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[58]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[59]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[60]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[61]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[62]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[63]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + #else + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #endif } -void fem_poisson_perp_lhs_stencil_3x_ser_p1_inx_periodicx_upy_dirichlety(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri) +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_inx_periodicx_upy_dirichlety(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out) { // epsilon: permittivity tensor. // kSq: wave number squared (factor multiplying phi). // dx: cell length in each direction. // bcVals: values to impose as BCs, i.e. bcVals[off+0]*phi+bcVals[off+1]*epsilon^{ij}*d(phi)/dx_j=bcVals[off+2]. // globalIdxs: global linear index of each basis function/node in current cell. - // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (CPU): triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (GPU): double array to put nonzero values of the global matrix into. + + #ifdef __CUDA_ARCH__ + double *csr_vals = (double *) out; + #else + gkyl_mat_triples *tri = (gkyl_mat_triples *) out; + #endif const double *epsxx = &epsilon[0]; const double *epsxy = &epsilon[8]; @@ -101,81 +182,155 @@ void fem_poisson_perp_lhs_stencil_3x_ser_p1_inx_periodicx_upy_dirichlety(const d double rdx01 = 4.0/(dx[0]*dx[1]); double rdx11 = 4.0/(dx[1]*dx[1]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[2], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[7], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[3], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[7], 0.0); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[6], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[7], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[7], 1.0); + #ifdef __CUDA_ARCH__ + atomicAdd( &csr_vals[globalIdxs[0]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[1]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[2]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[3]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[4]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[5]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[6]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[7]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[8]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[9]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[10]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[11]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[12]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[13]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[14]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[15]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[16]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[17]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[18]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[19]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[20]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[21]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[22]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[23]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[24]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[25]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[26]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[27]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[28]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[29]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[30]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[31]],__double_as_longlong(0.0)); + atomicAdd( &csr_vals[globalIdxs[32]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[33]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[34]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[35]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[36]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[37]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[38]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[39]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[40]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[41]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[42]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[43]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[44]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[45]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[46]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[47]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[48]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[49]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[50]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[51]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[52]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[53]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[54]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[55]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[56]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[57]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[58]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[59]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[60]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[61]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[62]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[63]],__double_as_longlong(1.0)); + #else + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[2], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[3], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[7], 0.0); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[6], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[7], 1.0); + #endif } -void fem_poisson_perp_lhs_stencil_3x_ser_p1_inx_periodicx_upy_neumanny(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri) +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_inx_periodicx_upy_neumanny(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out) { // epsilon: permittivity tensor. // kSq: wave number squared (factor multiplying phi). // dx: cell length in each direction. // bcVals: values to impose as BCs, i.e. bcVals[off+0]*phi+bcVals[off+1]*epsilon^{ij}*d(phi)/dx_j=bcVals[off+2]. // globalIdxs: global linear index of each basis function/node in current cell. - // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (CPU): triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (GPU): double array to put nonzero values of the global matrix into. + + #ifdef __CUDA_ARCH__ + double *csr_vals = (double *) out; + #else + gkyl_mat_triples *tri = (gkyl_mat_triples *) out; + #endif const double *epsxx = &epsilon[0]; const double *epsxy = &epsilon[8]; @@ -189,70 +344,137 @@ void fem_poisson_perp_lhs_stencil_3x_ser_p1_inx_periodicx_upy_neumanny(const dou rdx2[0] = 2.0/dx[0]; rdx2[1] = 2.0/dx[1]; - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #ifdef __CUDA_ARCH__ + atomicAdd( &csr_vals[globalIdxs[0]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[1]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[2]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[3]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[4]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[5]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[6]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[7]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[8]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[9]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[10]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[11]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[12]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[13]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[14]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[15]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[16]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[17]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[18]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[19]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[20]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[21]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[22]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[23]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[24]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[25]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[26]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[27]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[28]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[29]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[30]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[31]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[32]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[33]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[34]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[35]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[36]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[37]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[38]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[39]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[40]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[41]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[42]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[43]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[44]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[45]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[46]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[47]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[48]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[49]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[50]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[51]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[52]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[53]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[54]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[55]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[56]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[57]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[58]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[59]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[60]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[61]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[62]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[63]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + #else + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #endif } diff --git a/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_lhs_stencil_lox_2x_ser.c b/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_lhs_stencil_lox_2x_ser.c index 5da6fca561..3511891bc8 100644 --- a/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_lhs_stencil_lox_2x_ser.c +++ b/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_lhs_stencil_lox_2x_ser.c @@ -1,77 +1,136 @@ #include -void fem_poisson_perp_lhs_stencil_2x_ser_p1_lox_periodicx(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri) +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_2x_ser_p1_lox_periodicx(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out) { // epsilon: permittivity tensor. // kSq: wave number squared (factor multiplying phi). // dx: cell length in each direction. // bcVals: values to impose as BCs, i.e. bcVals[off+0]*phi+bcVals[off+1]*epsilon^{ij}*d(phi)/dx_j=bcVals[off+2]. // globalIdxs: global linear index of each basis function/node in current cell. - // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (CPU): triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (GPU): double array to put nonzero values of the global matrix into. + + #ifdef __CUDA_ARCH__ + double *csr_vals = (double *) out; + #else + gkyl_mat_triples *tri = (gkyl_mat_triples *) out; + #endif const double *epsxx = &epsilon[0]; double rdx00 = 4.0/(dx[0]*dx[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], -(0.1443375672974064*epsxx[2]*rdx00)+0.16666666666666666*epsxx[0]*rdx00-0.16666666666666666*kSq[3]+0.19245008972987523*kSq[2]+0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], 0.1443375672974064*epsxx[2]*rdx00-0.16666666666666666*epsxx[0]*rdx00+0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], 0.08333333333333333*epsxx[0]*rdx00+0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], -(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], 0.1443375672974064*epsxx[2]*rdx00-0.16666666666666666*epsxx[0]*rdx00+0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.1443375672974064*epsxx[2]*rdx00)+0.16666666666666666*epsxx[0]*rdx00+0.16666666666666666*kSq[3]+0.19245008972987523*kSq[2]-0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], -(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.08333333333333333*epsxx[0]*rdx00-0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], 0.08333333333333333*epsxx[0]*rdx00+0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], -(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.1443375672974064*epsxx[2]*rdx00+0.16666666666666666*epsxx[0]*rdx00+0.16666666666666666*kSq[3]-0.19245008972987523*kSq[2]+0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.1443375672974064*epsxx[2]*rdx00)-0.16666666666666666*epsxx[0]*rdx00-0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], -(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.08333333333333333*epsxx[0]*rdx00-0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.1443375672974064*epsxx[2]*rdx00)-0.16666666666666666*epsxx[0]*rdx00-0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], 0.1443375672974064*epsxx[2]*rdx00+0.16666666666666666*epsxx[0]*rdx00-0.16666666666666666*kSq[3]-0.19245008972987523*kSq[2]-0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0]); + #ifdef __CUDA_ARCH__ + atomicAdd( &csr_vals[globalIdxs[0]],(-(0.1443375672974064*epsxx[2]*rdx00)+0.16666666666666666*epsxx[0]*rdx00-0.16666666666666666*kSq[3]+0.19245008972987523*kSq[2]+0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[1]],(0.1443375672974064*epsxx[2]*rdx00-0.16666666666666666*epsxx[0]*rdx00+0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[2]],(0.08333333333333333*epsxx[0]*rdx00+0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[3]],(-(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[4]],(0.1443375672974064*epsxx[2]*rdx00-0.16666666666666666*epsxx[0]*rdx00+0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[5]],(-(0.1443375672974064*epsxx[2]*rdx00)+0.16666666666666666*epsxx[0]*rdx00+0.16666666666666666*kSq[3]+0.19245008972987523*kSq[2]-0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[6]],(-(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[7]],(0.08333333333333333*epsxx[0]*rdx00-0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[8]],(0.08333333333333333*epsxx[0]*rdx00+0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[9]],(-(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[10]],(0.1443375672974064*epsxx[2]*rdx00+0.16666666666666666*epsxx[0]*rdx00+0.16666666666666666*kSq[3]-0.19245008972987523*kSq[2]+0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[11]],(-(0.1443375672974064*epsxx[2]*rdx00)-0.16666666666666666*epsxx[0]*rdx00-0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[12]],(-(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[13]],(0.08333333333333333*epsxx[0]*rdx00-0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[14]],(-(0.1443375672974064*epsxx[2]*rdx00)-0.16666666666666666*epsxx[0]*rdx00-0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[15]],(0.1443375672974064*epsxx[2]*rdx00+0.16666666666666666*epsxx[0]*rdx00-0.16666666666666666*kSq[3]-0.19245008972987523*kSq[2]-0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0])); + #else + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], -(0.1443375672974064*epsxx[2]*rdx00)+0.16666666666666666*epsxx[0]*rdx00-0.16666666666666666*kSq[3]+0.19245008972987523*kSq[2]+0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], 0.1443375672974064*epsxx[2]*rdx00-0.16666666666666666*epsxx[0]*rdx00+0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], 0.08333333333333333*epsxx[0]*rdx00+0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], -(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], 0.1443375672974064*epsxx[2]*rdx00-0.16666666666666666*epsxx[0]*rdx00+0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.1443375672974064*epsxx[2]*rdx00)+0.16666666666666666*epsxx[0]*rdx00+0.16666666666666666*kSq[3]+0.19245008972987523*kSq[2]-0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], -(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.08333333333333333*epsxx[0]*rdx00-0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], 0.08333333333333333*epsxx[0]*rdx00+0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], -(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.1443375672974064*epsxx[2]*rdx00+0.16666666666666666*epsxx[0]*rdx00+0.16666666666666666*kSq[3]-0.19245008972987523*kSq[2]+0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.1443375672974064*epsxx[2]*rdx00)-0.16666666666666666*epsxx[0]*rdx00-0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], -(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.08333333333333333*epsxx[0]*rdx00-0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.1443375672974064*epsxx[2]*rdx00)-0.16666666666666666*epsxx[0]*rdx00-0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], 0.1443375672974064*epsxx[2]*rdx00+0.16666666666666666*epsxx[0]*rdx00-0.16666666666666666*kSq[3]-0.19245008972987523*kSq[2]-0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0]); + #endif } -void fem_poisson_perp_lhs_stencil_2x_ser_p1_lox_dirichletx(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri) +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_2x_ser_p1_lox_dirichletx(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out) { // epsilon: permittivity tensor. // kSq: wave number squared (factor multiplying phi). // dx: cell length in each direction. // bcVals: values to impose as BCs, i.e. bcVals[off+0]*phi+bcVals[off+1]*epsilon^{ij}*d(phi)/dx_j=bcVals[off+2]. // globalIdxs: global linear index of each basis function/node in current cell. - // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (CPU): triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (GPU): double array to put nonzero values of the global matrix into. + + #ifdef __CUDA_ARCH__ + double *csr_vals = (double *) out; + #else + gkyl_mat_triples *tri = (gkyl_mat_triples *) out; + #endif const double *epsxx = &epsilon[0]; double rdx00 = 4.0/(dx[0]*dx[0]); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[0], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[3], 0.0); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], 0.1443375672974064*epsxx[2]*rdx00-0.16666666666666666*epsxx[0]*rdx00+0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.1443375672974064*epsxx[2]*rdx00)+0.16666666666666666*epsxx[0]*rdx00+0.16666666666666666*kSq[3]+0.19245008972987523*kSq[2]-0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], -(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.08333333333333333*epsxx[0]*rdx00-0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0]); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[2], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[3], 0.0); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], -(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.08333333333333333*epsxx[0]*rdx00-0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.1443375672974064*epsxx[2]*rdx00)-0.16666666666666666*epsxx[0]*rdx00-0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], 0.1443375672974064*epsxx[2]*rdx00+0.16666666666666666*epsxx[0]*rdx00-0.16666666666666666*kSq[3]-0.19245008972987523*kSq[2]-0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0]); + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[0]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[1]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[2]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[3]],__double_as_longlong(0.0)); + atomicAdd( &csr_vals[globalIdxs[4]],(0.1443375672974064*epsxx[2]*rdx00-0.16666666666666666*epsxx[0]*rdx00+0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[5]],(-(0.1443375672974064*epsxx[2]*rdx00)+0.16666666666666666*epsxx[0]*rdx00+0.16666666666666666*kSq[3]+0.19245008972987523*kSq[2]-0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[6]],(-(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[7]],(0.08333333333333333*epsxx[0]*rdx00-0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0])); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[8]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[9]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[10]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[11]],__double_as_longlong(0.0)); + atomicAdd( &csr_vals[globalIdxs[12]],(-(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[13]],(0.08333333333333333*epsxx[0]*rdx00-0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[14]],(-(0.1443375672974064*epsxx[2]*rdx00)-0.16666666666666666*epsxx[0]*rdx00-0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[15]],(0.1443375672974064*epsxx[2]*rdx00+0.16666666666666666*epsxx[0]*rdx00-0.16666666666666666*kSq[3]-0.19245008972987523*kSq[2]-0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0])); + #else + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[0], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[3], 0.0); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], 0.1443375672974064*epsxx[2]*rdx00-0.16666666666666666*epsxx[0]*rdx00+0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.1443375672974064*epsxx[2]*rdx00)+0.16666666666666666*epsxx[0]*rdx00+0.16666666666666666*kSq[3]+0.19245008972987523*kSq[2]-0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], -(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.08333333333333333*epsxx[0]*rdx00-0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0]); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[2], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[3], 0.0); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], -(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.08333333333333333*epsxx[0]*rdx00-0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.1443375672974064*epsxx[2]*rdx00)-0.16666666666666666*epsxx[0]*rdx00-0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], 0.1443375672974064*epsxx[2]*rdx00+0.16666666666666666*epsxx[0]*rdx00-0.16666666666666666*kSq[3]-0.19245008972987523*kSq[2]-0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0]); + #endif } -void fem_poisson_perp_lhs_stencil_2x_ser_p1_lox_neumannx(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri) +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_2x_ser_p1_lox_neumannx(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out) { // epsilon: permittivity tensor. // kSq: wave number squared (factor multiplying phi). // dx: cell length in each direction. // bcVals: values to impose as BCs, i.e. bcVals[off+0]*phi+bcVals[off+1]*epsilon^{ij}*d(phi)/dx_j=bcVals[off+2]. // globalIdxs: global linear index of each basis function/node in current cell. - // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (CPU): triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (GPU): double array to put nonzero values of the global matrix into. + + #ifdef __CUDA_ARCH__ + double *csr_vals = (double *) out; + #else + gkyl_mat_triples *tri = (gkyl_mat_triples *) out; + #endif const double *epsxx = &epsilon[0]; @@ -80,22 +139,41 @@ void fem_poisson_perp_lhs_stencil_2x_ser_p1_lox_neumannx(const double *epsilon, double rdx2[1]; rdx2[0] = 2.0/dx[0]; - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], -(0.1443375672974064*epsxx[2]*rdx00)+0.16666666666666666*epsxx[0]*rdx00-0.16666666666666666*kSq[3]+0.19245008972987523*kSq[2]+0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], 0.1443375672974064*epsxx[2]*rdx00-0.16666666666666666*epsxx[0]*rdx00+0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], 0.08333333333333333*epsxx[0]*rdx00+0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], -(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], 0.1443375672974064*epsxx[2]*rdx00-0.16666666666666666*epsxx[0]*rdx00+0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.1443375672974064*epsxx[2]*rdx00)+0.16666666666666666*epsxx[0]*rdx00+0.16666666666666666*kSq[3]+0.19245008972987523*kSq[2]-0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], -(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.08333333333333333*epsxx[0]*rdx00-0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], 0.08333333333333333*epsxx[0]*rdx00+0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], -(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.1443375672974064*epsxx[2]*rdx00+0.16666666666666666*epsxx[0]*rdx00+0.16666666666666666*kSq[3]-0.19245008972987523*kSq[2]+0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.1443375672974064*epsxx[2]*rdx00)-0.16666666666666666*epsxx[0]*rdx00-0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], -(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.08333333333333333*epsxx[0]*rdx00-0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.1443375672974064*epsxx[2]*rdx00)-0.16666666666666666*epsxx[0]*rdx00-0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], 0.1443375672974064*epsxx[2]*rdx00+0.16666666666666666*epsxx[0]*rdx00-0.16666666666666666*kSq[3]-0.19245008972987523*kSq[2]-0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0]); + #ifdef __CUDA_ARCH__ + atomicAdd( &csr_vals[globalIdxs[0]],(-(0.1443375672974064*epsxx[2]*rdx00)+0.16666666666666666*epsxx[0]*rdx00-0.16666666666666666*kSq[3]+0.19245008972987523*kSq[2]+0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[1]],(0.1443375672974064*epsxx[2]*rdx00-0.16666666666666666*epsxx[0]*rdx00+0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[2]],(0.08333333333333333*epsxx[0]*rdx00+0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[3]],(-(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[4]],(0.1443375672974064*epsxx[2]*rdx00-0.16666666666666666*epsxx[0]*rdx00+0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[5]],(-(0.1443375672974064*epsxx[2]*rdx00)+0.16666666666666666*epsxx[0]*rdx00+0.16666666666666666*kSq[3]+0.19245008972987523*kSq[2]-0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[6]],(-(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[7]],(0.08333333333333333*epsxx[0]*rdx00-0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[8]],(0.08333333333333333*epsxx[0]*rdx00+0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[9]],(-(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[10]],(0.1443375672974064*epsxx[2]*rdx00+0.16666666666666666*epsxx[0]*rdx00+0.16666666666666666*kSq[3]-0.19245008972987523*kSq[2]+0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[11]],(-(0.1443375672974064*epsxx[2]*rdx00)-0.16666666666666666*epsxx[0]*rdx00-0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[12]],(-(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[13]],(0.08333333333333333*epsxx[0]*rdx00-0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[14]],(-(0.1443375672974064*epsxx[2]*rdx00)-0.16666666666666666*epsxx[0]*rdx00-0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[15]],(0.1443375672974064*epsxx[2]*rdx00+0.16666666666666666*epsxx[0]*rdx00-0.16666666666666666*kSq[3]-0.19245008972987523*kSq[2]-0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0])); + #else + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], -(0.1443375672974064*epsxx[2]*rdx00)+0.16666666666666666*epsxx[0]*rdx00-0.16666666666666666*kSq[3]+0.19245008972987523*kSq[2]+0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], 0.1443375672974064*epsxx[2]*rdx00-0.16666666666666666*epsxx[0]*rdx00+0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], 0.08333333333333333*epsxx[0]*rdx00+0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], -(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], 0.1443375672974064*epsxx[2]*rdx00-0.16666666666666666*epsxx[0]*rdx00+0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.1443375672974064*epsxx[2]*rdx00)+0.16666666666666666*epsxx[0]*rdx00+0.16666666666666666*kSq[3]+0.19245008972987523*kSq[2]-0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], -(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.08333333333333333*epsxx[0]*rdx00-0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], 0.08333333333333333*epsxx[0]*rdx00+0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], -(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.1443375672974064*epsxx[2]*rdx00+0.16666666666666666*epsxx[0]*rdx00+0.16666666666666666*kSq[3]-0.19245008972987523*kSq[2]+0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.1443375672974064*epsxx[2]*rdx00)-0.16666666666666666*epsxx[0]*rdx00-0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], -(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.08333333333333333*epsxx[0]*rdx00-0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.1443375672974064*epsxx[2]*rdx00)-0.16666666666666666*epsxx[0]*rdx00-0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], 0.1443375672974064*epsxx[2]*rdx00+0.16666666666666666*epsxx[0]*rdx00-0.16666666666666666*kSq[3]-0.19245008972987523*kSq[2]-0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0]); + #endif } diff --git a/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_lhs_stencil_lox_iny_3x_ser.c b/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_lhs_stencil_lox_iny_3x_ser.c index 3bc55e521a..b66bcb9580 100644 --- a/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_lhs_stencil_lox_iny_3x_ser.c +++ b/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_lhs_stencil_lox_iny_3x_ser.c @@ -1,13 +1,20 @@ #include -void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_periodicx_iny_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri) +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_periodicx_iny_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out) { // epsilon: permittivity tensor. // kSq: wave number squared (factor multiplying phi). // dx: cell length in each direction. // bcVals: values to impose as BCs, i.e. bcVals[off+0]*phi+bcVals[off+1]*epsilon^{ij}*d(phi)/dx_j=bcVals[off+2]. // globalIdxs: global linear index of each basis function/node in current cell. - // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (CPU): triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (GPU): double array to put nonzero values of the global matrix into. + + #ifdef __CUDA_ARCH__ + double *csr_vals = (double *) out; + #else + gkyl_mat_triples *tri = (gkyl_mat_triples *) out; + #endif const double *epsxx = &epsilon[0]; const double *epsxy = &epsilon[8]; @@ -17,81 +24,155 @@ void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_periodicx_iny_periodicy(const do double rdx01 = 4.0/(dx[0]*dx[1]); double rdx11 = 4.0/(dx[1]*dx[1]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #ifdef __CUDA_ARCH__ + atomicAdd( &csr_vals[globalIdxs[0]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[1]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[2]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[3]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[4]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[5]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[6]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[7]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[8]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[9]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[10]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[11]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[12]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[13]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[14]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[15]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[16]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[17]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[18]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[19]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[20]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[21]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[22]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[23]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[24]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[25]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[26]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[27]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[28]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[29]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[30]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[31]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[32]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[33]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[34]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[35]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[36]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[37]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[38]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[39]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[40]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[41]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[42]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[43]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[44]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[45]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[46]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[47]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[48]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[49]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[50]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[51]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[52]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[53]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[54]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[55]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[56]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[57]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[58]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[59]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[60]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[61]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[62]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[63]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + #else + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #endif } -void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_dirichletx_iny_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri) +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_dirichletx_iny_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out) { // epsilon: permittivity tensor. // kSq: wave number squared (factor multiplying phi). // dx: cell length in each direction. // bcVals: values to impose as BCs, i.e. bcVals[off+0]*phi+bcVals[off+1]*epsilon^{ij}*d(phi)/dx_j=bcVals[off+2]. // globalIdxs: global linear index of each basis function/node in current cell. - // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (CPU): triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (GPU): double array to put nonzero values of the global matrix into. + + #ifdef __CUDA_ARCH__ + double *csr_vals = (double *) out; + #else + gkyl_mat_triples *tri = (gkyl_mat_triples *) out; + #endif const double *epsxx = &epsilon[0]; const double *epsxy = &epsilon[8]; @@ -101,81 +182,155 @@ void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_dirichletx_iny_periodicy(const d double rdx01 = 4.0/(dx[0]*dx[1]); double rdx11 = 4.0/(dx[1]*dx[1]); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[0], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[7], 0.0); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[2], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[7], 0.0); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[4], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[7], 0.0); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[6], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[7], 0.0); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[0]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[1]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[2]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[3]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[4]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[5]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[6]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[7]],__double_as_longlong(0.0)); + atomicAdd( &csr_vals[globalIdxs[8]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[9]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[10]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[11]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[12]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[13]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[14]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[15]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[16]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[17]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[18]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[19]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[20]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[21]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[22]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[23]],__double_as_longlong(0.0)); + atomicAdd( &csr_vals[globalIdxs[24]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[25]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[26]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[27]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[28]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[29]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[30]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[31]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[32]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[33]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[34]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[35]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[36]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[37]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[38]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[39]],__double_as_longlong(0.0)); + atomicAdd( &csr_vals[globalIdxs[40]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[41]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[42]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[43]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[44]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[45]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[46]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[47]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[48]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[49]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[50]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[51]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[52]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[53]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[54]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[55]],__double_as_longlong(0.0)); + atomicAdd( &csr_vals[globalIdxs[56]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[57]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[58]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[59]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[60]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[61]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[62]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[63]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + #else + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[0], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[7], 0.0); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[2], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[7], 0.0); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[4], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[7], 0.0); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[6], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[7], 0.0); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #endif } -void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_neumannx_iny_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri) +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_neumannx_iny_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out) { // epsilon: permittivity tensor. // kSq: wave number squared (factor multiplying phi). // dx: cell length in each direction. // bcVals: values to impose as BCs, i.e. bcVals[off+0]*phi+bcVals[off+1]*epsilon^{ij}*d(phi)/dx_j=bcVals[off+2]. // globalIdxs: global linear index of each basis function/node in current cell. - // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (CPU): triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (GPU): double array to put nonzero values of the global matrix into. + + #ifdef __CUDA_ARCH__ + double *csr_vals = (double *) out; + #else + gkyl_mat_triples *tri = (gkyl_mat_triples *) out; + #endif const double *epsxx = &epsilon[0]; const double *epsxy = &epsilon[8]; @@ -189,70 +344,137 @@ void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_neumannx_iny_periodicy(const dou rdx2[0] = 2.0/dx[0]; rdx2[1] = 2.0/dx[1]; - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #ifdef __CUDA_ARCH__ + atomicAdd( &csr_vals[globalIdxs[0]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[1]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[2]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[3]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[4]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[5]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[6]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[7]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[8]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[9]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[10]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[11]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[12]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[13]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[14]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[15]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[16]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[17]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[18]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[19]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[20]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[21]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[22]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[23]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[24]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[25]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[26]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[27]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[28]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[29]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[30]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[31]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[32]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[33]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[34]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[35]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[36]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[37]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[38]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[39]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[40]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[41]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[42]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[43]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[44]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[45]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[46]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[47]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[48]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[49]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[50]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[51]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[52]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[53]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[54]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[55]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[56]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[57]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[58]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[59]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[60]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[61]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[62]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[63]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + #else + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #endif } diff --git a/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_lhs_stencil_lox_loy_3x_ser.c b/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_lhs_stencil_lox_loy_3x_ser.c index 2d68df8d53..85f963eec6 100644 --- a/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_lhs_stencil_lox_loy_3x_ser.c +++ b/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_lhs_stencil_lox_loy_3x_ser.c @@ -1,13 +1,20 @@ #include -void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_periodicx_loy_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri) +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_periodicx_loy_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out) { // epsilon: permittivity tensor. // kSq: wave number squared (factor multiplying phi). // dx: cell length in each direction. // bcVals: values to impose as BCs, i.e. bcVals[off+0]*phi+bcVals[off+1]*epsilon^{ij}*d(phi)/dx_j=bcVals[off+2]. // globalIdxs: global linear index of each basis function/node in current cell. - // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (CPU): triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (GPU): double array to put nonzero values of the global matrix into. + + #ifdef __CUDA_ARCH__ + double *csr_vals = (double *) out; + #else + gkyl_mat_triples *tri = (gkyl_mat_triples *) out; + #endif const double *epsxx = &epsilon[0]; const double *epsxy = &epsilon[8]; @@ -17,81 +24,155 @@ void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_periodicx_loy_periodicy(const do double rdx01 = 4.0/(dx[0]*dx[1]); double rdx11 = 4.0/(dx[1]*dx[1]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #ifdef __CUDA_ARCH__ + atomicAdd( &csr_vals[globalIdxs[0]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[1]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[2]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[3]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[4]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[5]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[6]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[7]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[8]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[9]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[10]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[11]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[12]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[13]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[14]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[15]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[16]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[17]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[18]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[19]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[20]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[21]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[22]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[23]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[24]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[25]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[26]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[27]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[28]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[29]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[30]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[31]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[32]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[33]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[34]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[35]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[36]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[37]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[38]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[39]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[40]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[41]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[42]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[43]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[44]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[45]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[46]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[47]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[48]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[49]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[50]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[51]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[52]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[53]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[54]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[55]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[56]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[57]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[58]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[59]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[60]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[61]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[62]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[63]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + #else + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #endif } -void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_periodicx_loy_dirichlety(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri) +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_periodicx_loy_dirichlety(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out) { // epsilon: permittivity tensor. // kSq: wave number squared (factor multiplying phi). // dx: cell length in each direction. // bcVals: values to impose as BCs, i.e. bcVals[off+0]*phi+bcVals[off+1]*epsilon^{ij}*d(phi)/dx_j=bcVals[off+2]. // globalIdxs: global linear index of each basis function/node in current cell. - // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (CPU): triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (GPU): double array to put nonzero values of the global matrix into. + + #ifdef __CUDA_ARCH__ + double *csr_vals = (double *) out; + #else + gkyl_mat_triples *tri = (gkyl_mat_triples *) out; + #endif const double *epsxx = &epsilon[0]; const double *epsxy = &epsilon[8]; @@ -101,81 +182,155 @@ void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_periodicx_loy_dirichlety(const d double rdx01 = 4.0/(dx[0]*dx[1]); double rdx11 = 4.0/(dx[1]*dx[1]); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[0], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[7], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[1], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[7], 0.0); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[4], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[7], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[5], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[7], 0.0); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[0]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[1]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[2]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[3]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[4]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[5]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[6]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[7]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[8]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[9]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[10]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[11]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[12]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[13]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[14]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[15]],__double_as_longlong(0.0)); + atomicAdd( &csr_vals[globalIdxs[16]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[17]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[18]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[19]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[20]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[21]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[22]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[23]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[24]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[25]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[26]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[27]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[28]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[29]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[30]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[31]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[32]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[33]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[34]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[35]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[36]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[37]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[38]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[39]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[40]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[41]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[42]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[43]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[44]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[45]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[46]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[47]],__double_as_longlong(0.0)); + atomicAdd( &csr_vals[globalIdxs[48]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[49]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[50]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[51]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[52]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[53]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[54]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[55]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[56]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[57]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[58]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[59]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[60]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[61]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[62]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[63]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + #else + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[0], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[1], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[7], 0.0); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[4], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[5], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[7], 0.0); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #endif } -void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_periodicx_loy_neumanny(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri) +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_periodicx_loy_neumanny(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out) { // epsilon: permittivity tensor. // kSq: wave number squared (factor multiplying phi). // dx: cell length in each direction. // bcVals: values to impose as BCs, i.e. bcVals[off+0]*phi+bcVals[off+1]*epsilon^{ij}*d(phi)/dx_j=bcVals[off+2]. // globalIdxs: global linear index of each basis function/node in current cell. - // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (CPU): triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (GPU): double array to put nonzero values of the global matrix into. + + #ifdef __CUDA_ARCH__ + double *csr_vals = (double *) out; + #else + gkyl_mat_triples *tri = (gkyl_mat_triples *) out; + #endif const double *epsxx = &epsilon[0]; const double *epsxy = &epsilon[8]; @@ -189,81 +344,155 @@ void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_periodicx_loy_neumanny(const dou rdx2[0] = 2.0/dx[0]; rdx2[1] = 2.0/dx[1]; - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #ifdef __CUDA_ARCH__ + atomicAdd( &csr_vals[globalIdxs[0]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[1]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[2]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[3]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[4]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[5]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[6]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[7]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[8]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[9]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[10]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[11]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[12]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[13]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[14]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[15]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[16]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[17]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[18]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[19]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[20]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[21]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[22]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[23]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[24]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[25]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[26]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[27]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[28]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[29]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[30]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[31]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[32]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[33]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[34]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[35]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[36]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[37]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[38]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[39]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[40]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[41]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[42]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[43]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[44]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[45]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[46]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[47]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[48]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[49]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[50]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[51]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[52]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[53]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[54]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[55]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[56]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[57]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[58]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[59]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[60]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[61]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[62]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[63]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + #else + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #endif } -void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_dirichletx_loy_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri) +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_dirichletx_loy_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out) { // epsilon: permittivity tensor. // kSq: wave number squared (factor multiplying phi). // dx: cell length in each direction. // bcVals: values to impose as BCs, i.e. bcVals[off+0]*phi+bcVals[off+1]*epsilon^{ij}*d(phi)/dx_j=bcVals[off+2]. // globalIdxs: global linear index of each basis function/node in current cell. - // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (CPU): triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (GPU): double array to put nonzero values of the global matrix into. + + #ifdef __CUDA_ARCH__ + double *csr_vals = (double *) out; + #else + gkyl_mat_triples *tri = (gkyl_mat_triples *) out; + #endif const double *epsxx = &epsilon[0]; const double *epsxy = &epsilon[8]; @@ -273,81 +502,155 @@ void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_dirichletx_loy_periodicy(const d double rdx01 = 4.0/(dx[0]*dx[1]); double rdx11 = 4.0/(dx[1]*dx[1]); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[0], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[7], 0.0); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[2], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[7], 0.0); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[4], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[7], 0.0); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[6], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[7], 0.0); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[0]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[1]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[2]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[3]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[4]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[5]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[6]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[7]],__double_as_longlong(0.0)); + atomicAdd( &csr_vals[globalIdxs[8]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[9]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[10]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[11]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[12]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[13]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[14]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[15]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[16]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[17]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[18]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[19]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[20]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[21]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[22]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[23]],__double_as_longlong(0.0)); + atomicAdd( &csr_vals[globalIdxs[24]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[25]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[26]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[27]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[28]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[29]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[30]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[31]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[32]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[33]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[34]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[35]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[36]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[37]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[38]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[39]],__double_as_longlong(0.0)); + atomicAdd( &csr_vals[globalIdxs[40]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[41]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[42]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[43]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[44]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[45]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[46]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[47]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[48]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[49]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[50]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[51]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[52]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[53]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[54]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[55]],__double_as_longlong(0.0)); + atomicAdd( &csr_vals[globalIdxs[56]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[57]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[58]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[59]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[60]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[61]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[62]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[63]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + #else + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[0], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[7], 0.0); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[2], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[7], 0.0); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[4], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[7], 0.0); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[6], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[7], 0.0); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #endif } -void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_dirichletx_loy_dirichlety(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri) +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_dirichletx_loy_dirichlety(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out) { // epsilon: permittivity tensor. // kSq: wave number squared (factor multiplying phi). // dx: cell length in each direction. // bcVals: values to impose as BCs, i.e. bcVals[off+0]*phi+bcVals[off+1]*epsilon^{ij}*d(phi)/dx_j=bcVals[off+2]. // globalIdxs: global linear index of each basis function/node in current cell. - // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (CPU): triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (GPU): double array to put nonzero values of the global matrix into. + + #ifdef __CUDA_ARCH__ + double *csr_vals = (double *) out; + #else + gkyl_mat_triples *tri = (gkyl_mat_triples *) out; + #endif const double *epsxx = &epsilon[0]; const double *epsxy = &epsilon[8]; @@ -357,81 +660,155 @@ void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_dirichletx_loy_dirichlety(const double rdx01 = 4.0/(dx[0]*dx[1]); double rdx11 = 4.0/(dx[1]*dx[1]); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[0], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[7], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[1], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[7], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[2], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[7], 0.0); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[4], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[7], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[5], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[7], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[6], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[7], 0.0); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[0]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[1]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[2]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[3]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[4]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[5]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[6]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[7]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[8]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[9]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[10]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[11]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[12]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[13]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[14]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[15]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[16]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[17]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[18]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[19]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[20]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[21]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[22]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[23]],__double_as_longlong(0.0)); + atomicAdd( &csr_vals[globalIdxs[24]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[25]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[26]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[27]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[28]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[29]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[30]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[31]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[32]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[33]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[34]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[35]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[36]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[37]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[38]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[39]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[40]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[41]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[42]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[43]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[44]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[45]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[46]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[47]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[48]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[49]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[50]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[51]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[52]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[53]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[54]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[55]],__double_as_longlong(0.0)); + atomicAdd( &csr_vals[globalIdxs[56]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[57]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[58]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[59]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[60]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[61]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[62]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[63]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + #else + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[0], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[1], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[2], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[7], 0.0); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[4], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[5], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[6], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[7], 0.0); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #endif } -void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_dirichletx_loy_neumanny(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri) +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_dirichletx_loy_neumanny(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out) { // epsilon: permittivity tensor. // kSq: wave number squared (factor multiplying phi). // dx: cell length in each direction. // bcVals: values to impose as BCs, i.e. bcVals[off+0]*phi+bcVals[off+1]*epsilon^{ij}*d(phi)/dx_j=bcVals[off+2]. // globalIdxs: global linear index of each basis function/node in current cell. - // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (CPU): triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (GPU): double array to put nonzero values of the global matrix into. + + #ifdef __CUDA_ARCH__ + double *csr_vals = (double *) out; + #else + gkyl_mat_triples *tri = (gkyl_mat_triples *) out; + #endif const double *epsxx = &epsilon[0]; const double *epsxy = &epsilon[8]; @@ -445,81 +822,155 @@ void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_dirichletx_loy_neumanny(const do rdx2[0] = 2.0/dx[0]; rdx2[1] = 2.0/dx[1]; - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[0], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[7], 0.0); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[2], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[7], 0.0); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[4], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[7], 0.0); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[6], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[7], 0.0); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[0]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[1]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[2]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[3]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[4]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[5]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[6]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[7]],__double_as_longlong(0.0)); + atomicAdd( &csr_vals[globalIdxs[8]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[9]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[10]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[11]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[12]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[13]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[14]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[15]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[16]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[17]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[18]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[19]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[20]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[21]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[22]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[23]],__double_as_longlong(0.0)); + atomicAdd( &csr_vals[globalIdxs[24]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[25]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[26]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[27]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[28]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[29]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[30]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[31]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[32]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[33]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[34]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[35]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[36]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[37]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[38]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[39]],__double_as_longlong(0.0)); + atomicAdd( &csr_vals[globalIdxs[40]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[41]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[42]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[43]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[44]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[45]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[46]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[47]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[48]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[49]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[50]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[51]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[52]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[53]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[54]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[55]],__double_as_longlong(0.0)); + atomicAdd( &csr_vals[globalIdxs[56]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[57]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[58]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[59]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[60]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[61]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[62]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[63]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + #else + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[0], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[7], 0.0); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[2], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[7], 0.0); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[4], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[7], 0.0); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[6], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[7], 0.0); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #endif } -void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_neumannx_loy_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri) +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_neumannx_loy_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out) { // epsilon: permittivity tensor. // kSq: wave number squared (factor multiplying phi). // dx: cell length in each direction. // bcVals: values to impose as BCs, i.e. bcVals[off+0]*phi+bcVals[off+1]*epsilon^{ij}*d(phi)/dx_j=bcVals[off+2]. // globalIdxs: global linear index of each basis function/node in current cell. - // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (CPU): triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (GPU): double array to put nonzero values of the global matrix into. + + #ifdef __CUDA_ARCH__ + double *csr_vals = (double *) out; + #else + gkyl_mat_triples *tri = (gkyl_mat_triples *) out; + #endif const double *epsxx = &epsilon[0]; const double *epsxy = &epsilon[8]; @@ -533,81 +984,155 @@ void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_neumannx_loy_periodicy(const dou rdx2[0] = 2.0/dx[0]; rdx2[1] = 2.0/dx[1]; - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #ifdef __CUDA_ARCH__ + atomicAdd( &csr_vals[globalIdxs[0]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[1]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[2]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[3]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[4]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[5]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[6]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[7]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[8]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[9]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[10]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[11]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[12]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[13]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[14]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[15]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[16]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[17]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[18]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[19]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[20]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[21]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[22]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[23]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[24]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[25]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[26]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[27]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[28]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[29]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[30]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[31]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[32]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[33]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[34]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[35]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[36]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[37]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[38]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[39]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[40]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[41]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[42]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[43]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[44]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[45]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[46]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[47]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[48]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[49]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[50]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[51]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[52]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[53]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[54]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[55]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[56]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[57]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[58]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[59]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[60]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[61]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[62]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[63]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + #else + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #endif } -void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_neumannx_loy_dirichlety(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri) +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_neumannx_loy_dirichlety(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out) { // epsilon: permittivity tensor. // kSq: wave number squared (factor multiplying phi). // dx: cell length in each direction. // bcVals: values to impose as BCs, i.e. bcVals[off+0]*phi+bcVals[off+1]*epsilon^{ij}*d(phi)/dx_j=bcVals[off+2]. // globalIdxs: global linear index of each basis function/node in current cell. - // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (CPU): triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (GPU): double array to put nonzero values of the global matrix into. + + #ifdef __CUDA_ARCH__ + double *csr_vals = (double *) out; + #else + gkyl_mat_triples *tri = (gkyl_mat_triples *) out; + #endif const double *epsxx = &epsilon[0]; const double *epsxy = &epsilon[8]; @@ -621,81 +1146,155 @@ void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_neumannx_loy_dirichlety(const do rdx2[0] = 2.0/dx[0]; rdx2[1] = 2.0/dx[1]; - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[0], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[7], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[1], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[7], 0.0); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[4], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[7], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[5], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[7], 0.0); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[0]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[1]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[2]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[3]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[4]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[5]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[6]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[7]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[8]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[9]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[10]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[11]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[12]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[13]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[14]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[15]],__double_as_longlong(0.0)); + atomicAdd( &csr_vals[globalIdxs[16]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[17]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[18]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[19]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[20]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[21]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[22]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[23]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[24]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[25]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[26]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[27]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[28]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[29]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[30]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[31]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[32]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[33]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[34]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[35]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[36]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[37]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[38]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[39]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[40]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[41]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[42]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[43]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[44]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[45]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[46]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[47]],__double_as_longlong(0.0)); + atomicAdd( &csr_vals[globalIdxs[48]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[49]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[50]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[51]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[52]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[53]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[54]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[55]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[56]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[57]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[58]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[59]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[60]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[61]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[62]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[63]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + #else + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[0], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[1], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[7], 0.0); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[4], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[5], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[7], 0.0); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #endif } -void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_neumannx_loy_neumanny(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri) +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_neumannx_loy_neumanny(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out) { // epsilon: permittivity tensor. // kSq: wave number squared (factor multiplying phi). // dx: cell length in each direction. // bcVals: values to impose as BCs, i.e. bcVals[off+0]*phi+bcVals[off+1]*epsilon^{ij}*d(phi)/dx_j=bcVals[off+2]. // globalIdxs: global linear index of each basis function/node in current cell. - // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (CPU): triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (GPU): double array to put nonzero values of the global matrix into. + + #ifdef __CUDA_ARCH__ + double *csr_vals = (double *) out; + #else + gkyl_mat_triples *tri = (gkyl_mat_triples *) out; + #endif const double *epsxx = &epsilon[0]; const double *epsxy = &epsilon[8]; @@ -709,70 +1308,137 @@ void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_neumannx_loy_neumanny(const doub rdx2[0] = 2.0/dx[0]; rdx2[1] = 2.0/dx[1]; - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #ifdef __CUDA_ARCH__ + atomicAdd( &csr_vals[globalIdxs[0]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[1]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[2]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[3]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[4]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[5]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[6]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[7]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[8]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[9]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[10]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[11]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[12]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[13]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[14]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[15]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[16]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[17]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[18]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[19]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[20]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[21]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[22]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[23]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[24]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[25]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[26]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[27]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[28]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[29]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[30]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[31]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[32]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[33]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[34]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[35]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[36]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[37]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[38]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[39]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[40]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[41]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[42]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[43]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[44]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[45]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[46]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[47]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[48]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[49]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[50]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[51]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[52]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[53]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[54]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[55]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[56]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[57]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[58]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[59]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[60]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[61]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[62]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[63]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + #else + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #endif } diff --git a/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_lhs_stencil_lox_upy_3x_ser.c b/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_lhs_stencil_lox_upy_3x_ser.c index f2751158ae..61f81256c1 100644 --- a/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_lhs_stencil_lox_upy_3x_ser.c +++ b/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_lhs_stencil_lox_upy_3x_ser.c @@ -1,13 +1,20 @@ #include -void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_periodicx_upy_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri) +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_periodicx_upy_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out) { // epsilon: permittivity tensor. // kSq: wave number squared (factor multiplying phi). // dx: cell length in each direction. // bcVals: values to impose as BCs, i.e. bcVals[off+0]*phi+bcVals[off+1]*epsilon^{ij}*d(phi)/dx_j=bcVals[off+2]. // globalIdxs: global linear index of each basis function/node in current cell. - // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (CPU): triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (GPU): double array to put nonzero values of the global matrix into. + + #ifdef __CUDA_ARCH__ + double *csr_vals = (double *) out; + #else + gkyl_mat_triples *tri = (gkyl_mat_triples *) out; + #endif const double *epsxx = &epsilon[0]; const double *epsxy = &epsilon[8]; @@ -17,81 +24,155 @@ void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_periodicx_upy_periodicy(const do double rdx01 = 4.0/(dx[0]*dx[1]); double rdx11 = 4.0/(dx[1]*dx[1]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #ifdef __CUDA_ARCH__ + atomicAdd( &csr_vals[globalIdxs[0]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[1]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[2]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[3]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[4]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[5]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[6]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[7]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[8]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[9]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[10]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[11]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[12]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[13]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[14]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[15]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[16]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[17]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[18]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[19]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[20]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[21]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[22]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[23]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[24]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[25]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[26]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[27]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[28]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[29]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[30]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[31]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[32]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[33]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[34]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[35]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[36]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[37]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[38]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[39]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[40]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[41]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[42]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[43]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[44]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[45]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[46]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[47]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[48]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[49]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[50]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[51]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[52]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[53]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[54]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[55]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[56]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[57]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[58]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[59]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[60]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[61]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[62]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[63]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + #else + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #endif } -void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_periodicx_upy_dirichlety(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri) +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_periodicx_upy_dirichlety(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out) { // epsilon: permittivity tensor. // kSq: wave number squared (factor multiplying phi). // dx: cell length in each direction. // bcVals: values to impose as BCs, i.e. bcVals[off+0]*phi+bcVals[off+1]*epsilon^{ij}*d(phi)/dx_j=bcVals[off+2]. // globalIdxs: global linear index of each basis function/node in current cell. - // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (CPU): triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (GPU): double array to put nonzero values of the global matrix into. + + #ifdef __CUDA_ARCH__ + double *csr_vals = (double *) out; + #else + gkyl_mat_triples *tri = (gkyl_mat_triples *) out; + #endif const double *epsxx = &epsilon[0]; const double *epsxy = &epsilon[8]; @@ -101,81 +182,155 @@ void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_periodicx_upy_dirichlety(const d double rdx01 = 4.0/(dx[0]*dx[1]); double rdx11 = 4.0/(dx[1]*dx[1]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[2], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[7], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[3], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[7], 0.0); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[6], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[7], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[7], 1.0); + #ifdef __CUDA_ARCH__ + atomicAdd( &csr_vals[globalIdxs[0]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[1]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[2]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[3]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[4]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[5]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[6]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[7]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[8]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[9]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[10]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[11]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[12]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[13]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[14]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[15]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[16]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[17]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[18]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[19]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[20]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[21]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[22]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[23]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[24]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[25]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[26]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[27]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[28]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[29]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[30]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[31]],__double_as_longlong(0.0)); + atomicAdd( &csr_vals[globalIdxs[32]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[33]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[34]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[35]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[36]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[37]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[38]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[39]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[40]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[41]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[42]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[43]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[44]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[45]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[46]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[47]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[48]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[49]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[50]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[51]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[52]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[53]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[54]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[55]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[56]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[57]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[58]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[59]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[60]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[61]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[62]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[63]],__double_as_longlong(1.0)); + #else + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[2], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[3], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[7], 0.0); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[6], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[7], 1.0); + #endif } -void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_periodicx_upy_neumanny(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri) +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_periodicx_upy_neumanny(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out) { // epsilon: permittivity tensor. // kSq: wave number squared (factor multiplying phi). // dx: cell length in each direction. // bcVals: values to impose as BCs, i.e. bcVals[off+0]*phi+bcVals[off+1]*epsilon^{ij}*d(phi)/dx_j=bcVals[off+2]. // globalIdxs: global linear index of each basis function/node in current cell. - // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (CPU): triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (GPU): double array to put nonzero values of the global matrix into. + + #ifdef __CUDA_ARCH__ + double *csr_vals = (double *) out; + #else + gkyl_mat_triples *tri = (gkyl_mat_triples *) out; + #endif const double *epsxx = &epsilon[0]; const double *epsxy = &epsilon[8]; @@ -189,81 +344,155 @@ void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_periodicx_upy_neumanny(const dou rdx2[0] = 2.0/dx[0]; rdx2[1] = 2.0/dx[1]; - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #ifdef __CUDA_ARCH__ + atomicAdd( &csr_vals[globalIdxs[0]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[1]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[2]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[3]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[4]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[5]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[6]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[7]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[8]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[9]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[10]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[11]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[12]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[13]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[14]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[15]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[16]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[17]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[18]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[19]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[20]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[21]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[22]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[23]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[24]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[25]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[26]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[27]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[28]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[29]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[30]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[31]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[32]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[33]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[34]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[35]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[36]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[37]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[38]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[39]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[40]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[41]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[42]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[43]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[44]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[45]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[46]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[47]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[48]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[49]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[50]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[51]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[52]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[53]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[54]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[55]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[56]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[57]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[58]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[59]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[60]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[61]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[62]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[63]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + #else + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #endif } -void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_dirichletx_upy_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri) +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_dirichletx_upy_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out) { // epsilon: permittivity tensor. // kSq: wave number squared (factor multiplying phi). // dx: cell length in each direction. // bcVals: values to impose as BCs, i.e. bcVals[off+0]*phi+bcVals[off+1]*epsilon^{ij}*d(phi)/dx_j=bcVals[off+2]. // globalIdxs: global linear index of each basis function/node in current cell. - // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (CPU): triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (GPU): double array to put nonzero values of the global matrix into. + + #ifdef __CUDA_ARCH__ + double *csr_vals = (double *) out; + #else + gkyl_mat_triples *tri = (gkyl_mat_triples *) out; + #endif const double *epsxx = &epsilon[0]; const double *epsxy = &epsilon[8]; @@ -273,81 +502,155 @@ void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_dirichletx_upy_periodicy(const d double rdx01 = 4.0/(dx[0]*dx[1]); double rdx11 = 4.0/(dx[1]*dx[1]); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[0], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[7], 0.0); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[2], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[7], 0.0); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[4], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[7], 0.0); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[6], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[7], 0.0); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[0]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[1]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[2]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[3]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[4]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[5]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[6]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[7]],__double_as_longlong(0.0)); + atomicAdd( &csr_vals[globalIdxs[8]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[9]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[10]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[11]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[12]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[13]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[14]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[15]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[16]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[17]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[18]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[19]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[20]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[21]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[22]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[23]],__double_as_longlong(0.0)); + atomicAdd( &csr_vals[globalIdxs[24]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[25]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[26]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[27]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[28]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[29]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[30]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[31]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[32]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[33]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[34]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[35]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[36]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[37]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[38]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[39]],__double_as_longlong(0.0)); + atomicAdd( &csr_vals[globalIdxs[40]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[41]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[42]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[43]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[44]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[45]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[46]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[47]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[48]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[49]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[50]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[51]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[52]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[53]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[54]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[55]],__double_as_longlong(0.0)); + atomicAdd( &csr_vals[globalIdxs[56]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[57]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[58]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[59]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[60]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[61]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[62]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[63]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + #else + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[0], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[7], 0.0); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[2], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[7], 0.0); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[4], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[7], 0.0); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[6], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[7], 0.0); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #endif } -void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_dirichletx_upy_dirichlety(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri) +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_dirichletx_upy_dirichlety(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out) { // epsilon: permittivity tensor. // kSq: wave number squared (factor multiplying phi). // dx: cell length in each direction. // bcVals: values to impose as BCs, i.e. bcVals[off+0]*phi+bcVals[off+1]*epsilon^{ij}*d(phi)/dx_j=bcVals[off+2]. // globalIdxs: global linear index of each basis function/node in current cell. - // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (CPU): triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (GPU): double array to put nonzero values of the global matrix into. + + #ifdef __CUDA_ARCH__ + double *csr_vals = (double *) out; + #else + gkyl_mat_triples *tri = (gkyl_mat_triples *) out; + #endif const double *epsxx = &epsilon[0]; const double *epsxy = &epsilon[8]; @@ -357,81 +660,155 @@ void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_dirichletx_upy_dirichlety(const double rdx01 = 4.0/(dx[0]*dx[1]); double rdx11 = 4.0/(dx[1]*dx[1]); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[0], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[7], 0.0); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[2], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[7], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[3], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[7], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[4], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[7], 0.0); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[6], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[7], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[7], 1.0); + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[0]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[1]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[2]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[3]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[4]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[5]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[6]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[7]],__double_as_longlong(0.0)); + atomicAdd( &csr_vals[globalIdxs[8]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[9]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[10]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[11]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[12]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[13]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[14]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[15]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[16]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[17]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[18]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[19]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[20]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[21]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[22]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[23]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[24]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[25]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[26]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[27]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[28]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[29]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[30]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[31]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[32]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[33]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[34]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[35]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[36]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[37]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[38]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[39]],__double_as_longlong(0.0)); + atomicAdd( &csr_vals[globalIdxs[40]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[41]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[42]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[43]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[44]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[45]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[46]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[47]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[48]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[49]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[50]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[51]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[52]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[53]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[54]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[55]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[56]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[57]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[58]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[59]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[60]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[61]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[62]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[63]],__double_as_longlong(1.0)); + #else + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[0], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[7], 0.0); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[2], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[3], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[4], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[7], 0.0); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[6], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[7], 1.0); + #endif } -void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_dirichletx_upy_neumanny(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri) +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_dirichletx_upy_neumanny(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out) { // epsilon: permittivity tensor. // kSq: wave number squared (factor multiplying phi). // dx: cell length in each direction. // bcVals: values to impose as BCs, i.e. bcVals[off+0]*phi+bcVals[off+1]*epsilon^{ij}*d(phi)/dx_j=bcVals[off+2]. // globalIdxs: global linear index of each basis function/node in current cell. - // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (CPU): triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (GPU): double array to put nonzero values of the global matrix into. + + #ifdef __CUDA_ARCH__ + double *csr_vals = (double *) out; + #else + gkyl_mat_triples *tri = (gkyl_mat_triples *) out; + #endif const double *epsxx = &epsilon[0]; const double *epsxy = &epsilon[8]; @@ -445,81 +822,155 @@ void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_dirichletx_upy_neumanny(const do rdx2[0] = 2.0/dx[0]; rdx2[1] = 2.0/dx[1]; - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[0], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[7], 0.0); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[2], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[7], 0.0); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[4], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[7], 0.0); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[6], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[7], 0.0); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[0]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[1]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[2]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[3]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[4]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[5]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[6]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[7]],__double_as_longlong(0.0)); + atomicAdd( &csr_vals[globalIdxs[8]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[9]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[10]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[11]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[12]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[13]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[14]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[15]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[16]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[17]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[18]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[19]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[20]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[21]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[22]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[23]],__double_as_longlong(0.0)); + atomicAdd( &csr_vals[globalIdxs[24]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[25]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[26]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[27]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[28]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[29]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[30]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[31]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[32]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[33]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[34]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[35]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[36]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[37]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[38]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[39]],__double_as_longlong(0.0)); + atomicAdd( &csr_vals[globalIdxs[40]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[41]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[42]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[43]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[44]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[45]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[46]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[47]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[48]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[49]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[50]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[51]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[52]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[53]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[54]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[55]],__double_as_longlong(0.0)); + atomicAdd( &csr_vals[globalIdxs[56]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[57]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[58]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[59]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[60]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[61]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[62]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[63]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + #else + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[0], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[7], 0.0); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[2], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[7], 0.0); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[4], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[7], 0.0); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[6], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[7], 0.0); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #endif } -void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_neumannx_upy_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri) +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_neumannx_upy_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out) { // epsilon: permittivity tensor. // kSq: wave number squared (factor multiplying phi). // dx: cell length in each direction. // bcVals: values to impose as BCs, i.e. bcVals[off+0]*phi+bcVals[off+1]*epsilon^{ij}*d(phi)/dx_j=bcVals[off+2]. // globalIdxs: global linear index of each basis function/node in current cell. - // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (CPU): triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (GPU): double array to put nonzero values of the global matrix into. + + #ifdef __CUDA_ARCH__ + double *csr_vals = (double *) out; + #else + gkyl_mat_triples *tri = (gkyl_mat_triples *) out; + #endif const double *epsxx = &epsilon[0]; const double *epsxy = &epsilon[8]; @@ -533,81 +984,155 @@ void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_neumannx_upy_periodicy(const dou rdx2[0] = 2.0/dx[0]; rdx2[1] = 2.0/dx[1]; - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #ifdef __CUDA_ARCH__ + atomicAdd( &csr_vals[globalIdxs[0]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[1]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[2]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[3]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[4]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[5]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[6]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[7]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[8]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[9]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[10]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[11]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[12]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[13]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[14]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[15]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[16]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[17]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[18]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[19]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[20]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[21]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[22]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[23]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[24]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[25]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[26]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[27]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[28]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[29]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[30]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[31]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[32]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[33]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[34]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[35]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[36]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[37]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[38]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[39]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[40]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[41]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[42]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[43]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[44]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[45]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[46]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[47]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[48]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[49]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[50]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[51]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[52]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[53]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[54]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[55]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[56]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[57]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[58]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[59]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[60]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[61]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[62]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[63]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + #else + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #endif } -void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_neumannx_upy_dirichlety(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri) +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_neumannx_upy_dirichlety(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out) { // epsilon: permittivity tensor. // kSq: wave number squared (factor multiplying phi). // dx: cell length in each direction. // bcVals: values to impose as BCs, i.e. bcVals[off+0]*phi+bcVals[off+1]*epsilon^{ij}*d(phi)/dx_j=bcVals[off+2]. // globalIdxs: global linear index of each basis function/node in current cell. - // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (CPU): triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (GPU): double array to put nonzero values of the global matrix into. + + #ifdef __CUDA_ARCH__ + double *csr_vals = (double *) out; + #else + gkyl_mat_triples *tri = (gkyl_mat_triples *) out; + #endif const double *epsxx = &epsilon[0]; const double *epsxy = &epsilon[8]; @@ -621,81 +1146,155 @@ void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_neumannx_upy_dirichlety(const do rdx2[0] = 2.0/dx[0]; rdx2[1] = 2.0/dx[1]; - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[2], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[7], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[3], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[7], 0.0); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[6], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[7], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[7], 1.0); + #ifdef __CUDA_ARCH__ + atomicAdd( &csr_vals[globalIdxs[0]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[1]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[2]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[3]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[4]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[5]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[6]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[7]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[8]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[9]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[10]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[11]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[12]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[13]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[14]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[15]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[16]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[17]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[18]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[19]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[20]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[21]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[22]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[23]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[24]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[25]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[26]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[27]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[28]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[29]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[30]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[31]],__double_as_longlong(0.0)); + atomicAdd( &csr_vals[globalIdxs[32]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[33]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[34]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[35]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[36]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[37]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[38]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[39]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[40]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[41]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[42]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[43]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[44]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[45]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[46]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[47]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[48]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[49]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[50]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[51]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[52]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[53]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[54]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[55]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[56]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[57]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[58]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[59]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[60]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[61]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[62]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[63]],__double_as_longlong(1.0)); + #else + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[2], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[3], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[7], 0.0); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[6], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[7], 1.0); + #endif } -void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_neumannx_upy_neumanny(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri) +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_neumannx_upy_neumanny(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out) { // epsilon: permittivity tensor. // kSq: wave number squared (factor multiplying phi). // dx: cell length in each direction. // bcVals: values to impose as BCs, i.e. bcVals[off+0]*phi+bcVals[off+1]*epsilon^{ij}*d(phi)/dx_j=bcVals[off+2]. // globalIdxs: global linear index of each basis function/node in current cell. - // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (CPU): triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (GPU): double array to put nonzero values of the global matrix into. + + #ifdef __CUDA_ARCH__ + double *csr_vals = (double *) out; + #else + gkyl_mat_triples *tri = (gkyl_mat_triples *) out; + #endif const double *epsxx = &epsilon[0]; const double *epsxy = &epsilon[8]; @@ -709,70 +1308,137 @@ void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_neumannx_upy_neumanny(const doub rdx2[0] = 2.0/dx[0]; rdx2[1] = 2.0/dx[1]; - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #ifdef __CUDA_ARCH__ + atomicAdd( &csr_vals[globalIdxs[0]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[1]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[2]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[3]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[4]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[5]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[6]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[7]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[8]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[9]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[10]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[11]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[12]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[13]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[14]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[15]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[16]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[17]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[18]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[19]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[20]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[21]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[22]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[23]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[24]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[25]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[26]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[27]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[28]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[29]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[30]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[31]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[32]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[33]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[34]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[35]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[36]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[37]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[38]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[39]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[40]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[41]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[42]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[43]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[44]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[45]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[46]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[47]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[48]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[49]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[50]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[51]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[52]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[53]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[54]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[55]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[56]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[57]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[58]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[59]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[60]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[61]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[62]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[63]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + #else + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #endif } diff --git a/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_lhs_stencil_upx_2x_ser.c b/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_lhs_stencil_upx_2x_ser.c index 5f8df257c9..6dca5ff1fe 100644 --- a/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_lhs_stencil_upx_2x_ser.c +++ b/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_lhs_stencil_upx_2x_ser.c @@ -1,77 +1,136 @@ #include -void fem_poisson_perp_lhs_stencil_2x_ser_p1_upx_periodicx(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri) +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_2x_ser_p1_upx_periodicx(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out) { // epsilon: permittivity tensor. // kSq: wave number squared (factor multiplying phi). // dx: cell length in each direction. // bcVals: values to impose as BCs, i.e. bcVals[off+0]*phi+bcVals[off+1]*epsilon^{ij}*d(phi)/dx_j=bcVals[off+2]. // globalIdxs: global linear index of each basis function/node in current cell. - // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (CPU): triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (GPU): double array to put nonzero values of the global matrix into. + + #ifdef __CUDA_ARCH__ + double *csr_vals = (double *) out; + #else + gkyl_mat_triples *tri = (gkyl_mat_triples *) out; + #endif const double *epsxx = &epsilon[0]; double rdx00 = 4.0/(dx[0]*dx[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], -(0.1443375672974064*epsxx[2]*rdx00)+0.16666666666666666*epsxx[0]*rdx00-0.16666666666666666*kSq[3]+0.19245008972987523*kSq[2]+0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], 0.1443375672974064*epsxx[2]*rdx00-0.16666666666666666*epsxx[0]*rdx00+0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], 0.08333333333333333*epsxx[0]*rdx00+0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], -(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], 0.1443375672974064*epsxx[2]*rdx00-0.16666666666666666*epsxx[0]*rdx00+0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.1443375672974064*epsxx[2]*rdx00)+0.16666666666666666*epsxx[0]*rdx00+0.16666666666666666*kSq[3]+0.19245008972987523*kSq[2]-0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], -(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.08333333333333333*epsxx[0]*rdx00-0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], 0.08333333333333333*epsxx[0]*rdx00+0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], -(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.1443375672974064*epsxx[2]*rdx00+0.16666666666666666*epsxx[0]*rdx00+0.16666666666666666*kSq[3]-0.19245008972987523*kSq[2]+0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.1443375672974064*epsxx[2]*rdx00)-0.16666666666666666*epsxx[0]*rdx00-0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], -(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.08333333333333333*epsxx[0]*rdx00-0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.1443375672974064*epsxx[2]*rdx00)-0.16666666666666666*epsxx[0]*rdx00-0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], 0.1443375672974064*epsxx[2]*rdx00+0.16666666666666666*epsxx[0]*rdx00-0.16666666666666666*kSq[3]-0.19245008972987523*kSq[2]-0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0]); + #ifdef __CUDA_ARCH__ + atomicAdd( &csr_vals[globalIdxs[0]],(-(0.1443375672974064*epsxx[2]*rdx00)+0.16666666666666666*epsxx[0]*rdx00-0.16666666666666666*kSq[3]+0.19245008972987523*kSq[2]+0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[1]],(0.1443375672974064*epsxx[2]*rdx00-0.16666666666666666*epsxx[0]*rdx00+0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[2]],(0.08333333333333333*epsxx[0]*rdx00+0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[3]],(-(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[4]],(0.1443375672974064*epsxx[2]*rdx00-0.16666666666666666*epsxx[0]*rdx00+0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[5]],(-(0.1443375672974064*epsxx[2]*rdx00)+0.16666666666666666*epsxx[0]*rdx00+0.16666666666666666*kSq[3]+0.19245008972987523*kSq[2]-0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[6]],(-(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[7]],(0.08333333333333333*epsxx[0]*rdx00-0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[8]],(0.08333333333333333*epsxx[0]*rdx00+0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[9]],(-(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[10]],(0.1443375672974064*epsxx[2]*rdx00+0.16666666666666666*epsxx[0]*rdx00+0.16666666666666666*kSq[3]-0.19245008972987523*kSq[2]+0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[11]],(-(0.1443375672974064*epsxx[2]*rdx00)-0.16666666666666666*epsxx[0]*rdx00-0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[12]],(-(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[13]],(0.08333333333333333*epsxx[0]*rdx00-0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[14]],(-(0.1443375672974064*epsxx[2]*rdx00)-0.16666666666666666*epsxx[0]*rdx00-0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[15]],(0.1443375672974064*epsxx[2]*rdx00+0.16666666666666666*epsxx[0]*rdx00-0.16666666666666666*kSq[3]-0.19245008972987523*kSq[2]-0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0])); + #else + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], -(0.1443375672974064*epsxx[2]*rdx00)+0.16666666666666666*epsxx[0]*rdx00-0.16666666666666666*kSq[3]+0.19245008972987523*kSq[2]+0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], 0.1443375672974064*epsxx[2]*rdx00-0.16666666666666666*epsxx[0]*rdx00+0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], 0.08333333333333333*epsxx[0]*rdx00+0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], -(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], 0.1443375672974064*epsxx[2]*rdx00-0.16666666666666666*epsxx[0]*rdx00+0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.1443375672974064*epsxx[2]*rdx00)+0.16666666666666666*epsxx[0]*rdx00+0.16666666666666666*kSq[3]+0.19245008972987523*kSq[2]-0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], -(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.08333333333333333*epsxx[0]*rdx00-0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], 0.08333333333333333*epsxx[0]*rdx00+0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], -(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.1443375672974064*epsxx[2]*rdx00+0.16666666666666666*epsxx[0]*rdx00+0.16666666666666666*kSq[3]-0.19245008972987523*kSq[2]+0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.1443375672974064*epsxx[2]*rdx00)-0.16666666666666666*epsxx[0]*rdx00-0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], -(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.08333333333333333*epsxx[0]*rdx00-0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.1443375672974064*epsxx[2]*rdx00)-0.16666666666666666*epsxx[0]*rdx00-0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], 0.1443375672974064*epsxx[2]*rdx00+0.16666666666666666*epsxx[0]*rdx00-0.16666666666666666*kSq[3]-0.19245008972987523*kSq[2]-0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0]); + #endif } -void fem_poisson_perp_lhs_stencil_2x_ser_p1_upx_dirichletx(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri) +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_2x_ser_p1_upx_dirichletx(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out) { // epsilon: permittivity tensor. // kSq: wave number squared (factor multiplying phi). // dx: cell length in each direction. // bcVals: values to impose as BCs, i.e. bcVals[off+0]*phi+bcVals[off+1]*epsilon^{ij}*d(phi)/dx_j=bcVals[off+2]. // globalIdxs: global linear index of each basis function/node in current cell. - // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (CPU): triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (GPU): double array to put nonzero values of the global matrix into. + + #ifdef __CUDA_ARCH__ + double *csr_vals = (double *) out; + #else + gkyl_mat_triples *tri = (gkyl_mat_triples *) out; + #endif const double *epsxx = &epsilon[0]; double rdx00 = 4.0/(dx[0]*dx[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], -(0.1443375672974064*epsxx[2]*rdx00)+0.16666666666666666*epsxx[0]*rdx00-0.16666666666666666*kSq[3]+0.19245008972987523*kSq[2]+0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], 0.1443375672974064*epsxx[2]*rdx00-0.16666666666666666*epsxx[0]*rdx00+0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], 0.08333333333333333*epsxx[0]*rdx00+0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], -(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0]); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[1], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[3], 0.0); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], 0.08333333333333333*epsxx[0]*rdx00+0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], -(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.1443375672974064*epsxx[2]*rdx00+0.16666666666666666*epsxx[0]*rdx00+0.16666666666666666*kSq[3]-0.19245008972987523*kSq[2]+0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.1443375672974064*epsxx[2]*rdx00)-0.16666666666666666*epsxx[0]*rdx00-0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0]); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[3], 1.0); + #ifdef __CUDA_ARCH__ + atomicAdd( &csr_vals[globalIdxs[0]],(-(0.1443375672974064*epsxx[2]*rdx00)+0.16666666666666666*epsxx[0]*rdx00-0.16666666666666666*kSq[3]+0.19245008972987523*kSq[2]+0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[1]],(0.1443375672974064*epsxx[2]*rdx00-0.16666666666666666*epsxx[0]*rdx00+0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[2]],(0.08333333333333333*epsxx[0]*rdx00+0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[3]],(-(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0])); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[4]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[5]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[6]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[7]],__double_as_longlong(0.0)); + atomicAdd( &csr_vals[globalIdxs[8]],(0.08333333333333333*epsxx[0]*rdx00+0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[9]],(-(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[10]],(0.1443375672974064*epsxx[2]*rdx00+0.16666666666666666*epsxx[0]*rdx00+0.16666666666666666*kSq[3]-0.19245008972987523*kSq[2]+0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[11]],(-(0.1443375672974064*epsxx[2]*rdx00)-0.16666666666666666*epsxx[0]*rdx00-0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0])); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[12]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[13]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[14]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[15]],__double_as_longlong(1.0)); + #else + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], -(0.1443375672974064*epsxx[2]*rdx00)+0.16666666666666666*epsxx[0]*rdx00-0.16666666666666666*kSq[3]+0.19245008972987523*kSq[2]+0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], 0.1443375672974064*epsxx[2]*rdx00-0.16666666666666666*epsxx[0]*rdx00+0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], 0.08333333333333333*epsxx[0]*rdx00+0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], -(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0]); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[1], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[3], 0.0); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], 0.08333333333333333*epsxx[0]*rdx00+0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], -(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.1443375672974064*epsxx[2]*rdx00+0.16666666666666666*epsxx[0]*rdx00+0.16666666666666666*kSq[3]-0.19245008972987523*kSq[2]+0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.1443375672974064*epsxx[2]*rdx00)-0.16666666666666666*epsxx[0]*rdx00-0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0]); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[3], 1.0); + #endif } -void fem_poisson_perp_lhs_stencil_2x_ser_p1_upx_neumannx(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri) +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_2x_ser_p1_upx_neumannx(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out) { // epsilon: permittivity tensor. // kSq: wave number squared (factor multiplying phi). // dx: cell length in each direction. // bcVals: values to impose as BCs, i.e. bcVals[off+0]*phi+bcVals[off+1]*epsilon^{ij}*d(phi)/dx_j=bcVals[off+2]. // globalIdxs: global linear index of each basis function/node in current cell. - // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (CPU): triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (GPU): double array to put nonzero values of the global matrix into. + + #ifdef __CUDA_ARCH__ + double *csr_vals = (double *) out; + #else + gkyl_mat_triples *tri = (gkyl_mat_triples *) out; + #endif const double *epsxx = &epsilon[0]; @@ -80,22 +139,41 @@ void fem_poisson_perp_lhs_stencil_2x_ser_p1_upx_neumannx(const double *epsilon, double rdx2[1]; rdx2[0] = 2.0/dx[0]; - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], -(0.1443375672974064*epsxx[2]*rdx00)+0.16666666666666666*epsxx[0]*rdx00-0.16666666666666666*kSq[3]+0.19245008972987523*kSq[2]+0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], 0.1443375672974064*epsxx[2]*rdx00-0.16666666666666666*epsxx[0]*rdx00+0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], 0.08333333333333333*epsxx[0]*rdx00+0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], -(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], 0.1443375672974064*epsxx[2]*rdx00-0.16666666666666666*epsxx[0]*rdx00+0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.1443375672974064*epsxx[2]*rdx00)+0.16666666666666666*epsxx[0]*rdx00+0.16666666666666666*kSq[3]+0.19245008972987523*kSq[2]-0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], -(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.08333333333333333*epsxx[0]*rdx00-0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], 0.08333333333333333*epsxx[0]*rdx00+0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], -(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.1443375672974064*epsxx[2]*rdx00+0.16666666666666666*epsxx[0]*rdx00+0.16666666666666666*kSq[3]-0.19245008972987523*kSq[2]+0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.1443375672974064*epsxx[2]*rdx00)-0.16666666666666666*epsxx[0]*rdx00-0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], -(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.08333333333333333*epsxx[0]*rdx00-0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.1443375672974064*epsxx[2]*rdx00)-0.16666666666666666*epsxx[0]*rdx00-0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], 0.1443375672974064*epsxx[2]*rdx00+0.16666666666666666*epsxx[0]*rdx00-0.16666666666666666*kSq[3]-0.19245008972987523*kSq[2]-0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0]); + #ifdef __CUDA_ARCH__ + atomicAdd( &csr_vals[globalIdxs[0]],(-(0.1443375672974064*epsxx[2]*rdx00)+0.16666666666666666*epsxx[0]*rdx00-0.16666666666666666*kSq[3]+0.19245008972987523*kSq[2]+0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[1]],(0.1443375672974064*epsxx[2]*rdx00-0.16666666666666666*epsxx[0]*rdx00+0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[2]],(0.08333333333333333*epsxx[0]*rdx00+0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[3]],(-(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[4]],(0.1443375672974064*epsxx[2]*rdx00-0.16666666666666666*epsxx[0]*rdx00+0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[5]],(-(0.1443375672974064*epsxx[2]*rdx00)+0.16666666666666666*epsxx[0]*rdx00+0.16666666666666666*kSq[3]+0.19245008972987523*kSq[2]-0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[6]],(-(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[7]],(0.08333333333333333*epsxx[0]*rdx00-0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[8]],(0.08333333333333333*epsxx[0]*rdx00+0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[9]],(-(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[10]],(0.1443375672974064*epsxx[2]*rdx00+0.16666666666666666*epsxx[0]*rdx00+0.16666666666666666*kSq[3]-0.19245008972987523*kSq[2]+0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[11]],(-(0.1443375672974064*epsxx[2]*rdx00)-0.16666666666666666*epsxx[0]*rdx00-0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[12]],(-(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[13]],(0.08333333333333333*epsxx[0]*rdx00-0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[14]],(-(0.1443375672974064*epsxx[2]*rdx00)-0.16666666666666666*epsxx[0]*rdx00-0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[15]],(0.1443375672974064*epsxx[2]*rdx00+0.16666666666666666*epsxx[0]*rdx00-0.16666666666666666*kSq[3]-0.19245008972987523*kSq[2]-0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0])); + #else + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], -(0.1443375672974064*epsxx[2]*rdx00)+0.16666666666666666*epsxx[0]*rdx00-0.16666666666666666*kSq[3]+0.19245008972987523*kSq[2]+0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], 0.1443375672974064*epsxx[2]*rdx00-0.16666666666666666*epsxx[0]*rdx00+0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], 0.08333333333333333*epsxx[0]*rdx00+0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], -(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], 0.1443375672974064*epsxx[2]*rdx00-0.16666666666666666*epsxx[0]*rdx00+0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.1443375672974064*epsxx[2]*rdx00)+0.16666666666666666*epsxx[0]*rdx00+0.16666666666666666*kSq[3]+0.19245008972987523*kSq[2]-0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], -(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.08333333333333333*epsxx[0]*rdx00-0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], 0.08333333333333333*epsxx[0]*rdx00+0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], -(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.1443375672974064*epsxx[2]*rdx00+0.16666666666666666*epsxx[0]*rdx00+0.16666666666666666*kSq[3]-0.19245008972987523*kSq[2]+0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.1443375672974064*epsxx[2]*rdx00)-0.16666666666666666*epsxx[0]*rdx00-0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], -(0.08333333333333333*epsxx[0]*rdx00)-0.05555555555555555*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.08333333333333333*epsxx[0]*rdx00-0.09622504486493762*kSq[1]-0.1111111111111111*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.1443375672974064*epsxx[2]*rdx00)-0.16666666666666666*epsxx[0]*rdx00-0.09622504486493762*kSq[2]-0.1111111111111111*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], 0.1443375672974064*epsxx[2]*rdx00+0.16666666666666666*epsxx[0]*rdx00-0.16666666666666666*kSq[3]-0.19245008972987523*kSq[2]-0.19245008972987523*kSq[1]-0.2222222222222222*kSq[0]); + #endif } diff --git a/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_lhs_stencil_upx_iny_3x_ser.c b/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_lhs_stencil_upx_iny_3x_ser.c index a2fa99c0ce..8c2cce0bef 100644 --- a/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_lhs_stencil_upx_iny_3x_ser.c +++ b/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_lhs_stencil_upx_iny_3x_ser.c @@ -1,13 +1,20 @@ #include -void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_periodicx_iny_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri) +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_periodicx_iny_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out) { // epsilon: permittivity tensor. // kSq: wave number squared (factor multiplying phi). // dx: cell length in each direction. // bcVals: values to impose as BCs, i.e. bcVals[off+0]*phi+bcVals[off+1]*epsilon^{ij}*d(phi)/dx_j=bcVals[off+2]. // globalIdxs: global linear index of each basis function/node in current cell. - // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (CPU): triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (GPU): double array to put nonzero values of the global matrix into. + + #ifdef __CUDA_ARCH__ + double *csr_vals = (double *) out; + #else + gkyl_mat_triples *tri = (gkyl_mat_triples *) out; + #endif const double *epsxx = &epsilon[0]; const double *epsxy = &epsilon[8]; @@ -17,81 +24,155 @@ void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_periodicx_iny_periodicy(const do double rdx01 = 4.0/(dx[0]*dx[1]); double rdx11 = 4.0/(dx[1]*dx[1]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #ifdef __CUDA_ARCH__ + atomicAdd( &csr_vals[globalIdxs[0]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[1]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[2]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[3]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[4]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[5]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[6]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[7]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[8]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[9]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[10]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[11]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[12]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[13]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[14]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[15]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[16]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[17]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[18]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[19]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[20]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[21]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[22]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[23]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[24]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[25]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[26]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[27]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[28]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[29]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[30]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[31]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[32]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[33]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[34]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[35]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[36]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[37]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[38]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[39]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[40]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[41]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[42]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[43]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[44]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[45]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[46]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[47]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[48]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[49]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[50]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[51]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[52]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[53]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[54]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[55]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[56]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[57]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[58]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[59]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[60]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[61]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[62]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[63]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + #else + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #endif } -void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_dirichletx_iny_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri) +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_dirichletx_iny_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out) { // epsilon: permittivity tensor. // kSq: wave number squared (factor multiplying phi). // dx: cell length in each direction. // bcVals: values to impose as BCs, i.e. bcVals[off+0]*phi+bcVals[off+1]*epsilon^{ij}*d(phi)/dx_j=bcVals[off+2]. // globalIdxs: global linear index of each basis function/node in current cell. - // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (CPU): triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (GPU): double array to put nonzero values of the global matrix into. + + #ifdef __CUDA_ARCH__ + double *csr_vals = (double *) out; + #else + gkyl_mat_triples *tri = (gkyl_mat_triples *) out; + #endif const double *epsxx = &epsilon[0]; const double *epsxy = &epsilon[8]; @@ -101,81 +182,155 @@ void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_dirichletx_iny_periodicy(const d double rdx01 = 4.0/(dx[0]*dx[1]); double rdx11 = 4.0/(dx[1]*dx[1]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[1], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[7], 0.0); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[3], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[7], 0.0); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[5], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[7], 0.0); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[7], 1.0); + #ifdef __CUDA_ARCH__ + atomicAdd( &csr_vals[globalIdxs[0]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[1]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[2]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[3]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[4]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[5]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[6]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[7]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[8]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[9]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[10]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[11]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[12]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[13]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[14]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[15]],__double_as_longlong(0.0)); + atomicAdd( &csr_vals[globalIdxs[16]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[17]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[18]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[19]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[20]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[21]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[22]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[23]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[24]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[25]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[26]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[27]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[28]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[29]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[30]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[31]],__double_as_longlong(0.0)); + atomicAdd( &csr_vals[globalIdxs[32]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[33]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[34]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[35]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[36]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[37]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[38]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[39]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[40]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[41]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[42]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[43]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[44]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[45]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[46]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[47]],__double_as_longlong(0.0)); + atomicAdd( &csr_vals[globalIdxs[48]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[49]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[50]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[51]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[52]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[53]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[54]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[55]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[56]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[57]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[58]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[59]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[60]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[61]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[62]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[63]],__double_as_longlong(1.0)); + #else + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[1], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[7], 0.0); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[3], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[7], 0.0); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[5], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[7], 0.0); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[7], 1.0); + #endif } -void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_neumannx_iny_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri) +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_neumannx_iny_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out) { // epsilon: permittivity tensor. // kSq: wave number squared (factor multiplying phi). // dx: cell length in each direction. // bcVals: values to impose as BCs, i.e. bcVals[off+0]*phi+bcVals[off+1]*epsilon^{ij}*d(phi)/dx_j=bcVals[off+2]. // globalIdxs: global linear index of each basis function/node in current cell. - // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (CPU): triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (GPU): double array to put nonzero values of the global matrix into. + + #ifdef __CUDA_ARCH__ + double *csr_vals = (double *) out; + #else + gkyl_mat_triples *tri = (gkyl_mat_triples *) out; + #endif const double *epsxx = &epsilon[0]; const double *epsxy = &epsilon[8]; @@ -189,70 +344,137 @@ void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_neumannx_iny_periodicy(const dou rdx2[0] = 2.0/dx[0]; rdx2[1] = 2.0/dx[1]; - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #ifdef __CUDA_ARCH__ + atomicAdd( &csr_vals[globalIdxs[0]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[1]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[2]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[3]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[4]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[5]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[6]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[7]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[8]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[9]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[10]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[11]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[12]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[13]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[14]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[15]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[16]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[17]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[18]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[19]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[20]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[21]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[22]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[23]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[24]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[25]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[26]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[27]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[28]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[29]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[30]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[31]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[32]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[33]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[34]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[35]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[36]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[37]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[38]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[39]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[40]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[41]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[42]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[43]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[44]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[45]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[46]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[47]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[48]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[49]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[50]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[51]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[52]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[53]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[54]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[55]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[56]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[57]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[58]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[59]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[60]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[61]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[62]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[63]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + #else + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #endif } diff --git a/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_lhs_stencil_upx_loy_3x_ser.c b/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_lhs_stencil_upx_loy_3x_ser.c index 0feaa8047e..528fe16993 100644 --- a/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_lhs_stencil_upx_loy_3x_ser.c +++ b/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_lhs_stencil_upx_loy_3x_ser.c @@ -1,13 +1,20 @@ #include -void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_periodicx_loy_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri) +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_periodicx_loy_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out) { // epsilon: permittivity tensor. // kSq: wave number squared (factor multiplying phi). // dx: cell length in each direction. // bcVals: values to impose as BCs, i.e. bcVals[off+0]*phi+bcVals[off+1]*epsilon^{ij}*d(phi)/dx_j=bcVals[off+2]. // globalIdxs: global linear index of each basis function/node in current cell. - // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (CPU): triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (GPU): double array to put nonzero values of the global matrix into. + + #ifdef __CUDA_ARCH__ + double *csr_vals = (double *) out; + #else + gkyl_mat_triples *tri = (gkyl_mat_triples *) out; + #endif const double *epsxx = &epsilon[0]; const double *epsxy = &epsilon[8]; @@ -17,81 +24,155 @@ void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_periodicx_loy_periodicy(const do double rdx01 = 4.0/(dx[0]*dx[1]); double rdx11 = 4.0/(dx[1]*dx[1]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #ifdef __CUDA_ARCH__ + atomicAdd( &csr_vals[globalIdxs[0]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[1]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[2]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[3]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[4]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[5]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[6]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[7]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[8]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[9]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[10]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[11]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[12]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[13]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[14]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[15]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[16]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[17]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[18]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[19]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[20]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[21]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[22]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[23]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[24]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[25]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[26]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[27]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[28]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[29]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[30]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[31]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[32]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[33]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[34]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[35]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[36]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[37]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[38]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[39]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[40]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[41]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[42]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[43]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[44]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[45]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[46]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[47]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[48]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[49]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[50]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[51]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[52]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[53]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[54]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[55]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[56]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[57]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[58]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[59]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[60]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[61]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[62]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[63]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + #else + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #endif } -void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_periodicx_loy_dirichlety(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri) +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_periodicx_loy_dirichlety(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out) { // epsilon: permittivity tensor. // kSq: wave number squared (factor multiplying phi). // dx: cell length in each direction. // bcVals: values to impose as BCs, i.e. bcVals[off+0]*phi+bcVals[off+1]*epsilon^{ij}*d(phi)/dx_j=bcVals[off+2]. // globalIdxs: global linear index of each basis function/node in current cell. - // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (CPU): triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (GPU): double array to put nonzero values of the global matrix into. + + #ifdef __CUDA_ARCH__ + double *csr_vals = (double *) out; + #else + gkyl_mat_triples *tri = (gkyl_mat_triples *) out; + #endif const double *epsxx = &epsilon[0]; const double *epsxy = &epsilon[8]; @@ -101,81 +182,155 @@ void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_periodicx_loy_dirichlety(const d double rdx01 = 4.0/(dx[0]*dx[1]); double rdx11 = 4.0/(dx[1]*dx[1]); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[0], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[7], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[1], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[7], 0.0); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[4], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[7], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[5], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[7], 0.0); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[0]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[1]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[2]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[3]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[4]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[5]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[6]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[7]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[8]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[9]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[10]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[11]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[12]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[13]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[14]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[15]],__double_as_longlong(0.0)); + atomicAdd( &csr_vals[globalIdxs[16]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[17]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[18]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[19]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[20]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[21]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[22]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[23]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[24]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[25]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[26]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[27]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[28]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[29]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[30]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[31]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[32]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[33]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[34]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[35]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[36]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[37]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[38]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[39]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[40]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[41]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[42]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[43]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[44]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[45]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[46]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[47]],__double_as_longlong(0.0)); + atomicAdd( &csr_vals[globalIdxs[48]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[49]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[50]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[51]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[52]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[53]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[54]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[55]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[56]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[57]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[58]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[59]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[60]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[61]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[62]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[63]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + #else + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[0], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[1], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[7], 0.0); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[4], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[5], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[7], 0.0); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #endif } -void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_periodicx_loy_neumanny(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri) +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_periodicx_loy_neumanny(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out) { // epsilon: permittivity tensor. // kSq: wave number squared (factor multiplying phi). // dx: cell length in each direction. // bcVals: values to impose as BCs, i.e. bcVals[off+0]*phi+bcVals[off+1]*epsilon^{ij}*d(phi)/dx_j=bcVals[off+2]. // globalIdxs: global linear index of each basis function/node in current cell. - // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (CPU): triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (GPU): double array to put nonzero values of the global matrix into. + + #ifdef __CUDA_ARCH__ + double *csr_vals = (double *) out; + #else + gkyl_mat_triples *tri = (gkyl_mat_triples *) out; + #endif const double *epsxx = &epsilon[0]; const double *epsxy = &epsilon[8]; @@ -189,81 +344,155 @@ void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_periodicx_loy_neumanny(const dou rdx2[0] = 2.0/dx[0]; rdx2[1] = 2.0/dx[1]; - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #ifdef __CUDA_ARCH__ + atomicAdd( &csr_vals[globalIdxs[0]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[1]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[2]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[3]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[4]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[5]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[6]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[7]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[8]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[9]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[10]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[11]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[12]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[13]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[14]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[15]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[16]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[17]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[18]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[19]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[20]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[21]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[22]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[23]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[24]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[25]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[26]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[27]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[28]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[29]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[30]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[31]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[32]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[33]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[34]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[35]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[36]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[37]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[38]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[39]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[40]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[41]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[42]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[43]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[44]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[45]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[46]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[47]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[48]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[49]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[50]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[51]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[52]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[53]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[54]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[55]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[56]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[57]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[58]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[59]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[60]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[61]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[62]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[63]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + #else + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #endif } -void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_dirichletx_loy_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri) +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_dirichletx_loy_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out) { // epsilon: permittivity tensor. // kSq: wave number squared (factor multiplying phi). // dx: cell length in each direction. // bcVals: values to impose as BCs, i.e. bcVals[off+0]*phi+bcVals[off+1]*epsilon^{ij}*d(phi)/dx_j=bcVals[off+2]. // globalIdxs: global linear index of each basis function/node in current cell. - // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (CPU): triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (GPU): double array to put nonzero values of the global matrix into. + + #ifdef __CUDA_ARCH__ + double *csr_vals = (double *) out; + #else + gkyl_mat_triples *tri = (gkyl_mat_triples *) out; + #endif const double *epsxx = &epsilon[0]; const double *epsxy = &epsilon[8]; @@ -273,81 +502,155 @@ void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_dirichletx_loy_periodicy(const d double rdx01 = 4.0/(dx[0]*dx[1]); double rdx11 = 4.0/(dx[1]*dx[1]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[1], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[7], 0.0); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[3], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[7], 0.0); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[5], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[7], 0.0); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[7], 1.0); + #ifdef __CUDA_ARCH__ + atomicAdd( &csr_vals[globalIdxs[0]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[1]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[2]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[3]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[4]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[5]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[6]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[7]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[8]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[9]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[10]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[11]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[12]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[13]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[14]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[15]],__double_as_longlong(0.0)); + atomicAdd( &csr_vals[globalIdxs[16]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[17]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[18]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[19]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[20]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[21]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[22]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[23]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[24]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[25]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[26]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[27]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[28]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[29]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[30]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[31]],__double_as_longlong(0.0)); + atomicAdd( &csr_vals[globalIdxs[32]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[33]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[34]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[35]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[36]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[37]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[38]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[39]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[40]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[41]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[42]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[43]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[44]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[45]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[46]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[47]],__double_as_longlong(0.0)); + atomicAdd( &csr_vals[globalIdxs[48]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[49]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[50]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[51]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[52]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[53]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[54]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[55]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[56]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[57]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[58]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[59]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[60]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[61]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[62]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[63]],__double_as_longlong(1.0)); + #else + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[1], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[7], 0.0); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[3], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[7], 0.0); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[5], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[7], 0.0); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[7], 1.0); + #endif } -void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_dirichletx_loy_dirichlety(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri) +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_dirichletx_loy_dirichlety(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out) { // epsilon: permittivity tensor. // kSq: wave number squared (factor multiplying phi). // dx: cell length in each direction. // bcVals: values to impose as BCs, i.e. bcVals[off+0]*phi+bcVals[off+1]*epsilon^{ij}*d(phi)/dx_j=bcVals[off+2]. // globalIdxs: global linear index of each basis function/node in current cell. - // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (CPU): triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (GPU): double array to put nonzero values of the global matrix into. + + #ifdef __CUDA_ARCH__ + double *csr_vals = (double *) out; + #else + gkyl_mat_triples *tri = (gkyl_mat_triples *) out; + #endif const double *epsxx = &epsilon[0]; const double *epsxy = &epsilon[8]; @@ -357,81 +660,155 @@ void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_dirichletx_loy_dirichlety(const double rdx01 = 4.0/(dx[0]*dx[1]); double rdx11 = 4.0/(dx[1]*dx[1]); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[0], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[7], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[1], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[7], 0.0); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[3], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[7], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[4], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[7], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[5], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[7], 0.0); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[7], 1.0); + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[0]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[1]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[2]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[3]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[4]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[5]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[6]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[7]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[8]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[9]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[10]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[11]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[12]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[13]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[14]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[15]],__double_as_longlong(0.0)); + atomicAdd( &csr_vals[globalIdxs[16]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[17]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[18]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[19]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[20]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[21]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[22]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[23]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[24]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[25]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[26]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[27]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[28]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[29]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[30]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[31]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[32]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[33]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[34]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[35]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[36]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[37]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[38]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[39]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[40]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[41]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[42]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[43]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[44]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[45]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[46]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[47]],__double_as_longlong(0.0)); + atomicAdd( &csr_vals[globalIdxs[48]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[49]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[50]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[51]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[52]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[53]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[54]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[55]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[56]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[57]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[58]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[59]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[60]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[61]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[62]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[63]],__double_as_longlong(1.0)); + #else + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[0], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[1], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[7], 0.0); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[3], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[4], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[5], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[7], 0.0); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[7], 1.0); + #endif } -void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_dirichletx_loy_neumanny(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri) +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_dirichletx_loy_neumanny(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out) { // epsilon: permittivity tensor. // kSq: wave number squared (factor multiplying phi). // dx: cell length in each direction. // bcVals: values to impose as BCs, i.e. bcVals[off+0]*phi+bcVals[off+1]*epsilon^{ij}*d(phi)/dx_j=bcVals[off+2]. // globalIdxs: global linear index of each basis function/node in current cell. - // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (CPU): triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (GPU): double array to put nonzero values of the global matrix into. + + #ifdef __CUDA_ARCH__ + double *csr_vals = (double *) out; + #else + gkyl_mat_triples *tri = (gkyl_mat_triples *) out; + #endif const double *epsxx = &epsilon[0]; const double *epsxy = &epsilon[8]; @@ -445,81 +822,155 @@ void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_dirichletx_loy_neumanny(const do rdx2[0] = 2.0/dx[0]; rdx2[1] = 2.0/dx[1]; - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[1], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[7], 0.0); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[3], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[7], 0.0); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[5], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[7], 0.0); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[7], 1.0); + #ifdef __CUDA_ARCH__ + atomicAdd( &csr_vals[globalIdxs[0]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[1]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[2]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[3]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[4]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[5]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[6]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[7]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[8]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[9]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[10]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[11]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[12]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[13]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[14]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[15]],__double_as_longlong(0.0)); + atomicAdd( &csr_vals[globalIdxs[16]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[17]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[18]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[19]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[20]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[21]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[22]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[23]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[24]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[25]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[26]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[27]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[28]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[29]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[30]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[31]],__double_as_longlong(0.0)); + atomicAdd( &csr_vals[globalIdxs[32]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[33]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[34]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[35]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[36]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[37]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[38]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[39]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[40]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[41]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[42]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[43]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[44]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[45]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[46]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[47]],__double_as_longlong(0.0)); + atomicAdd( &csr_vals[globalIdxs[48]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[49]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[50]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[51]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[52]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[53]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[54]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[55]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[56]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[57]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[58]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[59]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[60]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[61]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[62]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[63]],__double_as_longlong(1.0)); + #else + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[1], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[7], 0.0); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[3], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[7], 0.0); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[5], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[7], 0.0); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[7], 1.0); + #endif } -void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_neumannx_loy_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri) +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_neumannx_loy_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out) { // epsilon: permittivity tensor. // kSq: wave number squared (factor multiplying phi). // dx: cell length in each direction. // bcVals: values to impose as BCs, i.e. bcVals[off+0]*phi+bcVals[off+1]*epsilon^{ij}*d(phi)/dx_j=bcVals[off+2]. // globalIdxs: global linear index of each basis function/node in current cell. - // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (CPU): triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (GPU): double array to put nonzero values of the global matrix into. + + #ifdef __CUDA_ARCH__ + double *csr_vals = (double *) out; + #else + gkyl_mat_triples *tri = (gkyl_mat_triples *) out; + #endif const double *epsxx = &epsilon[0]; const double *epsxy = &epsilon[8]; @@ -533,81 +984,155 @@ void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_neumannx_loy_periodicy(const dou rdx2[0] = 2.0/dx[0]; rdx2[1] = 2.0/dx[1]; - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #ifdef __CUDA_ARCH__ + atomicAdd( &csr_vals[globalIdxs[0]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[1]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[2]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[3]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[4]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[5]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[6]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[7]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[8]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[9]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[10]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[11]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[12]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[13]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[14]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[15]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[16]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[17]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[18]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[19]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[20]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[21]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[22]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[23]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[24]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[25]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[26]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[27]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[28]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[29]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[30]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[31]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[32]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[33]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[34]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[35]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[36]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[37]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[38]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[39]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[40]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[41]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[42]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[43]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[44]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[45]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[46]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[47]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[48]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[49]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[50]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[51]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[52]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[53]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[54]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[55]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[56]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[57]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[58]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[59]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[60]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[61]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[62]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[63]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + #else + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #endif } -void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_neumannx_loy_dirichlety(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri) +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_neumannx_loy_dirichlety(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out) { // epsilon: permittivity tensor. // kSq: wave number squared (factor multiplying phi). // dx: cell length in each direction. // bcVals: values to impose as BCs, i.e. bcVals[off+0]*phi+bcVals[off+1]*epsilon^{ij}*d(phi)/dx_j=bcVals[off+2]. // globalIdxs: global linear index of each basis function/node in current cell. - // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (CPU): triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (GPU): double array to put nonzero values of the global matrix into. + + #ifdef __CUDA_ARCH__ + double *csr_vals = (double *) out; + #else + gkyl_mat_triples *tri = (gkyl_mat_triples *) out; + #endif const double *epsxx = &epsilon[0]; const double *epsxy = &epsilon[8]; @@ -621,81 +1146,155 @@ void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_neumannx_loy_dirichlety(const do rdx2[0] = 2.0/dx[0]; rdx2[1] = 2.0/dx[1]; - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[0], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[7], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[1], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[7], 0.0); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[4], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[7], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[5], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[7], 0.0); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #ifdef __CUDA_ARCH__ + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[0]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[1]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[2]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[3]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[4]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[5]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[6]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[7]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[8]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[9]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[10]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[11]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[12]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[13]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[14]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[15]],__double_as_longlong(0.0)); + atomicAdd( &csr_vals[globalIdxs[16]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[17]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[18]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[19]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[20]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[21]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[22]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[23]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[24]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[25]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[26]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[27]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[28]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[29]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[30]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[31]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[32]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[33]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[34]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[35]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[36]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[37]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[38]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[39]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[40]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[41]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[42]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[43]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[44]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[45]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[46]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[47]],__double_as_longlong(0.0)); + atomicAdd( &csr_vals[globalIdxs[48]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[49]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[50]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[51]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[52]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[53]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[54]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[55]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[56]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[57]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[58]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[59]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[60]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[61]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[62]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[63]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + #else + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[0], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[0], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[1], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[7], 0.0); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[4], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[4], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[5], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[7], 0.0); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #endif } -void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_neumannx_loy_neumanny(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri) +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_neumannx_loy_neumanny(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out) { // epsilon: permittivity tensor. // kSq: wave number squared (factor multiplying phi). // dx: cell length in each direction. // bcVals: values to impose as BCs, i.e. bcVals[off+0]*phi+bcVals[off+1]*epsilon^{ij}*d(phi)/dx_j=bcVals[off+2]. // globalIdxs: global linear index of each basis function/node in current cell. - // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (CPU): triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (GPU): double array to put nonzero values of the global matrix into. + + #ifdef __CUDA_ARCH__ + double *csr_vals = (double *) out; + #else + gkyl_mat_triples *tri = (gkyl_mat_triples *) out; + #endif const double *epsxx = &epsilon[0]; const double *epsxy = &epsilon[8]; @@ -709,70 +1308,137 @@ void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_neumannx_loy_neumanny(const doub rdx2[0] = 2.0/dx[0]; rdx2[1] = 2.0/dx[1]; - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #ifdef __CUDA_ARCH__ + atomicAdd( &csr_vals[globalIdxs[0]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[1]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[2]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[3]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[4]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[5]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[6]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[7]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[8]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[9]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[10]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[11]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[12]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[13]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[14]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[15]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[16]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[17]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[18]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[19]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[20]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[21]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[22]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[23]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[24]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[25]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[26]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[27]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[28]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[29]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[30]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[31]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[32]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[33]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[34]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[35]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[36]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[37]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[38]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[39]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[40]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[41]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[42]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[43]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[44]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[45]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[46]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[47]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[48]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[49]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[50]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[51]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[52]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[53]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[54]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[55]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[56]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[57]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[58]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[59]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[60]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[61]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[62]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[63]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + #else + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #endif } diff --git a/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_lhs_stencil_upx_upy_3x_ser.c b/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_lhs_stencil_upx_upy_3x_ser.c index 6227274dd9..0cb804ab77 100644 --- a/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_lhs_stencil_upx_upy_3x_ser.c +++ b/gyrokinetic/ker/fem_poisson_perp/fem_poisson_perp_lhs_stencil_upx_upy_3x_ser.c @@ -1,13 +1,20 @@ #include -void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_periodicx_upy_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri) +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_periodicx_upy_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out) { // epsilon: permittivity tensor. // kSq: wave number squared (factor multiplying phi). // dx: cell length in each direction. // bcVals: values to impose as BCs, i.e. bcVals[off+0]*phi+bcVals[off+1]*epsilon^{ij}*d(phi)/dx_j=bcVals[off+2]. // globalIdxs: global linear index of each basis function/node in current cell. - // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (CPU): triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (GPU): double array to put nonzero values of the global matrix into. + + #ifdef __CUDA_ARCH__ + double *csr_vals = (double *) out; + #else + gkyl_mat_triples *tri = (gkyl_mat_triples *) out; + #endif const double *epsxx = &epsilon[0]; const double *epsxy = &epsilon[8]; @@ -17,81 +24,155 @@ void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_periodicx_upy_periodicy(const do double rdx01 = 4.0/(dx[0]*dx[1]); double rdx11 = 4.0/(dx[1]*dx[1]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #ifdef __CUDA_ARCH__ + atomicAdd( &csr_vals[globalIdxs[0]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[1]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[2]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[3]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[4]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[5]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[6]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[7]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[8]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[9]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[10]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[11]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[12]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[13]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[14]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[15]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[16]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[17]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[18]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[19]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[20]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[21]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[22]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[23]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[24]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[25]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[26]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[27]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[28]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[29]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[30]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[31]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[32]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[33]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[34]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[35]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[36]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[37]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[38]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[39]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[40]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[41]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[42]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[43]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[44]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[45]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[46]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[47]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[48]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[49]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[50]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[51]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[52]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[53]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[54]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[55]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[56]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[57]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[58]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[59]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[60]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[61]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[62]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[63]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + #else + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #endif } -void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_periodicx_upy_dirichlety(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri) +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_periodicx_upy_dirichlety(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out) { // epsilon: permittivity tensor. // kSq: wave number squared (factor multiplying phi). // dx: cell length in each direction. // bcVals: values to impose as BCs, i.e. bcVals[off+0]*phi+bcVals[off+1]*epsilon^{ij}*d(phi)/dx_j=bcVals[off+2]. // globalIdxs: global linear index of each basis function/node in current cell. - // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (CPU): triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (GPU): double array to put nonzero values of the global matrix into. + + #ifdef __CUDA_ARCH__ + double *csr_vals = (double *) out; + #else + gkyl_mat_triples *tri = (gkyl_mat_triples *) out; + #endif const double *epsxx = &epsilon[0]; const double *epsxy = &epsilon[8]; @@ -101,81 +182,155 @@ void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_periodicx_upy_dirichlety(const d double rdx01 = 4.0/(dx[0]*dx[1]); double rdx11 = 4.0/(dx[1]*dx[1]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[2], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[7], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[3], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[7], 0.0); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[6], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[7], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[7], 1.0); + #ifdef __CUDA_ARCH__ + atomicAdd( &csr_vals[globalIdxs[0]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[1]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[2]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[3]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[4]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[5]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[6]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[7]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[8]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[9]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[10]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[11]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[12]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[13]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[14]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[15]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[16]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[17]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[18]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[19]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[20]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[21]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[22]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[23]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[24]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[25]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[26]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[27]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[28]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[29]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[30]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[31]],__double_as_longlong(0.0)); + atomicAdd( &csr_vals[globalIdxs[32]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[33]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[34]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[35]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[36]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[37]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[38]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[39]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[40]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[41]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[42]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[43]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[44]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[45]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[46]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[47]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[48]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[49]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[50]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[51]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[52]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[53]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[54]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[55]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[56]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[57]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[58]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[59]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[60]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[61]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[62]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[63]],__double_as_longlong(1.0)); + #else + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[2], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[3], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[7], 0.0); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[6], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[7], 1.0); + #endif } -void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_periodicx_upy_neumanny(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri) +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_periodicx_upy_neumanny(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out) { // epsilon: permittivity tensor. // kSq: wave number squared (factor multiplying phi). // dx: cell length in each direction. // bcVals: values to impose as BCs, i.e. bcVals[off+0]*phi+bcVals[off+1]*epsilon^{ij}*d(phi)/dx_j=bcVals[off+2]. // globalIdxs: global linear index of each basis function/node in current cell. - // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (CPU): triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (GPU): double array to put nonzero values of the global matrix into. + + #ifdef __CUDA_ARCH__ + double *csr_vals = (double *) out; + #else + gkyl_mat_triples *tri = (gkyl_mat_triples *) out; + #endif const double *epsxx = &epsilon[0]; const double *epsxy = &epsilon[8]; @@ -189,81 +344,155 @@ void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_periodicx_upy_neumanny(const dou rdx2[0] = 2.0/dx[0]; rdx2[1] = 2.0/dx[1]; - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #ifdef __CUDA_ARCH__ + atomicAdd( &csr_vals[globalIdxs[0]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[1]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[2]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[3]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[4]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[5]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[6]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[7]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[8]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[9]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[10]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[11]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[12]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[13]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[14]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[15]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[16]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[17]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[18]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[19]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[20]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[21]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[22]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[23]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[24]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[25]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[26]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[27]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[28]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[29]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[30]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[31]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[32]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[33]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[34]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[35]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[36]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[37]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[38]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[39]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[40]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[41]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[42]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[43]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[44]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[45]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[46]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[47]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[48]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[49]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[50]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[51]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[52]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[53]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[54]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[55]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[56]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[57]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[58]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[59]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[60]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[61]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[62]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[63]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + #else + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #endif } -void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_dirichletx_upy_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri) +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_dirichletx_upy_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out) { // epsilon: permittivity tensor. // kSq: wave number squared (factor multiplying phi). // dx: cell length in each direction. // bcVals: values to impose as BCs, i.e. bcVals[off+0]*phi+bcVals[off+1]*epsilon^{ij}*d(phi)/dx_j=bcVals[off+2]. // globalIdxs: global linear index of each basis function/node in current cell. - // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (CPU): triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (GPU): double array to put nonzero values of the global matrix into. + + #ifdef __CUDA_ARCH__ + double *csr_vals = (double *) out; + #else + gkyl_mat_triples *tri = (gkyl_mat_triples *) out; + #endif const double *epsxx = &epsilon[0]; const double *epsxy = &epsilon[8]; @@ -273,81 +502,155 @@ void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_dirichletx_upy_periodicy(const d double rdx01 = 4.0/(dx[0]*dx[1]); double rdx11 = 4.0/(dx[1]*dx[1]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[1], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[7], 0.0); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[3], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[7], 0.0); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[5], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[7], 0.0); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[7], 1.0); + #ifdef __CUDA_ARCH__ + atomicAdd( &csr_vals[globalIdxs[0]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[1]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[2]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[3]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[4]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[5]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[6]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[7]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[8]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[9]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[10]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[11]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[12]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[13]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[14]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[15]],__double_as_longlong(0.0)); + atomicAdd( &csr_vals[globalIdxs[16]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[17]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[18]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[19]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[20]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[21]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[22]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[23]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[24]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[25]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[26]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[27]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[28]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[29]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[30]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[31]],__double_as_longlong(0.0)); + atomicAdd( &csr_vals[globalIdxs[32]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[33]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[34]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[35]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[36]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[37]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[38]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[39]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[40]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[41]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[42]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[43]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[44]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[45]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[46]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[47]],__double_as_longlong(0.0)); + atomicAdd( &csr_vals[globalIdxs[48]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[49]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[50]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[51]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[52]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[53]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[54]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[55]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[56]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[57]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[58]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[59]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[60]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[61]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[62]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[63]],__double_as_longlong(1.0)); + #else + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[1], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[7], 0.0); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[3], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[7], 0.0); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[5], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[7], 0.0); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[7], 1.0); + #endif } -void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_dirichletx_upy_dirichlety(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri) +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_dirichletx_upy_dirichlety(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out) { // epsilon: permittivity tensor. // kSq: wave number squared (factor multiplying phi). // dx: cell length in each direction. // bcVals: values to impose as BCs, i.e. bcVals[off+0]*phi+bcVals[off+1]*epsilon^{ij}*d(phi)/dx_j=bcVals[off+2]. // globalIdxs: global linear index of each basis function/node in current cell. - // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (CPU): triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (GPU): double array to put nonzero values of the global matrix into. + + #ifdef __CUDA_ARCH__ + double *csr_vals = (double *) out; + #else + gkyl_mat_triples *tri = (gkyl_mat_triples *) out; + #endif const double *epsxx = &epsilon[0]; const double *epsxy = &epsilon[8]; @@ -357,81 +660,155 @@ void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_dirichletx_upy_dirichlety(const double rdx01 = 4.0/(dx[0]*dx[1]); double rdx11 = 4.0/(dx[1]*dx[1]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[1], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[7], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[2], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[7], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[3], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[7], 0.0); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[5], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[7], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[6], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[7], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[7], 1.0); + #ifdef __CUDA_ARCH__ + atomicAdd( &csr_vals[globalIdxs[0]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[1]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[2]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[3]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[4]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[5]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[6]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[7]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[8]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[9]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[10]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[11]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[12]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[13]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[14]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[15]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[16]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[17]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[18]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[19]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[20]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[21]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[22]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[23]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[24]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[25]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[26]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[27]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[28]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[29]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[30]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[31]],__double_as_longlong(0.0)); + atomicAdd( &csr_vals[globalIdxs[32]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[33]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[34]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[35]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[36]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[37]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[38]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[39]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[40]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[41]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[42]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[43]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[44]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[45]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[46]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[47]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[48]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[49]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[50]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[51]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[52]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[53]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[54]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[55]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[56]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[57]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[58]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[59]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[60]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[61]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[62]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[63]],__double_as_longlong(1.0)); + #else + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[1], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[2], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[3], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[7], 0.0); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[5], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[6], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[7], 1.0); + #endif } -void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_dirichletx_upy_neumanny(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri) +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_dirichletx_upy_neumanny(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out) { // epsilon: permittivity tensor. // kSq: wave number squared (factor multiplying phi). // dx: cell length in each direction. // bcVals: values to impose as BCs, i.e. bcVals[off+0]*phi+bcVals[off+1]*epsilon^{ij}*d(phi)/dx_j=bcVals[off+2]. // globalIdxs: global linear index of each basis function/node in current cell. - // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (CPU): triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (GPU): double array to put nonzero values of the global matrix into. + + #ifdef __CUDA_ARCH__ + double *csr_vals = (double *) out; + #else + gkyl_mat_triples *tri = (gkyl_mat_triples *) out; + #endif const double *epsxx = &epsilon[0]; const double *epsxy = &epsilon[8]; @@ -445,81 +822,155 @@ void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_dirichletx_upy_neumanny(const do rdx2[0] = 2.0/dx[0]; rdx2[1] = 2.0/dx[1]; - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[1], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[7], 0.0); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[3], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[7], 0.0); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[5], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[7], 0.0); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[7], 1.0); + #ifdef __CUDA_ARCH__ + atomicAdd( &csr_vals[globalIdxs[0]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[1]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[2]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[3]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[4]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[5]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[6]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[7]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[8]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[9]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[10]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[11]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[12]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[13]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[14]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[15]],__double_as_longlong(0.0)); + atomicAdd( &csr_vals[globalIdxs[16]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[17]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[18]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[19]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[20]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[21]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[22]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[23]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[24]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[25]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[26]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[27]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[28]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[29]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[30]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[31]],__double_as_longlong(0.0)); + atomicAdd( &csr_vals[globalIdxs[32]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[33]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[34]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[35]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[36]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[37]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[38]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[39]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[40]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[41]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[42]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[43]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[44]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[45]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[46]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[47]],__double_as_longlong(0.0)); + atomicAdd( &csr_vals[globalIdxs[48]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[49]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[50]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[51]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[52]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[53]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[54]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[55]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[56]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[57]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[58]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[59]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[60]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[61]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[62]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[63]],__double_as_longlong(1.0)); + #else + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[1], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[1], globalIdxs[7], 0.0); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[3], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[7], 0.0); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[5], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[5], globalIdxs[7], 0.0); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[7], 1.0); + #endif } -void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_neumannx_upy_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri) +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_neumannx_upy_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out) { // epsilon: permittivity tensor. // kSq: wave number squared (factor multiplying phi). // dx: cell length in each direction. // bcVals: values to impose as BCs, i.e. bcVals[off+0]*phi+bcVals[off+1]*epsilon^{ij}*d(phi)/dx_j=bcVals[off+2]. // globalIdxs: global linear index of each basis function/node in current cell. - // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (CPU): triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (GPU): double array to put nonzero values of the global matrix into. + + #ifdef __CUDA_ARCH__ + double *csr_vals = (double *) out; + #else + gkyl_mat_triples *tri = (gkyl_mat_triples *) out; + #endif const double *epsxx = &epsilon[0]; const double *epsxy = &epsilon[8]; @@ -533,81 +984,155 @@ void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_neumannx_upy_periodicy(const dou rdx2[0] = 2.0/dx[0]; rdx2[1] = 2.0/dx[1]; - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #ifdef __CUDA_ARCH__ + atomicAdd( &csr_vals[globalIdxs[0]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[1]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[2]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[3]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[4]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[5]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[6]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[7]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[8]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[9]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[10]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[11]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[12]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[13]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[14]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[15]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[16]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[17]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[18]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[19]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[20]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[21]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[22]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[23]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[24]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[25]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[26]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[27]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[28]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[29]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[30]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[31]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[32]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[33]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[34]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[35]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[36]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[37]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[38]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[39]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[40]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[41]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[42]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[43]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[44]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[45]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[46]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[47]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[48]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[49]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[50]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[51]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[52]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[53]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[54]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[55]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[56]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[57]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[58]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[59]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[60]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[61]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[62]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[63]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + #else + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #endif } -void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_neumannx_upy_dirichlety(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri) +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_neumannx_upy_dirichlety(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out) { // epsilon: permittivity tensor. // kSq: wave number squared (factor multiplying phi). // dx: cell length in each direction. // bcVals: values to impose as BCs, i.e. bcVals[off+0]*phi+bcVals[off+1]*epsilon^{ij}*d(phi)/dx_j=bcVals[off+2]. // globalIdxs: global linear index of each basis function/node in current cell. - // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (CPU): triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (GPU): double array to put nonzero values of the global matrix into. + + #ifdef __CUDA_ARCH__ + double *csr_vals = (double *) out; + #else + gkyl_mat_triples *tri = (gkyl_mat_triples *) out; + #endif const double *epsxx = &epsilon[0]; const double *epsxy = &epsilon[8]; @@ -621,81 +1146,155 @@ void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_neumannx_upy_dirichlety(const do rdx2[0] = 2.0/dx[0]; rdx2[1] = 2.0/dx[1]; - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[2], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[7], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[3], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[7], 0.0); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[6], 1.0); - gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[7], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[0], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[1], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[2], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[3], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[4], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[5], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[6], 0.0); - gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[7], 1.0); + #ifdef __CUDA_ARCH__ + atomicAdd( &csr_vals[globalIdxs[0]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[1]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[2]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[3]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[4]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[5]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[6]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[7]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[8]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[9]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[10]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[11]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[12]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[13]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[14]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[15]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[16]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[17]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[18]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[19]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[20]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[21]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[22]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[23]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[24]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[25]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[26]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[27]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[28]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[29]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[30]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[31]],__double_as_longlong(0.0)); + atomicAdd( &csr_vals[globalIdxs[32]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[33]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[34]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[35]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[36]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[37]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[38]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[39]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[40]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[41]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[42]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[43]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[44]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[45]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[46]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[47]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[48]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[49]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[50]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[51]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[52]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[53]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[54]],__double_as_longlong(1.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[55]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[56]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[57]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[58]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[59]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[60]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[61]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[62]],__double_as_longlong(0.0)); + atomicExch((unsigned long long int*) &csr_vals[globalIdxs[63]],__double_as_longlong(1.0)); + #else + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[2], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[2], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[3], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[3], globalIdxs[7], 0.0); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[6], 1.0); + gkyl_mat_triples_insert(tri, globalIdxs[6], globalIdxs[7], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[0], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[1], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[2], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[3], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[4], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[5], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[6], 0.0); + gkyl_mat_triples_insert(tri, globalIdxs[7], globalIdxs[7], 1.0); + #endif } -void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_neumannx_upy_neumanny(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri) +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_neumannx_upy_neumanny(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out) { // epsilon: permittivity tensor. // kSq: wave number squared (factor multiplying phi). // dx: cell length in each direction. // bcVals: values to impose as BCs, i.e. bcVals[off+0]*phi+bcVals[off+1]*epsilon^{ij}*d(phi)/dx_j=bcVals[off+2]. // globalIdxs: global linear index of each basis function/node in current cell. - // tri: triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (CPU): triples object (i,j,val), i.e. contribute val to i,j element of the global matrix. + // out (GPU): double array to put nonzero values of the global matrix into. + + #ifdef __CUDA_ARCH__ + double *csr_vals = (double *) out; + #else + gkyl_mat_triples *tri = (gkyl_mat_triples *) out; + #endif const double *epsxx = &epsilon[0]; const double *epsxy = &epsilon[8]; @@ -709,70 +1308,137 @@ void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_neumannx_upy_neumanny(const doub rdx2[0] = 2.0/dx[0]; rdx2[1] = 2.0/dx[1]; - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); - gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #ifdef __CUDA_ARCH__ + atomicAdd( &csr_vals[globalIdxs[0]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[1]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[2]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[3]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[4]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[5]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[6]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[7]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[8]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[9]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[10]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[11]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[12]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[13]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[14]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[15]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[16]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[17]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[18]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[19]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[20]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[21]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[22]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[23]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[24]],(0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[25]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[26]],(-(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[27]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[28]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[29]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[30]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[31]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[32]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[33]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[34]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[35]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[36]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[37]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[38]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[39]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[40]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[41]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[42]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[43]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[44]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[45]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[46]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[47]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[48]],(0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[49]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[50]],(-(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[51]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[52]],(0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[53]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[54]],(-(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[55]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[56]],(-(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[57]],(-(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[58]],(0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[59]],(0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[60]],(-(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[61]],(-(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[62]],(0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0])); + atomicAdd( &csr_vals[globalIdxs[63]],(0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0])); + #else + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[0], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[1], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[2], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[3], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[4], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[5], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[6], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[0], globalIdxs[7], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[0], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[1], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[2], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[3], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[4], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[5], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[6], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[1], globalIdxs[7], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[0], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[1], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[2], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[3], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[4], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[5], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[6], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[2], globalIdxs[7], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[0], 0.03402069087198858*epsyy[3]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[1], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[2], -(0.03402069087198858*epsyy[3]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]+0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[3], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]+0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[4], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[5], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[6], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[3], globalIdxs[7], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[0], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[1], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[2], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[3], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[4], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[5], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[6], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[4], globalIdxs[7], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[0], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00+0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[1], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]+0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[2], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[3], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[4], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00+0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[5], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]+0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]+0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[6], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[5], globalIdxs[7], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[0], 0.03402069087198858*epsyy[1]*rdx11-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00+0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[1], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01+0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[2], -(0.03402069087198858*epsyy[1]*rdx11)+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01-0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[3], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[4], 0.05892556509887897*epsyy[5]*rdx11-0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00+0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]+0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[5], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[6], -(0.05892556509887897*epsyy[5]*rdx11)+0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01-0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00+0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]+0.07856742013183864*kSq[5]+0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]+0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[6], globalIdxs[7], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[0], -(0.019641855032959656*epsyy[0]*rdx11)+0.019641855032959656*epsxy[4]*rdx01-0.05892556509887897*epsxy[0]*rdx01-0.019641855032959656*epsxx[0]*rdx00-0.013094570021973104*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[1], -(0.03402069087198858*epsyy[1]*rdx11)-0.03928371006591931*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[2]*rdx01+0.019641855032959656*epsxx[0]*rdx00-0.022680460581325723*kSq[1]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[2], 0.019641855032959656*epsyy[0]*rdx11-0.019641855032959656*epsxy[4]*rdx01-0.03402069087198858*epsxy[1]*rdx01-0.03402069087198858*epsxx[2]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[2]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[3], 0.03402069087198858*epsyy[1]*rdx11+0.03928371006591931*epsyy[0]*rdx11+0.019641855032959656*epsxy[4]*rdx01+0.03402069087198858*epsxy[2]*rdx01+0.03402069087198858*epsxy[1]*rdx01+0.05892556509887897*epsxy[0]*rdx01+0.03402069087198858*epsxx[2]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[4]-0.04536092116265145*kSq[2]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[4], -(0.03402069087198858*epsyy[3]*rdx11)-0.03928371006591931*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.03928371006591931*epsxy[4]*rdx01-0.10206207261596573*epsxy[3]*rdx01-0.11785113019775795*epsxy[0]*rdx01-0.03402069087198858*epsxx[3]*rdx00-0.03928371006591931*epsxx[0]*rdx00-0.022680460581325723*kSq[3]-0.026189140043946214*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[5], -(0.05892556509887897*epsyy[5]*rdx11)-0.06804138174397717*epsyy[3]*rdx11-0.06804138174397717*epsyy[1]*rdx11-0.07856742013183864*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[6]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[2]*rdx01+0.03402069087198858*epsxx[3]*rdx00+0.03928371006591931*epsxx[0]*rdx00-0.03928371006591931*kSq[5]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[1]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[6], 0.03402069087198858*epsyy[3]*rdx11+0.03928371006591931*epsyy[0]*rdx11-0.03402069087198858*epsxy[7]*rdx01-0.05892556509887897*epsxy[5]*rdx01-0.03928371006591931*epsxy[4]*rdx01-0.06804138174397717*epsxy[1]*rdx01-0.05892556509887897*epsxx[6]*rdx00-0.06804138174397717*epsxx[3]*rdx00-0.06804138174397717*epsxx[2]*rdx00-0.07856742013183864*epsxx[0]*rdx00-0.03928371006591931*kSq[6]-0.04536092116265145*kSq[3]-0.04536092116265145*kSq[2]-0.052378280087892436*kSq[0]); + gkyl_mat_triples_accum(tri, globalIdxs[7], globalIdxs[7], 0.05892556509887897*epsyy[5]*rdx11+0.06804138174397717*epsyy[3]*rdx11+0.06804138174397717*epsyy[1]*rdx11+0.07856742013183864*epsyy[0]*rdx11+0.03402069087198858*epsxy[7]*rdx01+0.05892556509887897*epsxy[6]*rdx01+0.05892556509887897*epsxy[5]*rdx01+0.03928371006591931*epsxy[4]*rdx01+0.10206207261596573*epsxy[3]*rdx01+0.06804138174397717*epsxy[2]*rdx01+0.06804138174397717*epsxy[1]*rdx01+0.11785113019775795*epsxy[0]*rdx01+0.05892556509887897*epsxx[6]*rdx00+0.06804138174397717*epsxx[3]*rdx00+0.06804138174397717*epsxx[2]*rdx00+0.07856742013183864*epsxx[0]*rdx00-0.06804138174397717*kSq[7]-0.07856742013183864*kSq[6]-0.07856742013183864*kSq[5]-0.07856742013183864*kSq[4]-0.09072184232530293*kSq[3]-0.09072184232530293*kSq[2]-0.09072184232530293*kSq[1]-0.10475656017578487*kSq[0]); + #endif } diff --git a/gyrokinetic/ker/fem_poisson_perp/gkyl_fem_poisson_perp_kernels.h b/gyrokinetic/ker/fem_poisson_perp/gkyl_fem_poisson_perp_kernels.h index 2ec4d4a19c..7abcbef9a5 100644 --- a/gyrokinetic/ker/fem_poisson_perp/gkyl_fem_poisson_perp_kernels.h +++ b/gyrokinetic/ker/fem_poisson_perp/gkyl_fem_poisson_perp_kernels.h @@ -22,13 +22,13 @@ GKYL_CU_DH void fem_poisson_perp_local_to_global_2x_ser_p1_inx_nonperiodicx(cons GKYL_CU_DH void fem_poisson_perp_local_to_global_2x_ser_p1_upx_periodicx(const int *numCells, const int *idx, long *globalIdxs); GKYL_CU_DH void fem_poisson_perp_local_to_global_2x_ser_p1_upx_nonperiodicx(const int *numCells, const int *idx, long *globalIdxs); -void fem_poisson_perp_lhs_stencil_2x_ser_p1_inx_periodicx(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri); -void fem_poisson_perp_lhs_stencil_2x_ser_p1_lox_periodicx(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri); -void fem_poisson_perp_lhs_stencil_2x_ser_p1_lox_dirichletx(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri); -void fem_poisson_perp_lhs_stencil_2x_ser_p1_lox_neumannx(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri); -void fem_poisson_perp_lhs_stencil_2x_ser_p1_upx_periodicx(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri); -void fem_poisson_perp_lhs_stencil_2x_ser_p1_upx_dirichletx(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri); -void fem_poisson_perp_lhs_stencil_2x_ser_p1_upx_neumannx(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri); +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_2x_ser_p1_inx_periodicx(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out); +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_2x_ser_p1_lox_periodicx(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out); +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_2x_ser_p1_lox_dirichletx(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out); +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_2x_ser_p1_lox_neumannx(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out); +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_2x_ser_p1_upx_periodicx(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out); +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_2x_ser_p1_upx_dirichletx(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out); +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_2x_ser_p1_upx_neumannx(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out); GKYL_CU_DH void fem_poisson_perp_src_stencil_2x_ser_p1_inx_periodicx(const double *epsilon, const double *dx, const double *rho, const double *bcVals, long perpOff, const long *globalIdxs, double *bsrc); GKYL_CU_DH void fem_poisson_perp_src_stencil_2x_ser_p1_lox_periodicx(const double *epsilon, const double *dx, const double *rho, const double *bcVals, long perpOff, const long *globalIdxs, double *bsrc); @@ -40,6 +40,13 @@ GKYL_CU_DH void fem_poisson_perp_src_stencil_2x_ser_p1_upx_neumannx(const double GKYL_CU_DH void fem_poisson_perp_sol_stencil_2x_ser_p1(const double *sol_nodal_global, long perpOff, const long *globalIdxs, double *sol_modal_local); +GKYL_CU_DH void fem_poisson_perp_bias_line_lhs_2x_ser_p1_inx(const int *edge, const int *perp_dirs, const long *globalIdxs, gkyl_mat_triples *tri); +GKYL_CU_DH void fem_poisson_perp_bias_line_lhs_2x_ser_p1_upx_periodicx(const int *edge, const int *perp_dirs, const long *globalIdxs, gkyl_mat_triples *tri); +GKYL_CU_DH void fem_poisson_perp_bias_line_lhs_2x_ser_p1_upx_nonperiodicx(const int *edge, const int *perp_dirs, const long *globalIdxs, gkyl_mat_triples *tri); +GKYL_CU_DH void fem_poisson_perp_bias_line_src_2x_ser_p1_inx(const int *edge, const int *perp_dirs, double val, long perpOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_poisson_perp_bias_line_src_2x_ser_p1_upx_periodicx(const int *edge, const int *perp_dirs, double val, long perpOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_poisson_perp_bias_line_src_2x_ser_p1_upx_nonperiodicx(const int *edge, const int *perp_dirs, double val, long perpOff, const long *globalIdxs, double *bsrc); + long fem_poisson_perp_num_nodes_global_3x_ser_p1_periodicx_periodicy(const int *numCells); long fem_poisson_perp_num_nodes_global_3x_ser_p1_periodicx_nonperiodicy(const int *numCells); @@ -63,55 +70,55 @@ GKYL_CU_DH void fem_poisson_perp_local_to_global_3x_ser_p1_upx_periodicx_upy_non GKYL_CU_DH void fem_poisson_perp_local_to_global_3x_ser_p1_upx_nonperiodicx_upy_periodicy(const int *numCells, const int *idx, long *globalIdxs); GKYL_CU_DH void fem_poisson_perp_local_to_global_3x_ser_p1_upx_nonperiodicx_upy_nonperiodicy(const int *numCells, const int *idx, long *globalIdxs); -void fem_poisson_perp_lhs_stencil_3x_ser_p1_inx_periodicx_iny_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri); -void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_periodicx_iny_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri); -void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_dirichletx_iny_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri); -void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_neumannx_iny_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri); -void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_periodicx_iny_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri); -void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_dirichletx_iny_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri); -void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_neumannx_iny_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri); -void fem_poisson_perp_lhs_stencil_3x_ser_p1_inx_periodicx_loy_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri); -void fem_poisson_perp_lhs_stencil_3x_ser_p1_inx_periodicx_loy_dirichlety(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri); -void fem_poisson_perp_lhs_stencil_3x_ser_p1_inx_periodicx_loy_neumanny(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri); -void fem_poisson_perp_lhs_stencil_3x_ser_p1_inx_periodicx_upy_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri); -void fem_poisson_perp_lhs_stencil_3x_ser_p1_inx_periodicx_upy_dirichlety(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri); -void fem_poisson_perp_lhs_stencil_3x_ser_p1_inx_periodicx_upy_neumanny(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri); -void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_periodicx_loy_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri); -void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_periodicx_loy_dirichlety(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri); -void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_periodicx_loy_neumanny(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri); -void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_dirichletx_loy_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri); -void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_dirichletx_loy_dirichlety(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri); -void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_dirichletx_loy_neumanny(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri); -void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_neumannx_loy_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri); -void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_neumannx_loy_dirichlety(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri); -void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_neumannx_loy_neumanny(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri); -void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_periodicx_upy_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri); -void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_periodicx_upy_dirichlety(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri); -void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_periodicx_upy_neumanny(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri); -void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_dirichletx_upy_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri); -void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_dirichletx_upy_dirichlety(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri); -void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_dirichletx_upy_neumanny(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri); -void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_neumannx_upy_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri); -void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_neumannx_upy_dirichlety(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri); -void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_neumannx_upy_neumanny(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri); -void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_periodicx_loy_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri); -void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_periodicx_loy_dirichlety(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri); -void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_periodicx_loy_neumanny(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri); -void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_dirichletx_loy_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri); -void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_dirichletx_loy_dirichlety(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri); -void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_dirichletx_loy_neumanny(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri); -void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_neumannx_loy_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri); -void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_neumannx_loy_dirichlety(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri); -void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_neumannx_loy_neumanny(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri); -void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_periodicx_upy_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri); -void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_periodicx_upy_dirichlety(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri); -void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_periodicx_upy_neumanny(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri); -void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_dirichletx_upy_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri); -void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_dirichletx_upy_dirichlety(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri); -void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_dirichletx_upy_neumanny(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri); -void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_neumannx_upy_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri); -void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_neumannx_upy_dirichlety(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri); -void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_neumannx_upy_neumanny(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, gkyl_mat_triples *tri); +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_inx_periodicx_iny_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out); +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_periodicx_iny_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out); +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_dirichletx_iny_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out); +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_neumannx_iny_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out); +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_periodicx_iny_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out); +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_dirichletx_iny_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out); +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_neumannx_iny_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out); +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_inx_periodicx_loy_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out); +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_inx_periodicx_loy_dirichlety(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out); +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_inx_periodicx_loy_neumanny(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out); +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_inx_periodicx_upy_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out); +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_inx_periodicx_upy_dirichlety(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out); +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_inx_periodicx_upy_neumanny(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out); +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_periodicx_loy_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out); +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_periodicx_loy_dirichlety(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out); +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_periodicx_loy_neumanny(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out); +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_dirichletx_loy_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out); +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_dirichletx_loy_dirichlety(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out); +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_dirichletx_loy_neumanny(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out); +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_neumannx_loy_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out); +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_neumannx_loy_dirichlety(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out); +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_neumannx_loy_neumanny(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out); +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_periodicx_upy_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out); +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_periodicx_upy_dirichlety(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out); +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_periodicx_upy_neumanny(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out); +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_dirichletx_upy_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out); +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_dirichletx_upy_dirichlety(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out); +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_dirichletx_upy_neumanny(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out); +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_neumannx_upy_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out); +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_neumannx_upy_dirichlety(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out); +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_lox_neumannx_upy_neumanny(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out); +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_periodicx_loy_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out); +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_periodicx_loy_dirichlety(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out); +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_periodicx_loy_neumanny(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out); +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_dirichletx_loy_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out); +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_dirichletx_loy_dirichlety(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out); +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_dirichletx_loy_neumanny(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out); +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_neumannx_loy_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out); +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_neumannx_loy_dirichlety(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out); +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_neumannx_loy_neumanny(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out); +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_periodicx_upy_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out); +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_periodicx_upy_dirichlety(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out); +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_periodicx_upy_neumanny(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out); +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_dirichletx_upy_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out); +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_dirichletx_upy_dirichlety(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out); +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_dirichletx_upy_neumanny(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out); +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_neumannx_upy_periodicy(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out); +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_neumannx_upy_dirichlety(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out); +GKYL_CU_DH void fem_poisson_perp_lhs_stencil_3x_ser_p1_upx_neumannx_upy_neumanny(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, const long *globalIdxs, void *out); GKYL_CU_DH void fem_poisson_perp_src_stencil_3x_ser_p1_inx_periodicx_iny_periodicy(const double *epsilon, const double *dx, const double *rho, const double *bcVals, long perpOff, const long *globalIdxs, double *bsrc); GKYL_CU_DH void fem_poisson_perp_src_stencil_3x_ser_p1_lox_periodicx_iny_periodicy(const double *epsilon, const double *dx, const double *rho, const double *bcVals, long perpOff, const long *globalIdxs, double *bsrc); @@ -165,6 +172,25 @@ GKYL_CU_DH void fem_poisson_perp_src_stencil_3x_ser_p1_upx_neumannx_upy_neumanny GKYL_CU_DH void fem_poisson_perp_sol_stencil_3x_ser_p1(const double *sol_nodal_global, long perpOff, const long *globalIdxs, double *sol_modal_local); +GKYL_CU_DH void fem_poisson_perp_bias_line_lhs_3x_ser_p1_inx_iny(const int *edge, const int *perp_dirs, const long *globalIdxs, gkyl_mat_triples *tri); +GKYL_CU_DH void fem_poisson_perp_bias_line_lhs_3x_ser_p1_upx_periodicx_iny(const int *edge, const int *perp_dirs, const long *globalIdxs, gkyl_mat_triples *tri); +GKYL_CU_DH void fem_poisson_perp_bias_line_lhs_3x_ser_p1_upx_nonperiodicx_iny(const int *edge, const int *perp_dirs, const long *globalIdxs, gkyl_mat_triples *tri); +GKYL_CU_DH void fem_poisson_perp_bias_line_lhs_3x_ser_p1_inx_upy_periodicy(const int *edge, const int *perp_dirs, const long *globalIdxs, gkyl_mat_triples *tri); +GKYL_CU_DH void fem_poisson_perp_bias_line_lhs_3x_ser_p1_inx_upy_nonperiodicy(const int *edge, const int *perp_dirs, const long *globalIdxs, gkyl_mat_triples *tri); +GKYL_CU_DH void fem_poisson_perp_bias_line_lhs_3x_ser_p1_upx_periodicx_upy_periodicy(const int *edge, const int *perp_dirs, const long *globalIdxs, gkyl_mat_triples *tri); +GKYL_CU_DH void fem_poisson_perp_bias_line_lhs_3x_ser_p1_upx_periodicx_upy_nonperiodicy(const int *edge, const int *perp_dirs, const long *globalIdxs, gkyl_mat_triples *tri); +GKYL_CU_DH void fem_poisson_perp_bias_line_lhs_3x_ser_p1_upx_nonperiodicx_upy_periodicy(const int *edge, const int *perp_dirs, const long *globalIdxs, gkyl_mat_triples *tri); +GKYL_CU_DH void fem_poisson_perp_bias_line_lhs_3x_ser_p1_upx_nonperiodicx_upy_nonperiodicy(const int *edge, const int *perp_dirs, const long *globalIdxs, gkyl_mat_triples *tri); +GKYL_CU_DH void fem_poisson_perp_bias_line_src_3x_ser_p1_inx_iny(const int *edge, const int *perp_dirs, double val, long perpOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_poisson_perp_bias_line_src_3x_ser_p1_upx_periodicx_iny(const int *edge, const int *perp_dirs, double val, long perpOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_poisson_perp_bias_line_src_3x_ser_p1_upx_nonperiodicx_iny(const int *edge, const int *perp_dirs, double val, long perpOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_poisson_perp_bias_line_src_3x_ser_p1_inx_upy_periodicy(const int *edge, const int *perp_dirs, double val, long perpOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_poisson_perp_bias_line_src_3x_ser_p1_inx_upy_nonperiodicy(const int *edge, const int *perp_dirs, double val, long perpOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_poisson_perp_bias_line_src_3x_ser_p1_upx_periodicx_upy_periodicy(const int *edge, const int *perp_dirs, double val, long perpOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_poisson_perp_bias_line_src_3x_ser_p1_upx_periodicx_upy_nonperiodicy(const int *edge, const int *perp_dirs, double val, long perpOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_poisson_perp_bias_line_src_3x_ser_p1_upx_nonperiodicx_upy_periodicy(const int *edge, const int *perp_dirs, double val, long perpOff, const long *globalIdxs, double *bsrc); +GKYL_CU_DH void fem_poisson_perp_bias_line_src_3x_ser_p1_upx_nonperiodicx_upy_nonperiodicy(const int *edge, const int *perp_dirs, double val, long perpOff, const long *globalIdxs, double *bsrc); + diff --git a/gyrokinetic/ker/lbo_gyrokinetic/lbo_gyrokinetic_diff_vol_1x2v_ser_p1.c b/gyrokinetic/ker/lbo_gyrokinetic/lbo_gyrokinetic_diff_vol_1x2v_ser_p1.c index 5060c211c7..f0f32b72de 100644 --- a/gyrokinetic/ker/lbo_gyrokinetic/lbo_gyrokinetic_diff_vol_1x2v_ser_p1.c +++ b/gyrokinetic/ker/lbo_gyrokinetic/lbo_gyrokinetic_diff_vol_1x2v_ser_p1.c @@ -25,8 +25,8 @@ GKYL_CU_DH double lbo_gyrokinetic_diff_vol_1x2v_ser_p1(const double *dxv, const // Expand 2*m*nuVtSqSum/bmag/mu'^2 in conf basis. double facDiffMu[2] = {0.}; - facDiffMu[0] = 1.414213562373095*(bmag_inv[1]*nuVtSqSum[1]+bmag_inv[0]*nuVtSqSum[0])*rdvVmapPrimeSq4[1]*m_; - facDiffMu[1] = 1.414213562373095*(bmag_inv[0]*nuVtSqSum[1]+nuVtSqSum[0]*bmag_inv[1])*rdvVmapPrimeSq4[1]*m_; + facDiffMu[0] = 1.4142135623730951*(bmag_inv[1]*nuVtSqSum[1]+bmag_inv[0]*nuVtSqSum[0])*rdvVmapPrimeSq4[1]*m_; + facDiffMu[1] = 1.4142135623730951*(bmag_inv[0]*nuVtSqSum[1]+nuVtSqSum[0]*bmag_inv[1])*rdvVmapPrimeSq4[1]*m_; out[3] += 1.5*facDiffMu[1]*fin[1]*vmap[3]+1.5*facDiffMu[0]*fin[0]*vmap[3]; out[5] += 1.5*facDiffMu[0]*fin[1]*vmap[3]+1.5*fin[0]*facDiffMu[1]*vmap[3]; diff --git a/gyrokinetic/ker/lbo_gyrokinetic/lbo_gyrokinetic_diff_vol_2x2v_ser_p1.c b/gyrokinetic/ker/lbo_gyrokinetic/lbo_gyrokinetic_diff_vol_2x2v_ser_p1.c index 74d13c46a5..6fc230524a 100644 --- a/gyrokinetic/ker/lbo_gyrokinetic/lbo_gyrokinetic_diff_vol_2x2v_ser_p1.c +++ b/gyrokinetic/ker/lbo_gyrokinetic/lbo_gyrokinetic_diff_vol_2x2v_ser_p1.c @@ -27,10 +27,10 @@ GKYL_CU_DH double lbo_gyrokinetic_diff_vol_2x2v_ser_p1(const double *dxv, const // Expand 2*m*nuVtSqSum/bmag/mu'^2 in conf basis. double facDiffMu[4] = {0.}; - facDiffMu[0] = (bmag_inv[1]*nuVtSqSum[1]+bmag_inv[0]*nuVtSqSum[0])*rdvVmapPrimeSq4[1]*m_; - facDiffMu[1] = (bmag_inv[0]*nuVtSqSum[1]+nuVtSqSum[0]*bmag_inv[1])*rdvVmapPrimeSq4[1]*m_; - facDiffMu[2] = rdvVmapPrimeSq4[1]*(bmag_inv[1]*nuVtSqSum[3]+bmag_inv[0]*nuVtSqSum[2])*m_; - facDiffMu[3] = rdvVmapPrimeSq4[1]*(bmag_inv[0]*nuVtSqSum[3]+bmag_inv[1]*nuVtSqSum[2])*m_; + facDiffMu[0] = rdvVmapPrimeSq4[1]*(bmag_inv[3]*nuVtSqSum[3]+bmag_inv[2]*nuVtSqSum[2]+bmag_inv[1]*nuVtSqSum[1]+bmag_inv[0]*nuVtSqSum[0])*m_; + facDiffMu[1] = rdvVmapPrimeSq4[1]*(bmag_inv[2]*nuVtSqSum[3]+nuVtSqSum[2]*bmag_inv[3]+bmag_inv[0]*nuVtSqSum[1]+nuVtSqSum[0]*bmag_inv[1])*m_; + facDiffMu[2] = rdvVmapPrimeSq4[1]*(bmag_inv[1]*nuVtSqSum[3]+nuVtSqSum[1]*bmag_inv[3]+bmag_inv[0]*nuVtSqSum[2]+nuVtSqSum[0]*bmag_inv[2])*m_; + facDiffMu[3] = rdvVmapPrimeSq4[1]*(bmag_inv[0]*nuVtSqSum[3]+nuVtSqSum[0]*bmag_inv[3]+bmag_inv[1]*nuVtSqSum[2]+nuVtSqSum[1]*bmag_inv[2])*m_; out[4] += 1.060660171779821*facDiffMu[3]*vmap[3]*fin[5]+1.060660171779821*facDiffMu[2]*fin[2]*vmap[3]+1.060660171779821*facDiffMu[1]*fin[1]*vmap[3]+1.060660171779821*facDiffMu[0]*fin[0]*vmap[3]; out[8] += 1.060660171779821*facDiffMu[2]*vmap[3]*fin[5]+1.060660171779821*fin[2]*facDiffMu[3]*vmap[3]+1.060660171779821*facDiffMu[0]*fin[1]*vmap[3]+1.060660171779821*fin[0]*facDiffMu[1]*vmap[3]; @@ -40,15 +40,15 @@ GKYL_CU_DH double lbo_gyrokinetic_diff_vol_2x2v_ser_p1(const double *dxv, const out[13] += 1.060660171779821*facDiffMu[2]*vmap[3]*fin[11]+1.060660171779821*facDiffMu[3]*vmap[3]*fin[7]+1.060660171779821*facDiffMu[0]*vmap[3]*fin[6]+1.060660171779821*facDiffMu[1]*fin[3]*vmap[3]; out[14] += 1.060660171779821*facDiffMu[1]*vmap[3]*fin[11]+1.060660171779821*facDiffMu[0]*vmap[3]*fin[7]+1.060660171779821*facDiffMu[3]*vmap[3]*fin[6]+1.060660171779821*facDiffMu[2]*fin[3]*vmap[3]; out[15] += 1.060660171779821*facDiffMu[0]*vmap[3]*fin[11]+1.060660171779821*facDiffMu[1]*vmap[3]*fin[7]+1.060660171779821*facDiffMu[2]*vmap[3]*fin[6]+1.060660171779821*facDiffMu[3]*fin[3]*vmap[3]; - out[16] += 3.354101966249685*facDiffVpar[3]*fin[5]+3.354101966249685*facDiffVpar[2]*fin[2]+3.354101966249685*facDiffVpar[1]*fin[1]+3.354101966249685*facDiffVpar[0]*fin[0]; - out[17] += 3.354101966249684*facDiffVpar[2]*fin[5]+3.354101966249684*fin[2]*facDiffVpar[3]+3.354101966249684*facDiffVpar[0]*fin[1]+3.354101966249684*fin[0]*facDiffVpar[1]; - out[18] += 3.354101966249684*facDiffVpar[1]*fin[5]+3.354101966249684*fin[1]*facDiffVpar[3]+3.354101966249684*facDiffVpar[0]*fin[2]+3.354101966249684*fin[0]*facDiffVpar[2]; - out[19] += 1.060660171779821*facDiffMu[3]*vmap[3]*fin[20]+1.060660171779821*facDiffMu[2]*vmap[3]*fin[18]+1.060660171779821*facDiffMu[1]*vmap[3]*fin[17]+1.060660171779821*facDiffMu[0]*vmap[3]*fin[16]+3.354101966249684*facDiffVpar[3]*fin[12]+3.354101966249684*facDiffVpar[2]*fin[9]+3.354101966249684*facDiffVpar[1]*fin[8]+3.354101966249684*facDiffVpar[0]*fin[4]; - out[20] += 3.354101966249685*facDiffVpar[0]*fin[5]+3.354101966249685*fin[0]*facDiffVpar[3]+3.354101966249685*facDiffVpar[1]*fin[2]+3.354101966249685*fin[1]*facDiffVpar[2]; - out[21] += 1.060660171779821*facDiffMu[2]*vmap[3]*fin[20]+1.060660171779821*facDiffMu[3]*vmap[3]*fin[18]+1.060660171779821*facDiffMu[0]*vmap[3]*fin[17]+1.060660171779821*facDiffMu[1]*vmap[3]*fin[16]+3.354101966249685*facDiffVpar[2]*fin[12]+3.354101966249685*facDiffVpar[3]*fin[9]+3.354101966249685*facDiffVpar[0]*fin[8]+3.354101966249685*facDiffVpar[1]*fin[4]; - out[22] += 1.060660171779821*facDiffMu[1]*vmap[3]*fin[20]+1.060660171779821*facDiffMu[0]*vmap[3]*fin[18]+1.060660171779821*facDiffMu[3]*vmap[3]*fin[17]+1.060660171779821*facDiffMu[2]*vmap[3]*fin[16]+3.354101966249685*facDiffVpar[1]*fin[12]+3.354101966249685*facDiffVpar[0]*fin[9]+3.354101966249685*facDiffVpar[3]*fin[8]+3.354101966249685*facDiffVpar[2]*fin[4]; - out[23] += 1.060660171779821*facDiffMu[0]*vmap[3]*fin[20]+1.060660171779821*facDiffMu[1]*vmap[3]*fin[18]+1.060660171779821*facDiffMu[2]*vmap[3]*fin[17]+1.060660171779821*facDiffMu[3]*vmap[3]*fin[16]+3.354101966249684*facDiffVpar[0]*fin[12]+3.354101966249684*facDiffVpar[1]*fin[9]+3.354101966249684*facDiffVpar[2]*fin[8]+3.354101966249684*facDiffVpar[3]*fin[4]; - - return fabs(1.414213562373095*facDiffMu[0]*vmap[2]+4.5*facDiffVpar[0]); + out[16] += 3.3541019662496847*facDiffVpar[3]*fin[5]+3.3541019662496847*facDiffVpar[2]*fin[2]+3.3541019662496847*facDiffVpar[1]*fin[1]+3.3541019662496847*facDiffVpar[0]*fin[0]; + out[17] += 3.3541019662496843*facDiffVpar[2]*fin[5]+3.3541019662496843*fin[2]*facDiffVpar[3]+3.3541019662496843*facDiffVpar[0]*fin[1]+3.3541019662496843*fin[0]*facDiffVpar[1]; + out[18] += 3.3541019662496843*facDiffVpar[1]*fin[5]+3.3541019662496843*fin[1]*facDiffVpar[3]+3.3541019662496843*facDiffVpar[0]*fin[2]+3.3541019662496843*fin[0]*facDiffVpar[2]; + out[19] += 1.060660171779821*facDiffMu[3]*vmap[3]*fin[20]+1.060660171779821*facDiffMu[2]*vmap[3]*fin[18]+1.060660171779821*facDiffMu[1]*vmap[3]*fin[17]+1.060660171779821*facDiffMu[0]*vmap[3]*fin[16]+3.3541019662496843*facDiffVpar[3]*fin[12]+3.3541019662496843*facDiffVpar[2]*fin[9]+3.3541019662496843*facDiffVpar[1]*fin[8]+3.3541019662496843*facDiffVpar[0]*fin[4]; + out[20] += 3.3541019662496847*facDiffVpar[0]*fin[5]+3.3541019662496847*fin[0]*facDiffVpar[3]+3.3541019662496847*facDiffVpar[1]*fin[2]+3.3541019662496847*fin[1]*facDiffVpar[2]; + out[21] += 1.060660171779821*facDiffMu[2]*vmap[3]*fin[20]+1.060660171779821*facDiffMu[3]*vmap[3]*fin[18]+1.060660171779821*facDiffMu[0]*vmap[3]*fin[17]+1.060660171779821*facDiffMu[1]*vmap[3]*fin[16]+3.3541019662496847*facDiffVpar[2]*fin[12]+3.3541019662496847*facDiffVpar[3]*fin[9]+3.3541019662496847*facDiffVpar[0]*fin[8]+3.3541019662496847*facDiffVpar[1]*fin[4]; + out[22] += 1.060660171779821*facDiffMu[1]*vmap[3]*fin[20]+1.060660171779821*facDiffMu[0]*vmap[3]*fin[18]+1.060660171779821*facDiffMu[3]*vmap[3]*fin[17]+1.060660171779821*facDiffMu[2]*vmap[3]*fin[16]+3.3541019662496847*facDiffVpar[1]*fin[12]+3.3541019662496847*facDiffVpar[0]*fin[9]+3.3541019662496847*facDiffVpar[3]*fin[8]+3.3541019662496847*facDiffVpar[2]*fin[4]; + out[23] += 1.060660171779821*facDiffMu[0]*vmap[3]*fin[20]+1.060660171779821*facDiffMu[1]*vmap[3]*fin[18]+1.060660171779821*facDiffMu[2]*vmap[3]*fin[17]+1.060660171779821*facDiffMu[3]*vmap[3]*fin[16]+3.3541019662496843*facDiffVpar[0]*fin[12]+3.3541019662496843*facDiffVpar[1]*fin[9]+3.3541019662496843*facDiffVpar[2]*fin[8]+3.3541019662496843*facDiffVpar[3]*fin[4]; + + return fabs(1.4142135623730951*facDiffMu[0]*vmap[2]+4.5*facDiffVpar[0]); } diff --git a/gyrokinetic/unit/ctest_asdex.c b/gyrokinetic/unit/ctest_asdex.c index 2a2c9f1f45..ea8a22723f 100644 --- a/gyrokinetic/unit/ctest_asdex.c +++ b/gyrokinetic/unit/ctest_asdex.c @@ -110,10 +110,6 @@ write_geometry(gk_geometry *up, struct gkyl_rect_grid grid, struct gkyl_basis ba gkyl_grid_sub_array_write(&grid, &local, 0, up->geo_int.jacobtot, fileNm); sprintf(fileNm, fmt, name, "jacobtot_inv"); gkyl_grid_sub_array_write(&grid, &local, 0, up->geo_int.jacobtot_inv, fileNm); - sprintf(fileNm, fmt, name, "bmag_inv"); - gkyl_grid_sub_array_write(&grid, &local, 0, up->geo_int.bmag_inv, fileNm); - sprintf(fileNm, fmt, name, "bmag_inv_sq"); - gkyl_grid_sub_array_write(&grid, &local, 0, up->geo_int.bmag_inv_sq, fileNm); sprintf(fileNm, fmt, name, "gxxj"); gkyl_grid_sub_array_write(&grid, &local, 0, up->geo_int.gxxj, fileNm); sprintf(fileNm, fmt, name, "gxyj"); diff --git a/gyrokinetic/unit/ctest_bc_twistshift.c b/gyrokinetic/unit/ctest_bc_twistshift.c index 689d63a85d..2c408787c1 100644 --- a/gyrokinetic/unit/ctest_bc_twistshift.c +++ b/gyrokinetic/unit/ctest_bc_twistshift.c @@ -622,6 +622,11 @@ test_bc_twistshift_3x2v_fig6_wcells(const int *cells, enum gkyl_edge_loc edge, local, local_ext, local_vel, local_ext_vel, use_gpu); struct gkyl_position_map *pmap = gkyl_position_map_null_new(); + // Position map object. + struct gkyl_position_map_inp pmap_inp = { }; + struct gkyl_position_map *pmap = gkyl_position_map_new(pmap_inp, grid_conf, local_conf, + local_ext_conf, local_conf, local_ext_conf, basis_conf); + // Initialize geometry struct gkyl_gk_geometry_inp geometry_inp = { .geometry_id = GKYL_GEOMETRY_MAPC2P, @@ -642,6 +647,7 @@ test_bc_twistshift_3x2v_fig6_wcells(const int *cells, enum gkyl_edge_loc edge, .geo_global = local_conf, .geo_global_ext = local_ext_conf, .geo_basis = basis_conf, + .position_map = pmap, }; struct gk_geometry* gk_geom_3d = gkyl_gk_geometry_mapc2p_new(&geometry_inp); struct gk_geometry* gk_geom = gkyl_gk_geometry_acquire(gk_geom_3d); @@ -1366,6 +1372,11 @@ test_bc_twistshift_3x2v_fig11_wcells(const int *cells, enum gkyl_edge_loc edge, local, local_ext, local_vel, local_ext_vel, use_gpu); struct gkyl_position_map *pmap = gkyl_position_map_null_new(); + // Position map object. + struct gkyl_position_map_inp pmap_inp = { }; + struct gkyl_position_map *pmap = gkyl_position_map_new(pmap_inp, grid_conf, local_conf, + local_ext_conf, local_conf, local_ext_conf, basis_conf); + // Initialize geometry struct gkyl_gk_geometry_inp geometry_inp = { .geometry_id = GKYL_GEOMETRY_MAPC2P, @@ -1386,6 +1397,7 @@ test_bc_twistshift_3x2v_fig11_wcells(const int *cells, enum gkyl_edge_loc edge, .geo_global = local_conf, .geo_global_ext = local_ext_conf, .geo_basis = basis_conf, + .position_map = pmap, }; struct gk_geometry* gk_geom_3d = gkyl_gk_geometry_mapc2p_new(&geometry_inp); struct gk_geometry* gk_geom = gkyl_gk_geometry_acquire(gk_geom_3d); diff --git a/gyrokinetic/unit/ctest_deflated_fem_poisson.c b/gyrokinetic/unit/ctest_deflated_fem_poisson.c index a5833146f3..0303c875e9 100644 --- a/gyrokinetic/unit/ctest_deflated_fem_poisson.c +++ b/gyrokinetic/unit/ctest_deflated_fem_poisson.c @@ -177,7 +177,7 @@ test_zdep_nd_nxnz(int nx, int ny){ #endif //smooth it - struct gkyl_fem_parproj *parproj = gkyl_fem_parproj_new(&local, &basis, GKYL_FEM_PARPROJ_DIRICHLET, 0, 0, use_gpu); + struct gkyl_fem_parproj *parproj = gkyl_fem_parproj_new(&local, &basis, GKYL_FEM_PARPROJ_DIRICHLET_SKIN, 0, 0, use_gpu); gkyl_fem_parproj_set_rhs(parproj, field_discont_dev, field_discont_dev); gkyl_fem_parproj_solve(parproj, field_dev); @@ -276,7 +276,7 @@ test_simplez_dd_nxnz(int nx, int ny){ struct gkyl_array *field_discont_dev = field_discont; #endif - struct gkyl_fem_parproj *parproj = gkyl_fem_parproj_new(&local, &basis, GKYL_FEM_PARPROJ_DIRICHLET, 0, 0, use_gpu); + struct gkyl_fem_parproj *parproj = gkyl_fem_parproj_new(&local, &basis, GKYL_FEM_PARPROJ_DIRICHLET_SKIN, 0, 0, use_gpu); gkyl_fem_parproj_set_rhs(parproj, field_discont_dev, field_discont_dev); gkyl_fem_parproj_solve(parproj, field_dev); @@ -376,7 +376,7 @@ test_zind_dd_nxnz(int nx, int ny){ struct gkyl_array *field_discont_dev = field_discont; #endif - struct gkyl_fem_parproj *parproj = gkyl_fem_parproj_new(&local, &basis, GKYL_FEM_PARPROJ_DIRICHLET, 0, 0, use_gpu); + struct gkyl_fem_parproj *parproj = gkyl_fem_parproj_new(&local, &basis, GKYL_FEM_PARPROJ_DIRICHLET_SKIN, 0, 0, use_gpu); gkyl_fem_parproj_set_rhs(parproj, field_discont_dev, field_discont_dev); gkyl_fem_parproj_solve(parproj, field_dev); @@ -478,7 +478,7 @@ test_3x_dd_dd_nxnynz(int nx, int ny, int nz){ #endif //smooth it - struct gkyl_fem_parproj *parproj = gkyl_fem_parproj_new(&local, &basis, GKYL_FEM_PARPROJ_DIRICHLET, 0, 0, use_gpu); + struct gkyl_fem_parproj *parproj = gkyl_fem_parproj_new(&local, &basis, GKYL_FEM_PARPROJ_DIRICHLET_SKIN, 0, 0, use_gpu); gkyl_fem_parproj_set_rhs(parproj, field_discont_dev, field_discont_dev); gkyl_fem_parproj_solve(parproj, field_dev); diff --git a/gyrokinetic/unit/ctest_fem_parproj.c b/gyrokinetic/unit/ctest_fem_parproj.c index 2868c3a618..3cace44ef1 100644 --- a/gyrokinetic/unit/ctest_fem_parproj.c +++ b/gyrokinetic/unit/ctest_fem_parproj.c @@ -12,6 +12,7 @@ #include #include #include +#include static struct gkyl_array* mkarr(bool use_gpu, long nc, long size) @@ -166,11 +167,12 @@ static void check_continuity_perp(struct gkyl_range range, struct gkyl_basis bas gkyl_array_release(nodes); } -void check_dirichlet_bc(struct gkyl_range range, struct gkyl_basis basis, - struct gkyl_array *field_dg, struct gkyl_array *field_fem) +void check_dirichlet_bc(struct gkyl_range local, struct gkyl_range local_ext, struct gkyl_basis basis, + enum gkyl_fem_parproj_bc_type bctype, struct gkyl_array *field_dg, struct gkyl_array *field_fem) { // Check that two fields have the same boundary values in last dimension. - if (basis.poly_order > 1) return; + if (basis.poly_order > 1) return; // Check only working for p=1. + int ndim = basis.ndim; int pardir = ndim-1; const int num_nodes_perp_max = 4; // 3x p=1. @@ -187,31 +189,56 @@ void check_dirichlet_bc(struct gkyl_range range, struct gkyl_basis basis, struct gkyl_range perp_range; if (e == 0) - gkyl_range_shorten_from_above(&perp_range, &range, pardir, 1); + gkyl_range_shorten_from_above(&perp_range, &local, pardir, 1); else - gkyl_range_shorten_from_below(&perp_range, &range, pardir, 1); + gkyl_range_shorten_from_below(&perp_range, &local, pardir, 1); struct gkyl_range_iter iter; gkyl_range_iter_init(&iter, &perp_range); while (gkyl_range_iter_next(&iter)) { - long lidx = gkyl_range_idx(&range, iter.idx); - double *arr_dg = gkyl_array_fetch(field_dg, lidx); - double *arr_fem = gkyl_array_fetch(field_fem, lidx); + int diri_idx[ndim]; + for (int d=0; dncomp, sgr->lower_ghost[dim-1].volume); + + struct gkyl_bc_basic_gyrokinetic* bc_op_lo = gkyl_bc_basic_gyrokinetic_new(dim-1, GKYL_LOWER_EDGE, + GKYL_BC_GK_FIELD_BOUNDARY_VALUE, basis, &sgr->lower_skin[dim-1], &sgr->lower_ghost[dim-1], + basis->num_basis, dim, use_gpu); + gkyl_bc_basic_gyrokinetic_advance(bc_op_lo, bc_buffer, rho); + gkyl_bc_basic_gyrokinetic_release(bc_op_lo); + + struct gkyl_bc_basic_gyrokinetic* bc_op_up = gkyl_bc_basic_gyrokinetic_new(dim-1, GKYL_UPPER_EDGE, + GKYL_BC_GK_FIELD_BOUNDARY_VALUE, basis, &sgr->upper_skin[dim-1], &sgr->upper_ghost[dim-1], + basis->num_basis, dim, use_gpu); + gkyl_bc_basic_gyrokinetic_advance(bc_op_up, bc_buffer, rho); + gkyl_bc_basic_gyrokinetic_release(bc_op_up); + + gkyl_array_release(bc_buffer); +} + void test_1x(int poly_order, enum gkyl_fem_parproj_bc_type bctype, bool use_gpu) { @@ -254,7 +302,9 @@ test_1x(int poly_order, enum gkyl_fem_parproj_bc_type bctype, bool use_gpu) // projection updater for DG field. gkyl_proj_on_basis *projob = gkyl_proj_on_basis_new(&grid, &basis, - poly_order+1, 1, bctype==GKYL_FEM_PARPROJ_DIRICHLET? evalFunc1x_dirichlet : evalFunc1x, NULL); + poly_order+1, 1, + bctype==GKYL_FEM_PARPROJ_DIRICHLET_GHOST || bctype==GKYL_FEM_PARPROJ_DIRICHLET_SKIN? evalFunc1x_dirichlet : evalFunc1x, + NULL); // create DG field we wish to make continuous. struct gkyl_array *rho = mkarr(use_gpu, basis.num_basis, localRange_ext.volume); @@ -266,7 +316,13 @@ test_1x(int poly_order, enum gkyl_fem_parproj_bc_type bctype, bool use_gpu) // project distribution function on basis. gkyl_proj_on_basis_advance(projob, 0.0, &localRange, rho_ho); + + if (bctype == GKYL_FEM_PARPROJ_DIRICHLET_GHOST) + // Fill the ghost cell so we can apply Dirichlet BCs. + ghost_from_skin_surf(false, dim, &skin_ghost, &basis, rho_ho); + gkyl_array_copy(rho, rho_ho); + // gkyl_grid_sub_array_write(&grid, &localRange, 0, rho_ho, "ctest_fem_parproj_1x_p2_rho_1.gkyl"); // parallel FEM projection method. @@ -291,8 +347,8 @@ test_1x(int poly_order, enum gkyl_fem_parproj_bc_type bctype, bool use_gpu) check_continuity_par(localRange, basis, phi_ho); if (poly_order == 1) { - if (bctype == GKYL_FEM_PARPROJ_DIRICHLET) { - check_dirichlet_bc(localRange, basis, rho_ho, phi_ho); + if (bctype == GKYL_FEM_PARPROJ_DIRICHLET_GHOST || bctype == GKYL_FEM_PARPROJ_DIRICHLET_SKIN) { + check_dirichlet_bc(localRange, localRange_ext, basis, bctype, rho_ho, phi_ho); } else if (bctype == GKYL_FEM_PARPROJ_NONE) { // Solution (checked visually, also checked that phi is actually continuous, // and checked that visually looks like results in g2): @@ -342,8 +398,8 @@ test_1x(int poly_order, enum gkyl_fem_parproj_bc_type bctype, bool use_gpu) TEST_CHECK( gkyl_compare(sol[1], phi_p[1], 1e-14) ); } } if (poly_order == 2) { - if (bctype == GKYL_FEM_PARPROJ_DIRICHLET) { - check_dirichlet_bc(localRange, basis, rho_ho, phi_ho); + if (bctype == GKYL_FEM_PARPROJ_DIRICHLET_GHOST || bctype == GKYL_FEM_PARPROJ_DIRICHLET_SKIN) { + check_dirichlet_bc(localRange, localRange_ext, basis, bctype, rho_ho, phi_ho); } else if (bctype == GKYL_FEM_PARPROJ_NONE) { // Solution (checked visually against g2): const double sol[12] = {-0.9010465429057769, -0.4272439810948228, 0.0875367707148495, @@ -462,7 +518,9 @@ test_2x(int poly_order, enum gkyl_fem_parproj_bc_type bctype, bool use_gpu) // Projection updater for DG field. gkyl_proj_on_basis *projob = gkyl_proj_on_basis_new(&grid, &basis, - poly_order+1, 1, bctype==GKYL_FEM_PARPROJ_DIRICHLET? evalFunc2x_dirichlet : evalFunc2x, NULL); + poly_order+1, 1, + bctype==GKYL_FEM_PARPROJ_DIRICHLET_GHOST || bctype==GKYL_FEM_PARPROJ_DIRICHLET_SKIN? evalFunc2x_dirichlet : evalFunc2x, + NULL); // create DG field we wish to make continuous. struct gkyl_array *rho = mkarr(use_gpu, basis.num_basis, localRange_ext.volume); @@ -474,6 +532,11 @@ test_2x(int poly_order, enum gkyl_fem_parproj_bc_type bctype, bool use_gpu) // Project distribution function on basis. gkyl_proj_on_basis_advance(projob, 0.0, &localRange, rho_ho); + + if (bctype == GKYL_FEM_PARPROJ_DIRICHLET_GHOST) + // Fill the ghost cell so we can apply Dirichlet BCs. + ghost_from_skin_surf(false, dim, &skin_ghost, &basis, rho_ho); + gkyl_array_copy(rho, rho_ho); // // Project a function that is continuous in x but discontinuous in z. @@ -513,8 +576,8 @@ test_2x(int poly_order, enum gkyl_fem_parproj_bc_type bctype, bool use_gpu) // check_continuity_perp(localRange, basis, phi_ho); if (poly_order == 1) { - if (bctype == GKYL_FEM_PARPROJ_DIRICHLET) { - check_dirichlet_bc(localRange, basis, rho_ho, phi_ho); + if (bctype == GKYL_FEM_PARPROJ_DIRICHLET_GHOST || bctype == GKYL_FEM_PARPROJ_DIRICHLET_SKIN) { + check_dirichlet_bc(localRange, localRange_ext, basis, bctype, rho_ho, phi_ho); } else if (bctype == GKYL_FEM_PARPROJ_NONE) { // Solution (checked continuity manually): const double sol[48] = { @@ -639,8 +702,8 @@ test_2x(int poly_order, enum gkyl_fem_parproj_bc_type bctype, bool use_gpu) } } } if (poly_order == 2) { - if (bctype == GKYL_FEM_PARPROJ_DIRICHLET) { - check_dirichlet_bc(localRange, basis, rho_ho, phi_ho); + if (bctype == GKYL_FEM_PARPROJ_DIRICHLET_GHOST || bctype == GKYL_FEM_PARPROJ_DIRICHLET_SKIN) { + check_dirichlet_bc(localRange, localRange_ext, basis, bctype, rho_ho, phi_ho); } else if (bctype == GKYL_FEM_PARPROJ_NONE) { // Solution (checked continuity manually): const double sol[96] = { @@ -871,9 +934,17 @@ test_2x_weighted(int poly_order, enum gkyl_fem_parproj_bc_type bctype, bool use_ // Project distribution function on basis. gkyl_proj_on_basis *projob = gkyl_proj_on_basis_new(&grid, &basis, - poly_order+1, 1, bctype==GKYL_FEM_PARPROJ_DIRICHLET? evalFunc2x_dirichlet : evalFunc2x, NULL); + poly_order+1, 1, + bctype==GKYL_FEM_PARPROJ_DIRICHLET_GHOST || bctype==GKYL_FEM_PARPROJ_DIRICHLET_SKIN? evalFunc2x_dirichlet : evalFunc2x, + NULL); gkyl_proj_on_basis_advance(projob, 0.0, &localRange, rho_ho); + + if (bctype == GKYL_FEM_PARPROJ_DIRICHLET_GHOST) + // Fill the ghost cell so we can apply Dirichlet BCs. + ghost_from_skin_surf(false, dim, &skin_ghost, &basis, rho_ho); + gkyl_array_copy(rho, rho_ho); + // gkyl_grid_sub_array_write(&grid, &localRange, 0, rho_ho, "ctest_fem_parproj_2x_p1_rho_1.gkyl"); // Project the weight onto the basis. @@ -904,8 +975,8 @@ test_2x_weighted(int poly_order, enum gkyl_fem_parproj_bc_type bctype, bool use_ // Check that the field is continuous. check_continuity_par(localRange, basis, phi_ho); - if (bctype == GKYL_FEM_PARPROJ_DIRICHLET) - check_dirichlet_bc(localRange, basis, rho_ho, phi_ho); + if (bctype == GKYL_FEM_PARPROJ_DIRICHLET_GHOST || bctype == GKYL_FEM_PARPROJ_DIRICHLET_SKIN) + check_dirichlet_bc(localRange, localRange_ext, basis, bctype, rho_ho, phi_ho); gkyl_fem_parproj_release(parproj); gkyl_proj_on_basis_release(projob); @@ -1073,7 +1144,9 @@ test_3x(const int poly_order, enum gkyl_fem_parproj_bc_type bctype, bool use_gpu // projection updater for DG field. gkyl_proj_on_basis *projob = gkyl_proj_on_basis_new(&grid, &basis, - poly_order+1, 1, bctype==GKYL_FEM_PARPROJ_DIRICHLET? evalFunc3x_dirichlet : evalFunc3x, NULL); + poly_order+1, 1, + bctype==GKYL_FEM_PARPROJ_DIRICHLET_GHOST || bctype==GKYL_FEM_PARPROJ_DIRICHLET_SKIN? evalFunc3x_dirichlet : evalFunc3x, + NULL); // create DG field we wish to make continuous. struct gkyl_array *rho = mkarr(use_gpu, basis.num_basis, localRange_ext.volume); @@ -1085,7 +1158,13 @@ test_3x(const int poly_order, enum gkyl_fem_parproj_bc_type bctype, bool use_gpu // project distribution function on basis. gkyl_proj_on_basis_advance(projob, 0.0, &localRange, rho_ho); + + if (bctype == GKYL_FEM_PARPROJ_DIRICHLET_GHOST) + // Fill the ghost cell so we can apply Dirichlet BCs. + ghost_from_skin_surf(false, dim, &skin_ghost, &basis, rho_ho); + gkyl_array_copy(rho, rho_ho); + // gkyl_grid_sub_array_write(&grid, &localRange, 0, rho_ho, "ctest_fem_parproj_3x_p2_rho_1.gkyl"); // parallel FEM projection method. @@ -1110,8 +1189,8 @@ test_3x(const int poly_order, enum gkyl_fem_parproj_bc_type bctype, bool use_gpu check_continuity_par(localRange, basis, phi_ho); if (poly_order == 1) { - if (bctype == GKYL_FEM_PARPROJ_DIRICHLET) { - check_dirichlet_bc(localRange, basis, rho_ho, phi_ho); + if (bctype == GKYL_FEM_PARPROJ_DIRICHLET_GHOST || bctype == GKYL_FEM_PARPROJ_DIRICHLET_SKIN) { + check_dirichlet_bc(localRange, localRange_ext, basis, bctype, rho_ho, phi_ho); } else if (bctype == GKYL_FEM_PARPROJ_NONE) { // Solution (checked visually, also checked that phi is actually continuous, // and checked that visually looks like results in g2): @@ -1285,8 +1364,8 @@ test_3x(const int poly_order, enum gkyl_fem_parproj_bc_type bctype, bool use_gpu } } } if (poly_order == 2) { - if (bctype == GKYL_FEM_PARPROJ_DIRICHLET) { - check_dirichlet_bc(localRange, basis, rho_ho, phi_ho); + if (bctype == GKYL_FEM_PARPROJ_DIRICHLET_GHOST || bctype == GKYL_FEM_PARPROJ_DIRICHLET_SKIN) { + check_dirichlet_bc(localRange, localRange_ext, basis, bctype, rho_ho, phi_ho); } else if (bctype == GKYL_FEM_PARPROJ_NONE) { // Solution (checked visually against g2): const double sol[240] = { @@ -1456,57 +1535,96 @@ test_3x(const int poly_order, enum gkyl_fem_parproj_bc_type bctype, bool use_gpu } void test_1x_p1_bcnone_ho() {test_1x(1, GKYL_FEM_PARPROJ_NONE, false);} -void test_1x_p1_bcdirichlet_ho() {test_1x(1, GKYL_FEM_PARPROJ_DIRICHLET, false);} +void test_1x_p1_bcdirichlet_ho() { + test_1x(1, GKYL_FEM_PARPROJ_DIRICHLET_GHOST, false); + test_1x(1, GKYL_FEM_PARPROJ_DIRICHLET_SKIN, false); +} void test_1x_p1_bcperiodic_ho() {test_1x(1, GKYL_FEM_PARPROJ_PERIODIC, false);} void test_1x_p2_bcnone_ho() {test_1x(2, GKYL_FEM_PARPROJ_NONE, false);} -void test_1x_p2_bcdirichlet_ho() {test_1x(2, GKYL_FEM_PARPROJ_DIRICHLET, false);} +void test_1x_p2_bcdirichlet_ho() { + test_1x(2, GKYL_FEM_PARPROJ_DIRICHLET_GHOST, false); + test_1x(2, GKYL_FEM_PARPROJ_DIRICHLET_SKIN, false); +} void test_1x_p2_bcperiodic_ho() {test_1x(2, GKYL_FEM_PARPROJ_PERIODIC, false);} void test_2x_p1_bcnone_ho() {test_2x(1, GKYL_FEM_PARPROJ_NONE, false);} -void test_2x_p1_bcdirichlet_ho() {test_2x(1, GKYL_FEM_PARPROJ_DIRICHLET, false);} +void test_2x_p1_bcdirichlet_ho() { + test_2x(1, GKYL_FEM_PARPROJ_DIRICHLET_GHOST, false); + test_2x(1, GKYL_FEM_PARPROJ_DIRICHLET_SKIN, false); +} void test_2x_p1_bcperiodic_ho() {test_2x(1, GKYL_FEM_PARPROJ_PERIODIC, false);} -void test_2x_p1_weighted_ho() {test_2x_weighted(1, GKYL_FEM_PARPROJ_DIRICHLET, false);} +void test_2x_p1_weighted_ho() { + test_2x_weighted(1, GKYL_FEM_PARPROJ_DIRICHLET_GHOST, false); + test_2x_weighted(1, GKYL_FEM_PARPROJ_DIRICHLET_SKIN, false); +} void test_2x_p1_selfadjoint_ho() {test_2x_selfadjoint(1, GKYL_FEM_PARPROJ_NONE, false);} void test_2x_p2_bcnone_ho() {test_2x(2, GKYL_FEM_PARPROJ_NONE, false);} -void test_2x_p2_bcdirichlet_ho() {test_2x(2, GKYL_FEM_PARPROJ_DIRICHLET, false);} +void test_2x_p2_bcdirichlet_ho() { + test_2x(2, GKYL_FEM_PARPROJ_DIRICHLET_GHOST, false); + test_2x(2, GKYL_FEM_PARPROJ_DIRICHLET_SKIN, false); +} void test_2x_p2_bcperiodic_ho() {test_2x(2, GKYL_FEM_PARPROJ_PERIODIC, false);} void test_3x_p1_bcnone_ho() {test_3x(1, GKYL_FEM_PARPROJ_NONE, false);} -void test_3x_p1_bcdirichlet_ho() {test_3x(1, GKYL_FEM_PARPROJ_DIRICHLET, false);} +void test_3x_p1_bcdirichlet_ho() { + test_3x(1, GKYL_FEM_PARPROJ_DIRICHLET_GHOST, false); + test_3x(1, GKYL_FEM_PARPROJ_DIRICHLET_SKIN, false); +} void test_3x_p1_bcperiodic_ho() {test_3x(1, GKYL_FEM_PARPROJ_PERIODIC, false);} void test_3x_p2_bcnone_ho() {test_3x(2, GKYL_FEM_PARPROJ_NONE, false);} -void test_3x_p2_bcdirichlet_ho() {test_3x(2, GKYL_FEM_PARPROJ_DIRICHLET, false);} +void test_3x_p2_bcdirichlet_ho() { + test_3x(2, GKYL_FEM_PARPROJ_DIRICHLET_GHOST, false); + test_3x(2, GKYL_FEM_PARPROJ_DIRICHLET_SKIN, false); +} void test_3x_p2_bcperiodic_ho() {test_3x(2, GKYL_FEM_PARPROJ_PERIODIC, false);} #ifdef GKYL_HAVE_CUDA // ......... GPU tests ............ // void test_1x_p1_bcnone_dev() {test_1x(1, GKYL_FEM_PARPROJ_NONE, true);} -void test_1x_p1_bcdirichlet_dev() {test_1x(1, GKYL_FEM_PARPROJ_DIRICHLET, true);} +void test_1x_p1_bcdirichlet_dev() { + test_1x(1, GKYL_FEM_PARPROJ_DIRICHLET_GHOST, true); + test_1x(1, GKYL_FEM_PARPROJ_DIRICHLET_SKIN, true); +} void test_1x_p1_bcperiodic_dev() {test_1x(1, GKYL_FEM_PARPROJ_PERIODIC, true);} void test_1x_p2_bcnone_dev() {test_1x(2, GKYL_FEM_PARPROJ_NONE, true);} -void test_1x_p2_bcdirichlet_dev() {test_1x(2, GKYL_FEM_PARPROJ_DIRICHLET, true);} +void test_1x_p2_bcdirichlet_dev() { + test_1x(2, GKYL_FEM_PARPROJ_DIRICHLET_GHOST, true); + test_1x(2, GKYL_FEM_PARPROJ_DIRICHLET_SKIN, true); +} void test_1x_p2_bcperiodic_dev() {test_1x(2, GKYL_FEM_PARPROJ_PERIODIC, true);} void test_2x_p1_bcnone_dev() {test_2x(1, GKYL_FEM_PARPROJ_NONE, true);} -void test_2x_p1_bcdirichlet_dev() {test_2x(1, GKYL_FEM_PARPROJ_DIRICHLET, true);} +void test_2x_p1_bcdirichlet_dev() { + test_2x(1, GKYL_FEM_PARPROJ_DIRICHLET_GHOST, true); + test_2x(1, GKYL_FEM_PARPROJ_DIRICHLET_SKIN, true); +} void test_2x_p1_bcperiodic_dev() {test_2x(1, GKYL_FEM_PARPROJ_PERIODIC, true);} void test_2x_p1_weighted_dev() {test_2x_weighted(1, GKYL_FEM_PARPROJ_NONE, true);} void test_2x_p1_selfadjoint_dev() {test_2x_selfadjoint(1, GKYL_FEM_PARPROJ_NONE, true);} void test_2x_p2_bcnone_dev() {test_2x(2, GKYL_FEM_PARPROJ_NONE, true);} -void test_2x_p2_bcdirichlet_dev() {test_2x(2, GKYL_FEM_PARPROJ_DIRICHLET, true);} +void test_2x_p2_bcdirichlet_dev() { + test_2x(2, GKYL_FEM_PARPROJ_DIRICHLET_GHOST, true); + test_2x(2, GKYL_FEM_PARPROJ_DIRICHLET_SKIN, true); +} void test_2x_p2_bcperiodic_dev() {test_2x(2, GKYL_FEM_PARPROJ_PERIODIC, true);} void test_3x_p1_bcnone_dev() {test_3x(1, GKYL_FEM_PARPROJ_NONE, true);} -void test_3x_p1_bcdirichlet_dev() {test_3x(1, GKYL_FEM_PARPROJ_DIRICHLET, true);} +void test_3x_p1_bcdirichlet_dev() { + test_3x(1, GKYL_FEM_PARPROJ_DIRICHLET_GHOST, true); + test_3x(1, GKYL_FEM_PARPROJ_DIRICHLET_SKIN, true); +} void test_3x_p1_bcperiodic_dev() {test_3x(1, GKYL_FEM_PARPROJ_PERIODIC, true);} void test_3x_p2_bcnone_dev() {test_3x(2, GKYL_FEM_PARPROJ_NONE, true);} -void test_3x_p2_bcdirichlet_dev() {test_3x(2, GKYL_FEM_PARPROJ_DIRICHLET, true);} +void test_3x_p2_bcdirichlet_dev() { + test_3x(2, GKYL_FEM_PARPROJ_DIRICHLET_GHOST, true); + test_3x(2, GKYL_FEM_PARPROJ_DIRICHLET_SKIN, true); +} void test_3x_p2_bcperiodic_dev() {test_3x(2, GKYL_FEM_PARPROJ_PERIODIC, true);} #endif diff --git a/gyrokinetic/unit/ctest_fem_poisson_perp.c b/gyrokinetic/unit/ctest_fem_poisson_perp.c index f2b1a9d245..ecae6eec7b 100644 --- a/gyrokinetic/unit/ctest_fem_poisson_perp.c +++ b/gyrokinetic/unit/ctest_fem_poisson_perp.c @@ -158,137 +158,37 @@ void evalFunc_consteps_dirichletx_neumannx_2x(double t, const double *xn, double fout[0] *= (1.+kz*z); } -void -test_fem_poisson_perp_consteps_2x(int poly_order, const int *cells, struct gkyl_poisson_bc bcs, bool use_gpu) -{ - double epsilon_0 = 1.0; - double lower[] = {-M_PI,-M_PI}, upper[] = {M_PI,M_PI}; - if ( (bcs.lo_type[0]==GKYL_POISSON_DIRICHLET && bcs.up_type[0]==GKYL_POISSON_DIRICHLET) - || (bcs.lo_type[0]==GKYL_POISSON_NEUMANN && bcs.up_type[0]==GKYL_POISSON_DIRICHLET) - || (bcs.lo_type[0]==GKYL_POISSON_DIRICHLET && bcs.up_type[0]==GKYL_POISSON_NEUMANN) ) - { - lower[0] = 0.; upper[0] = 1.; - } - int dim = sizeof(lower)/sizeof(lower[0]); - int dim_perp = dim-1; - - // Grids. - struct gkyl_rect_grid grid; - gkyl_rect_grid_init(&grid, dim, lower, upper, cells); - - // Basis functions. +// Persistent objects created by consteps test. +struct fem_poisson_perp_consteps_objs { + struct gkyl_fem_poisson_perp *poisson; + struct gkyl_array *eps; + struct gkyl_array *rho; + struct gkyl_array *phi; + struct gkyl_array *phisol_ho; + struct gkyl_array *rho_ho; + struct gkyl_array *phi_ho; + struct gkyl_range localRange, localRange_ext; struct gkyl_basis basis; - gkyl_cart_modal_serendip(&basis, dim, poly_order); - - int ghost[] = { 1, 1 }; - struct gkyl_range localRange, localRange_ext; // local, local-ext ranges. - gkyl_create_grid_ranges(&grid, ghost, &localRange_ext, &localRange); - - // Projection updater for DG field. - gkyl_proj_on_basis *projob, *projob_sol; - if (bcs.lo_type[0]==GKYL_POISSON_PERIODIC && bcs.up_type[0]==GKYL_POISSON_PERIODIC) { - projob = gkyl_proj_on_basis_new(&grid, &basis, - poly_order+1, 1, evalFunc_consteps_periodicx_2x, NULL); - projob_sol = gkyl_proj_on_basis_new(&grid, &basis, - 2*(poly_order+1), 1, evalFunc_consteps_periodicx_sol_2x, NULL); - } else if (bcs.lo_type[0]==GKYL_POISSON_DIRICHLET && bcs.up_type[0]==GKYL_POISSON_DIRICHLET) { - projob = gkyl_proj_on_basis_new(&grid, &basis, - poly_order+1, 1, evalFunc_consteps_dirichletx_2x, NULL); - projob_sol = gkyl_proj_on_basis_new(&grid, &basis, - 2*(poly_order+1), 1, evalFunc_consteps_dirichletx_sol_2x, NULL); - } else if (bcs.lo_type[0]==GKYL_POISSON_NEUMANN && bcs.up_type[0]==GKYL_POISSON_DIRICHLET) { - projob = gkyl_proj_on_basis_new(&grid, &basis, - poly_order+1, 1, evalFunc_consteps_neumannx_dirichletx_2x, NULL); - projob_sol = gkyl_proj_on_basis_new(&grid, &basis, - 2*(poly_order+1), 1, evalFunc_consteps_neumannx_dirichletx_sol_2x, NULL); - } else if (bcs.lo_type[0]==GKYL_POISSON_DIRICHLET && bcs.up_type[0]==GKYL_POISSON_NEUMANN) { - projob = gkyl_proj_on_basis_new(&grid, &basis, - poly_order+1, 1, evalFunc_consteps_dirichletx_neumannx_2x, NULL); - projob_sol = gkyl_proj_on_basis_new(&grid, &basis, - 2*(poly_order+1), 1, evalFunc_consteps_dirichletx_neumannx_sol_2x, NULL); - } - - // Create DG field we wish to make continuous. - struct gkyl_array *rho = mkarr(use_gpu, basis.num_basis, localRange_ext.volume); - // Create array holding continuous field we'll compute. - struct gkyl_array *phi = mkarr(use_gpu, basis.num_basis, localRange_ext.volume); - // Create DG field for permittivity tensor. - int epsnum = dim_perp+ceil((pow(3.,dim_perp-1)-dim_perp)/2); - struct gkyl_array *eps = mkarr(use_gpu, epsnum*basis.num_basis, localRange_ext.volume); - // Analytic solution. - struct gkyl_array *phisol_ho = mkarr(false, basis.num_basis, localRange_ext.volume); - // Device copies: - struct gkyl_array *rho_ho, *phi_ho; - if (use_gpu) { - rho_ho = mkarr(false, rho->ncomp, rho->size); - phi_ho = mkarr(false, phi->ncomp, phi->size); - } - else { - rho_ho = gkyl_array_acquire(rho); - phi_ho = gkyl_array_acquire(phi); - } - - // Project RHS charge density on basis. - gkyl_proj_on_basis_advance(projob, 0.0, &localRange, rho_ho); - gkyl_array_copy(rho, rho_ho); - - // Project the permittivity onto the basis. - double dg0norm = pow(sqrt(2.),dim); - gkyl_array_shiftc(eps, epsilon_0*dg0norm, 0*basis.num_basis); - - // Project the analytic solution. - gkyl_proj_on_basis_advance(projob_sol, 0.0, &localRange, phisol_ho); - - // FEM poisson solver. - struct gkyl_fem_poisson_perp *poisson = gkyl_fem_poisson_perp_new(&localRange, &grid, basis, &bcs, eps, NULL, use_gpu); - -// struct gkyl_fem_parproj* smooth_op = gkyl_fem_parproj_new(&localRange, &localRange_ext, &basis, GKYL_FEM_PARPROJ_DIRICHLET, NULL, use_gpu); -// gkyl_fem_parproj_set_rhs(smooth_op, rho, rho); -// gkyl_fem_parproj_solve (smooth_op, rho); - - // Set the RHS source. - gkyl_fem_poisson_perp_set_rhs(poisson, rho); - - // Solve the problem. - gkyl_fem_poisson_perp_solve(poisson, phi); - gkyl_array_copy(phi_ho, phi); - -// gkyl_fem_parproj_set_rhs(smooth_op, phi, phi); -// gkyl_fem_parproj_solve (smooth_op, phi); -// gkyl_fem_parproj_release(smooth_op); +}; - if (bcs.lo_type[0] == GKYL_POISSON_PERIODIC) { - // Subtract the volume averaged sol from the numerical and analytic solutions. - // This is not strictly necessary, as the potential is only known up to - // constant shift, but it makes unit testing more robust across CPU/GPU. - struct gkyl_array *sol_cellavg = gkyl_array_new(GKYL_DOUBLE, 1, localRange_ext.volume); - double sol_avg[1]; - // Factor accounting for normalization when subtracting a constant from a - // DG field and the 1/N to properly compute the volume averaged RHS. - double mavgfac = -pow(sqrt(2.),dim); // /perpRange.volume; - // Subtract the volume averaged sol from the sol. - gkyl_array_clear(sol_cellavg, 0.0); - gkyl_dg_calc_average_range(basis, 0, sol_cellavg, 0, phi_ho, localRange); - for (int kIdx=0; kIdxpoisson); + gkyl_array_release(objs->eps); + gkyl_array_release(objs->rho); + gkyl_array_release(objs->phi); + gkyl_array_release(objs->phisol_ho); + gkyl_array_release(objs->rho_ho); + gkyl_array_release(objs->phi_ho); + gkyl_free(objs); +} -// double errL2 = error_L2norm(grid, localRange, basis, phi, phisol); -// printf("error L2 norm = %g\n",errL2); +void +fem_poisson_perp_consteps_2x_check(struct fem_poisson_perp_consteps_objs *objs, + int poly_order, struct gkyl_poisson_bc bcs, double scale_fac) +{ + // Check results in fem_poisson_perp_consteps_2x test. if (poly_order == 1) { if (bcs.lo_type[0] == GKYL_POISSON_PERIODIC && bcs.up_type[0] == GKYL_POISSON_PERIODIC) { @@ -297,14 +197,14 @@ test_fem_poisson_perp_consteps_2x(int poly_order, const int *cells, struct gkyl_ // }; // long i = 0; // struct gkyl_range_iter iter; -// gkyl_range_iter_init(&iter, &localRange); +// gkyl_range_iter_init(&iter, &objs->localRange); // while (gkyl_range_iter_next(&iter)) { -// long loc = gkyl_range_idx(&localRange, iter.idx); +// long loc = gkyl_range_idx(&objs->localRange, iter.idx); // const double *phi_p = gkyl_array_cfetch(phi_ho, loc); // // Only check one cell in z: -// for (int m=0; mbasis.num_basis; m++) { +// TEST_CHECK( gkyl_compare(sol[i]*scale_fac, phi_p[m], 1e-10) ); +// TEST_MSG("Expected: %.13e in cell (%d,%d,%d)", sol[i]*scale_fac, iter.idx[0], iter.idx[1], iter.idx[2]); // TEST_MSG("Produced: %.13e", phi_p[m]); // i += 1; // } @@ -386,14 +286,14 @@ test_fem_poisson_perp_consteps_2x(int poly_order, const int *cells, struct gkyl_ }; long i = 0; struct gkyl_range_iter iter; - gkyl_range_iter_init(&iter, &localRange); + gkyl_range_iter_init(&iter, &objs->localRange); while (gkyl_range_iter_next(&iter)) { - long loc = gkyl_range_idx(&localRange, iter.idx); - const double *phi_p = gkyl_array_cfetch(phi_ho, loc); + long loc = gkyl_range_idx(&objs->localRange, iter.idx); + const double *phi_p = gkyl_array_cfetch(objs->phi_ho, loc); // Only check one cell in z: - for (int m=0; mbasis.num_basis; m++) { + TEST_CHECK( gkyl_compare(sol[i]*scale_fac, phi_p[m], 1e-10) ); + TEST_MSG("Expected: %.13e in cell (%d,%d,%d)", sol[i]*scale_fac, iter.idx[0], iter.idx[1], iter.idx[2]); TEST_MSG("Produced: %.13e", phi_p[m]); i += 1; } @@ -475,14 +375,14 @@ test_fem_poisson_perp_consteps_2x(int poly_order, const int *cells, struct gkyl_ }; long i = 0; struct gkyl_range_iter iter; - gkyl_range_iter_init(&iter, &localRange); + gkyl_range_iter_init(&iter, &objs->localRange); while (gkyl_range_iter_next(&iter)) { - long loc = gkyl_range_idx(&localRange, iter.idx); - const double *phi_p = gkyl_array_cfetch(phi_ho, loc); + long loc = gkyl_range_idx(&objs->localRange, iter.idx); + const double *phi_p = gkyl_array_cfetch(objs->phi_ho, loc); // Only check one cell in z: - for (int m=0; mbasis.num_basis; m++) { + TEST_CHECK( gkyl_compare(sol[i]*scale_fac, phi_p[m], 1e-10) ); + TEST_MSG("Expected: %.13e in cell (%d,%d,%d)", sol[i]*scale_fac, iter.idx[0], iter.idx[1], iter.idx[2]); TEST_MSG("Produced: %.13e", phi_p[m]); i += 1; } @@ -564,14 +464,14 @@ test_fem_poisson_perp_consteps_2x(int poly_order, const int *cells, struct gkyl_ }; long i = 0; struct gkyl_range_iter iter; - gkyl_range_iter_init(&iter, &localRange); + gkyl_range_iter_init(&iter, &objs->localRange); while (gkyl_range_iter_next(&iter)) { - long loc = gkyl_range_idx(&localRange, iter.idx); - const double *phi_p = gkyl_array_cfetch(phi_ho, loc); + long loc = gkyl_range_idx(&objs->localRange, iter.idx); + const double *phi_p = gkyl_array_cfetch(objs->phi_ho, loc); // Only check one cell in z: - for (int m=0; mbasis.num_basis; m++) { + TEST_CHECK( gkyl_compare(sol[i]*scale_fac, phi_p[m], 1e-10) ); + TEST_MSG("Expected: %.13e in cell (%d,%d,%d)", sol[i]*scale_fac, iter.idx[0], iter.idx[1], iter.idx[2]); TEST_MSG("Produced: %.13e", phi_p[m]); i += 1; } @@ -585,297 +485,193 @@ test_fem_poisson_perp_consteps_2x(int poly_order, const int *cells, struct gkyl_ TEST_MSG("This poly_order is not available"); } -// gkyl_grid_sub_array_write(&grid, &localRange, 0, rho_ho, "ctest_fem_poisson_perp_2x_rho_1.gkyl"); -// gkyl_grid_sub_array_write(&grid, &localRange, 0, phi_ho, "ctest_fem_poisson_perp_2x_phi_8x8_p1.gkyl"); -// gkyl_grid_sub_array_write(&grid, &localRange, 0, phisol_ho, "ctest_fem_poisson_perp_2x_phisol_8x8_p1.gkyl"); - - gkyl_fem_poisson_perp_release(poisson); - gkyl_proj_on_basis_release(projob); - gkyl_proj_on_basis_release(projob_sol); - gkyl_array_release(rho); - gkyl_array_release(eps); - gkyl_array_release(phi); - gkyl_array_release(phisol_ho); - gkyl_array_release(rho_ho); - gkyl_array_release(phi_ho); } -void evalFunc_consteps_periodicx_periodicy_sol_3x(double t, const double *xn, double* restrict fout, void *ctx) -{ - double x = xn[0], y = xn[1], z = xn[2]; - // These values have to match those in the test below. - double gxx = 1.0, gxy = 0., gyy = 1.0; - double amn[] = {0., 10., 0., 10., 0., 0., 10., 0., 0.}; - double bmn[] = {0., 10., 0., 10., 0., 0., 10., 0., 0.}; - fout[0] = 0.; - for (int m=1; m<4; m++) { - for (int n=1; n<4; n++) { - double a = amn[(m-1)*3+(n-1)]; - double b = bmn[(m-1)*3+(n-1)]; - double t1 = a*cos(m*x)*cos(n*y); - double t2 = b*sin(m*x)*sin(n*y); - fout[0] += t1+t2; - } - } - double kz = 1.; - fout[0] *= (1.+kz*z); -// fout[0] *= (1.+kz*z+0.5*pow(z,2)); -} -void evalFunc_consteps_periodicx_periodicy_3x(double t, const double *xn, double* restrict fout, void *ctx) +struct fem_poisson_perp_consteps_objs* +test_fem_poisson_perp_consteps_2x_objs(int poly_order, const int *cells, struct gkyl_poisson_bc bcs, bool use_gpu) { - double x = xn[0], y = xn[1], z = xn[2]; - // These values have to match those in the test below. - double gxx = 1.0, gxy = 0., gyy = 1.0; - double amn[] = {0., 10., 0., 10., 0., 0., 10., 0., 0.}; - double bmn[] = {0., 10., 0., 10., 0., 0., 10., 0., 0.}; - fout[0] = 0.; - for (int m=1; m<4; m++) { - for (int n=1; n<4; n++) { - double a = amn[(m-1)*3+(n-1)]; - double b = bmn[(m-1)*3+(n-1)]; - double t1 = (a*gxx*pow(m,2) - 2*b*gxy*m*n + a*gyy*pow(n,2))*cos(m*x)*cos(n*y); - double t2 = (b*gxx*pow(m,2) - 2*a*gxy*m*n + b*gyy*pow(n,2))*sin(m*x)*sin(n*y); - fout[0] += t1+t2; - } + double epsilon_0 = 1.0; + double lower[] = {-M_PI,-M_PI}, upper[] = {M_PI,M_PI}; + if ( (bcs.lo_type[0]==GKYL_POISSON_DIRICHLET && bcs.up_type[0]==GKYL_POISSON_DIRICHLET) + || (bcs.lo_type[0]==GKYL_POISSON_NEUMANN && bcs.up_type[0]==GKYL_POISSON_DIRICHLET) + || (bcs.lo_type[0]==GKYL_POISSON_DIRICHLET && bcs.up_type[0]==GKYL_POISSON_NEUMANN) ) + { + lower[0] = 0.; upper[0] = 1.; } - double kz = 1.; - fout[0] *= (1.+kz*z); -// fout[0] *= (1.+kz*z+0.5*pow(z,2)); -} + int dim = sizeof(lower)/sizeof(lower[0]); + int dim_perp = dim-1; -void evalFunc_consteps_dirichletx_dirichlety_sol_3x(double t, const double *xn, double* restrict fout, void *ctx) -{ - double x = xn[0], y = xn[1], z = xn[2]; - double a = 2.; - double c[] = {a/12.-1./2., 0.}; - double b = 2.; - double d[] = {b/12.-1./2., 0.}; - double kz = 1.; - double xp = x, yp = y, zp = z; - fout[0] = poly_test_func_1x(xp, a, c)*poly_test_func_1x(yp, b, d) -// *sin(kz*z); - *(1.+kz*z); -// *(1.+kz*z+0.5*pow(z,2)); -} -void evalFunc_consteps_dirichletx_dirichlety_3x(double t, const double *xn, double* restrict fout, void *ctx) -{ - double x = xn[0], y = xn[1], z = xn[2]; - double a = 2.; - double c[] = {a/12.-1./2., 0.}; - double b = 2.; - double d[] = {b/12.-1./2., 0.}; - double kz = 1.; - double xp = x, yp = y, zp = z; - fout[0] = -( (1 - b*pow(yp,2))*poly_test_func_1x(xp, a, c) - +(1 - a*pow(xp,2))*poly_test_func_1x(yp, b, d) ) -// *sin(kz*z); - *(1.+kz*z); -// *(1.+kz*z+0.5*pow(z,2)); -} + struct fem_poisson_perp_consteps_objs *objs = gkyl_malloc(sizeof(*objs)); -void evalFunc_consteps_dirichletx_periodicy_sol_3x(double t, const double *xn, double* restrict fout, void *ctx) -{ - double x = xn[0], y = xn[1], z = xn[2]; - double a = 2.; - double c[] = {a/12.-1./2., 0.}; - double n = 2.; - fout[0] = poly_test_func_1x(x, a, c)*sin(n*y); + // Grids. + struct gkyl_rect_grid grid; + gkyl_rect_grid_init(&grid, dim, lower, upper, cells); - double kz = 1.; - fout[0] *= (1.+kz*z); -} -void evalFunc_consteps_dirichletx_periodicy_3x(double t, const double *xn, double* restrict fout, void *ctx) -{ - double x = xn[0], y = xn[1], z = xn[2]; - double a = 2.; - double c[] = {a/12.-1./2., 0.}; - double n = 2.; - fout[0] = -( (1-a*pow(x,2))*sin(n*y) - -pow(n,2)*poly_test_func_1x(x, a, c)*sin(n*y) ); + // Basis functions. + gkyl_cart_modal_serendip(&objs->basis, dim, poly_order); - double kz = 1.; - fout[0] *= (1.+kz*z); -} + int ghost[] = { 1, 1 }; + gkyl_create_grid_ranges(&grid, ghost, &objs->localRange_ext, &objs->localRange); -void evalFunc_consteps_periodicx_dirichlety_sol_3x(double t, const double *xn, double* restrict fout, void *ctx) -{ - double x = xn[0], y = xn[1], z = xn[2]; - double b = 2.; - double d[] = {b/12.-1./2., 0.}; - double m = 2.; - fout[0] = sin(m*x)*poly_test_func_1x(y, b, d); + // Projection updater for DG field. + gkyl_proj_on_basis *projob, *projob_sol; + if (bcs.lo_type[0]==GKYL_POISSON_PERIODIC && bcs.up_type[0]==GKYL_POISSON_PERIODIC) { + projob = gkyl_proj_on_basis_new(&grid, &objs->basis, + poly_order+1, 1, evalFunc_consteps_periodicx_2x, NULL); + projob_sol = gkyl_proj_on_basis_new(&grid, &objs->basis, + 2*(poly_order+1), 1, evalFunc_consteps_periodicx_sol_2x, NULL); + } else if (bcs.lo_type[0]==GKYL_POISSON_DIRICHLET && bcs.up_type[0]==GKYL_POISSON_DIRICHLET) { + projob = gkyl_proj_on_basis_new(&grid, &objs->basis, + poly_order+1, 1, evalFunc_consteps_dirichletx_2x, NULL); + projob_sol = gkyl_proj_on_basis_new(&grid, &objs->basis, + 2*(poly_order+1), 1, evalFunc_consteps_dirichletx_sol_2x, NULL); + } else if (bcs.lo_type[0]==GKYL_POISSON_NEUMANN && bcs.up_type[0]==GKYL_POISSON_DIRICHLET) { + projob = gkyl_proj_on_basis_new(&grid, &objs->basis, + poly_order+1, 1, evalFunc_consteps_neumannx_dirichletx_2x, NULL); + projob_sol = gkyl_proj_on_basis_new(&grid, &objs->basis, + 2*(poly_order+1), 1, evalFunc_consteps_neumannx_dirichletx_sol_2x, NULL); + } else if (bcs.lo_type[0]==GKYL_POISSON_DIRICHLET && bcs.up_type[0]==GKYL_POISSON_NEUMANN) { + projob = gkyl_proj_on_basis_new(&grid, &objs->basis, + poly_order+1, 1, evalFunc_consteps_dirichletx_neumannx_2x, NULL); + projob_sol = gkyl_proj_on_basis_new(&grid, &objs->basis, + 2*(poly_order+1), 1, evalFunc_consteps_dirichletx_neumannx_sol_2x, NULL); + } - double kz = 1.; - fout[0] *= (1.+kz*z); -} -void evalFunc_consteps_periodicx_dirichlety_3x(double t, const double *xn, double* restrict fout, void *ctx) -{ - double x = xn[0], y = xn[1], z = xn[2]; - double b = 2.; - double d[] = {b/12.-1./2., 0.}; - double m = 2.; - fout[0] = -( (1-b*pow(y,2))*sin(m*x) - -pow(m,2)*poly_test_func_1x(y, b, d)*sin(m*x) ); + // Create DG field we wish to make continuous. + objs->rho = mkarr(use_gpu, objs->basis.num_basis, objs->localRange_ext.volume); + // Create array holding continuous field we'll compute. + objs->phi = mkarr(use_gpu, objs->basis.num_basis, objs->localRange_ext.volume); + // Create DG field for permittivity tensor. + int epsnum = dim_perp+ceil((pow(3.,dim_perp-1)-dim_perp)/2); + objs->eps = mkarr(use_gpu, epsnum*objs->basis.num_basis, objs->localRange_ext.volume); + // Analytic solution. + objs->phisol_ho = mkarr(false, objs->basis.num_basis, objs->localRange_ext.volume); + // Device copies: + if (use_gpu) { + objs->rho_ho = mkarr(false, objs->rho->ncomp, objs->rho->size); + objs->phi_ho = mkarr(false, objs->phi->ncomp, objs->phi->size); + } + else { + objs->rho_ho = gkyl_array_acquire(objs->rho); + objs->phi_ho = gkyl_array_acquire(objs->phi); + } - double kz = 1.; - fout[0] *= (1.+kz*z); -} + // Project RHS charge density on basis. + gkyl_proj_on_basis_advance(projob, 0.0, &objs->localRange, objs->rho_ho); + gkyl_proj_on_basis_release(projob); + gkyl_array_copy(objs->rho, objs->rho_ho); -void evalFunc_consteps_dirichletx_neumanny_dirichlety_sol_3x(double t, const double *xn, double* restrict fout, void *ctx) -{ - double x = xn[0], y = xn[1], z = xn[2]; - double a = 2.; - double c[] = {a/12.-1./2., 0.}; - double b = 5.; - double d[] = {0., b/12.-1./2.}; - fout[0] = poly_test_func_1x(x, a, c)*poly_test_func_1x(y, b, d); + // Project the permittivity onto the basis. + double dg0norm = pow(sqrt(2.),dim); + gkyl_array_shiftc(objs->eps, epsilon_0*dg0norm, 0*objs->basis.num_basis); - double kz = 1.; - fout[0] *= (1.+kz*z); -} -void evalFunc_consteps_dirichletx_neumanny_dirichlety_3x(double t, const double *xn, double* restrict fout, void *ctx) -{ - double x = xn[0], y = xn[1], z = xn[2]; - double a = 2.; - double c[] = {a/12.-1./2., 0.}; - double b = 5.; - double d[] = {0., b/12.-1./2.}; - fout[0] = -( (1 - b*pow(y,2))*poly_test_func_1x(x, a, c) - +(1 - a*pow(x,2))*poly_test_func_1x(y, b, d) ); + // Project the analytic solution. + gkyl_proj_on_basis_advance(projob_sol, 0.0, &objs->localRange, objs->phisol_ho); + gkyl_proj_on_basis_release(projob_sol); - double kz = 1.; - fout[0] *= (1.+kz*z); -} + // FEM poisson solver. + objs->poisson = gkyl_fem_poisson_perp_new(&objs->localRange, &grid, objs->basis, &bcs, NULL, objs->eps, NULL, use_gpu); -void evalFunc_consteps_dirichletx_dirichlety_neumanny_sol_3x(double t, const double *xn, double* restrict fout, void *ctx) -{ - double x = xn[0], y = xn[1], z = xn[2]; - double a = 2.; - double c[] = {a/12.-1./2., 0.}; - double b = 5.; - double d[] = {0., b/12.-1./2.}; - fout[0] = poly_test_func_1x(x, a, c)*poly_test_func_1x(y-1., b, d); +// struct gkyl_fem_parproj* smooth_op = gkyl_fem_parproj_new(&objs->localRange, &objs->localRange_ext, &objs->basis, GKYL_FEM_PARPROJ_DIRICHLET, NULL, use_gpu); +// gkyl_fem_parproj_set_rhs(smooth_op, objs->rho, objs->rho); +// gkyl_fem_parproj_solve (smooth_op, objs->rho); - double kz = 1.; - fout[0] *= (1.+kz*z); -} -void evalFunc_consteps_dirichletx_dirichlety_neumanny_3x(double t, const double *xn, double* restrict fout, void *ctx) -{ - double x = xn[0], y = xn[1], z = xn[2]; - double a = 2.; - double c[] = {a/12.-1./2., 0.}; - double b = 5.; - double d[] = {0., b/12.-1./2.}; - fout[0] = -( (1 - b*pow(y-1.,2))*poly_test_func_1x(x , a, c) - +(1 - a*pow(x ,2))*poly_test_func_1x(y-1., b, d) ); + // Set the RHS source. + gkyl_fem_poisson_perp_set_rhs(objs->poisson, objs->rho); - double kz = 1.; - fout[0] *= (1.+kz*z); -} + // Solve the problem. + gkyl_fem_poisson_perp_solve(objs->poisson, objs->phi); + gkyl_array_copy(objs->phi_ho, objs->phi); -void evalFunc_consteps_neumannx_dirichletx_dirichlety_sol_3x(double t, const double *xn, double* restrict fout, void *ctx) -{ - double x = xn[0], y = xn[1], z = xn[2]; - double a = 5.; - double c[] = {0., a/12.-1./2.}; - double b = 2.; - double d[] = {b/12.-1./2., 0.}; - fout[0] = poly_test_func_1x(x, a, c)*poly_test_func_1x(y, b, d); +// gkyl_fem_parproj_set_rhs(smooth_op, phi, phi); +// gkyl_fem_parproj_solve (smooth_op, phi); +// gkyl_fem_parproj_release(smooth_op); - double kz = 1.; - fout[0] *= (1.+kz*z); -} -void evalFunc_consteps_neumannx_dirichletx_dirichlety_3x(double t, const double *xn, double* restrict fout, void *ctx) -{ - double x = xn[0], y = xn[1], z = xn[2]; - double a = 5.; - double c[] = {0., a/12.-1./2.}; - double b = 2.; - double d[] = {b/12.-1./2., 0.}; - fout[0] = -( (1 - b*pow(y,2))*poly_test_func_1x(x, a, c) - +(1 - a*pow(x,2))*poly_test_func_1x(y, b, d) ); + if (bcs.lo_type[0] == GKYL_POISSON_PERIODIC) { + // Subtract the volume averaged sol from the numerical and analytic solutions. + // This is not strictly necessary, as the potential is only known up to + // constant shift, but it makes unit testing more robust across CPU/GPU. + struct gkyl_array *sol_cellavg = gkyl_array_new(GKYL_DOUBLE, 1, objs->localRange_ext.volume); + double sol_avg[1]; + // Factor accounting for normalization when subtracting a constant from a + // DG field and the 1/N to properly compute the volume averaged RHS. + double mavgfac = -pow(sqrt(2.),dim); // /perpRange.volume; + // Subtract the volume averaged sol from the sol. + gkyl_array_clear(sol_cellavg, 0.0); + gkyl_dg_calc_average_range(objs->basis, 0, sol_cellavg, 0, objs->phi_ho, objs->localRange); + for (int kIdx=0; kIdxlocalRange, (int[]){0,0,1}, (int[]){0,0,kIdx+1}); + gkyl_array_reduce_range(sol_avg, sol_cellavg, GKYL_SUM, &perp_range); + gkyl_array_shiftc_range(objs->phi_ho, mavgfac*sol_avg[0]/perp_range.volume, 0, &perp_range); + } + // Now do the same to the analytic solution. + gkyl_array_clear(sol_cellavg, 0.0); + gkyl_dg_calc_average_range(objs->basis, 0, sol_cellavg, 0, objs->phisol_ho, objs->localRange); + for (int kIdx=0; kIdxlocalRange, (int[]){0,0,1}, (int[]){0,0,kIdx+1}); + gkyl_array_reduce_range(sol_avg, sol_cellavg, GKYL_SUM, &perp_range); + gkyl_array_shiftc_range(objs->phisol_ho, mavgfac*sol_avg[0]/perp_range.volume, 0, &perp_range); + } + gkyl_array_release(sol_cellavg); + } - double kz = 1.; - fout[0] *= (1.+kz*z); -} +// double errL2 = error_L2norm(grid, objs->localRange, objs->basis, phi, phisol); +// printf("error L2 norm = %g\n",errL2); -void evalFunc_consteps_dirichletx_neumannx_dirichlety_sol_3x(double t, const double *xn, double* restrict fout, void *ctx) -{ - double x = xn[0], y = xn[1], z = xn[2]; - double a = 5.; - double c[] = {0., a/12.-1./2.}; - double b = 2.; - double d[] = {b/12.-1./2., 0.}; - fout[0] = poly_test_func_1x(x-1., a, c)*poly_test_func_1x(y, b, d); + // Check results for correctness. + fem_poisson_perp_consteps_2x_check(objs, poly_order, bcs, 1.0); - double kz = 1.; - fout[0] *= (1.+kz*z); -} -void evalFunc_consteps_dirichletx_neumannx_dirichlety_3x(double t, const double *xn, double* restrict fout, void *ctx) -{ - double x = xn[0], y = xn[1], z = xn[2]; - double a = 5.; - double c[] = {0., a/12.-1./2.}; - double b = 2.; - double d[] = {b/12.-1./2., 0.}; - fout[0] = -( (1 - b*pow(y ,2))*poly_test_func_1x(x-1., a, c) - +(1 - a*pow(x-1.,2))*poly_test_func_1x(y , b, d) ); +// gkyl_grid_sub_array_write(&grid, &localRange, 0, objs->rho_ho, "ctest_fem_poisson_perp_2x_rho_1.gkyl"); +// gkyl_grid_sub_array_write(&grid, &localRange, 0, objs->phi_ho, "ctest_fem_poisson_perp_2x_phi_8x8_p1.gkyl"); +// gkyl_grid_sub_array_write(&grid, &localRange, 0, objs->phisol_ho, "ctest_fem_poisson_perp_2x_phisol_8x8_p1.gkyl"); - double kz = 1.; - fout[0] *= (1.+kz*z); + return objs; } -void evalFunc_consteps_neumannx_dirichletx_periodicy_sol_3x(double t, const double *xn, double* restrict fout, void *ctx) +void +test_fem_poisson_perp_consteps_2x(int poly_order, const int *cells, struct gkyl_poisson_bc bcs, bool use_gpu) { - double x = xn[0], y = xn[1], z = xn[2]; - double a = 5.; - double c[] = {0., a/12.-1./2.}; - double n = 2.; - fout[0] = poly_test_func_1x(x, a, c)*sin(n*y); - - double kz = 1.; - fout[0] *= (1.+kz*z); + struct fem_poisson_perp_consteps_objs *objs = test_fem_poisson_perp_consteps_2x_objs(poly_order, cells, bcs, use_gpu); + fem_poisson_perp_consteps_objs_release(objs); } -void evalFunc_consteps_neumannx_dirichletx_periodicy_3x(double t, const double *xn, double* restrict fout, void *ctx) + +void +test_fem_poisson_perp_consteps_2x_update(int poly_order, const int *cells, struct gkyl_poisson_bc bcs, bool use_gpu) { - double x = xn[0], y = xn[1], z = xn[2]; - double a = 5.; - double c[] = {0., a/12.-1./2.}; - double n = 2.; - fout[0] = -( (1 - a*pow(x,2))*sin(n*y) - -pow(n,2)*sin(n*y)*poly_test_func_1x(x, a, c) ); + // Run the first test. + struct fem_poisson_perp_consteps_objs *objs = test_fem_poisson_perp_consteps_2x_objs(poly_order, cells, bcs, use_gpu); - double kz = 1.; - fout[0] *= (1.+kz*z); + // Now update the LHS matrix. Multiply it by a constant so the solution should be the same as before but divided by that constant. + double prob_fac = 1.3; + gkyl_array_scale(objs->eps, prob_fac); + gkyl_fem_poisson_perp_update_lhs(objs->poisson, objs->eps, NULL); + + // Set the RHS source. + gkyl_fem_poisson_perp_set_rhs(objs->poisson, objs->rho); + + // Solve the problem. + gkyl_fem_poisson_perp_solve(objs->poisson, objs->phi); + gkyl_array_copy(objs->phi_ho, objs->phi); + + // Check results for correctness. + fem_poisson_perp_consteps_2x_check(objs, poly_order, bcs, 1.0/prob_fac); + + // Release persistent objects. + fem_poisson_perp_consteps_objs_release(objs); } void -test_fem_poisson_perp_consteps_3x(int poly_order, const int *cells, struct gkyl_poisson_bc bcs, bool use_gpu) +test_fem_poisson_perp_consteps_2x_bias(int poly_order, const int *cells, struct gkyl_poisson_bc bcs, bool use_gpu) { double epsilon_0 = 1.0; - double lower[] = {-M_PI,-M_PI,-M_PI}, upper[] = {M_PI,M_PI,M_PI}; - if ( ((bcs.lo_type[0]==GKYL_POISSON_DIRICHLET && bcs.up_type[0]==GKYL_POISSON_DIRICHLET) && - (bcs.lo_type[1]==GKYL_POISSON_DIRICHLET && bcs.up_type[1]==GKYL_POISSON_DIRICHLET)) - || ((bcs.lo_type[0]==GKYL_POISSON_DIRICHLET && bcs.up_type[0]==GKYL_POISSON_DIRICHLET) && - (bcs.lo_type[1]==GKYL_POISSON_NEUMANN && bcs.up_type[1]==GKYL_POISSON_DIRICHLET)) - || ((bcs.lo_type[0]==GKYL_POISSON_DIRICHLET && bcs.up_type[0]==GKYL_POISSON_DIRICHLET) && - (bcs.lo_type[1]==GKYL_POISSON_DIRICHLET && bcs.up_type[1]==GKYL_POISSON_NEUMANN)) - || ((bcs.lo_type[0]==GKYL_POISSON_NEUMANN && bcs.up_type[0]==GKYL_POISSON_DIRICHLET) && - (bcs.lo_type[1]==GKYL_POISSON_DIRICHLET && bcs.up_type[1]==GKYL_POISSON_DIRICHLET)) - || ((bcs.lo_type[0]==GKYL_POISSON_DIRICHLET && bcs.up_type[0]==GKYL_POISSON_NEUMANN) && - (bcs.lo_type[1]==GKYL_POISSON_DIRICHLET && bcs.up_type[1]==GKYL_POISSON_DIRICHLET)) ) - { - lower[0] = 0.; upper[0] = 1.; - lower[1] = 0.; upper[1] = 1.; - } else if ( ((bcs.lo_type[0]==GKYL_POISSON_DIRICHLET && bcs.up_type[0]==GKYL_POISSON_DIRICHLET) && - (bcs.lo_type[1]==GKYL_POISSON_PERIODIC && bcs.up_type[1]==GKYL_POISSON_PERIODIC)) - || ((bcs.lo_type[0]==GKYL_POISSON_NEUMANN && bcs.up_type[0]==GKYL_POISSON_DIRICHLET) && - (bcs.lo_type[1]==GKYL_POISSON_PERIODIC && bcs.up_type[1]==GKYL_POISSON_PERIODIC)) ) + double lower[] = {-M_PI,-M_PI}, upper[] = {M_PI,M_PI}; + if ( (bcs.lo_type[0]==GKYL_POISSON_DIRICHLET && bcs.up_type[0]==GKYL_POISSON_DIRICHLET) + || (bcs.lo_type[0]==GKYL_POISSON_NEUMANN && bcs.up_type[0]==GKYL_POISSON_DIRICHLET) + || (bcs.lo_type[0]==GKYL_POISSON_DIRICHLET && bcs.up_type[0]==GKYL_POISSON_NEUMANN) ) { lower[0] = 0.; upper[0] = 1.; - } else if ((bcs.lo_type[0]==GKYL_POISSON_PERIODIC && bcs.up_type[0]==GKYL_POISSON_PERIODIC) && - (bcs.lo_type[1]==GKYL_POISSON_DIRICHLET && bcs.up_type[1]==GKYL_POISSON_DIRICHLET)) { - lower[1] = 0.; upper[1] = 1.; } int dim = sizeof(lower)/sizeof(lower[0]); int dim_perp = dim-1; @@ -888,66 +684,27 @@ test_fem_poisson_perp_consteps_3x(int poly_order, const int *cells, struct gkyl_ struct gkyl_basis basis; gkyl_cart_modal_serendip(&basis, dim, poly_order); - int ghost[] = { 1, 1, 1 }; + int ghost[] = { 1, 1 }; struct gkyl_range localRange, localRange_ext; // local, local-ext ranges. gkyl_create_grid_ranges(&grid, ghost, &localRange_ext, &localRange); // Projection updater for DG field. gkyl_proj_on_basis *projob, *projob_sol; - if ((bcs.lo_type[0]==GKYL_POISSON_PERIODIC && bcs.up_type[0]==GKYL_POISSON_PERIODIC) && - (bcs.lo_type[1]==GKYL_POISSON_PERIODIC && bcs.up_type[1]==GKYL_POISSON_PERIODIC)) { + if (bcs.lo_type[0]==GKYL_POISSON_DIRICHLET && bcs.up_type[0]==GKYL_POISSON_DIRICHLET) { projob = gkyl_proj_on_basis_new(&grid, &basis, - poly_order+1, 1, evalFunc_consteps_periodicx_periodicy_3x, NULL); + poly_order+1, 1, evalFunc_consteps_dirichletx_2x, NULL); projob_sol = gkyl_proj_on_basis_new(&grid, &basis, - 2*(poly_order+1), 1, evalFunc_consteps_periodicx_periodicy_sol_3x, NULL); - } else if ((bcs.lo_type[0]==GKYL_POISSON_DIRICHLET && bcs.up_type[0]==GKYL_POISSON_DIRICHLET) && - (bcs.lo_type[1]==GKYL_POISSON_DIRICHLET && bcs.up_type[1]==GKYL_POISSON_DIRICHLET)) { + 2*(poly_order+1), 1, evalFunc_consteps_dirichletx_sol_2x, NULL); + } else if (bcs.lo_type[0]==GKYL_POISSON_NEUMANN && bcs.up_type[0]==GKYL_POISSON_DIRICHLET) { projob = gkyl_proj_on_basis_new(&grid, &basis, - poly_order+1, 1, evalFunc_consteps_dirichletx_dirichlety_3x, NULL); + poly_order+1, 1, evalFunc_consteps_neumannx_dirichletx_2x, NULL); projob_sol = gkyl_proj_on_basis_new(&grid, &basis, - 2*(poly_order+1), 1, evalFunc_consteps_dirichletx_dirichlety_sol_3x, NULL); - } else if ((bcs.lo_type[0]==GKYL_POISSON_DIRICHLET && bcs.up_type[0]==GKYL_POISSON_DIRICHLET) && - (bcs.lo_type[1]==GKYL_POISSON_PERIODIC && bcs.up_type[1]==GKYL_POISSON_PERIODIC)) { - projob = gkyl_proj_on_basis_new(&grid, &basis, - poly_order+1, 1, evalFunc_consteps_dirichletx_periodicy_3x, NULL); - projob_sol = gkyl_proj_on_basis_new(&grid, &basis, - 2*(poly_order+1), 1, evalFunc_consteps_dirichletx_periodicy_sol_3x, NULL); - } else if ((bcs.lo_type[0]==GKYL_POISSON_PERIODIC && bcs.up_type[0]==GKYL_POISSON_PERIODIC) && - (bcs.lo_type[1]==GKYL_POISSON_DIRICHLET && bcs.up_type[1]==GKYL_POISSON_DIRICHLET)) { - projob = gkyl_proj_on_basis_new(&grid, &basis, - poly_order+1, 1, evalFunc_consteps_periodicx_dirichlety_3x, NULL); - projob_sol = gkyl_proj_on_basis_new(&grid, &basis, - 2*(poly_order+1), 1, evalFunc_consteps_periodicx_dirichlety_sol_3x, NULL); - } else if ((bcs.lo_type[0]==GKYL_POISSON_DIRICHLET && bcs.up_type[0]==GKYL_POISSON_DIRICHLET) && - (bcs.lo_type[1]==GKYL_POISSON_NEUMANN && bcs.up_type[1]==GKYL_POISSON_DIRICHLET)) { - projob = gkyl_proj_on_basis_new(&grid, &basis, - poly_order+1, 1, evalFunc_consteps_dirichletx_neumanny_dirichlety_3x, NULL); - projob_sol = gkyl_proj_on_basis_new(&grid, &basis, - 2*(poly_order+1), 1, evalFunc_consteps_dirichletx_neumanny_dirichlety_sol_3x, NULL); - } else if ((bcs.lo_type[0]==GKYL_POISSON_DIRICHLET && bcs.up_type[0]==GKYL_POISSON_DIRICHLET) && - (bcs.lo_type[1]==GKYL_POISSON_DIRICHLET && bcs.up_type[1]==GKYL_POISSON_NEUMANN)) { - projob = gkyl_proj_on_basis_new(&grid, &basis, - poly_order+1, 1, evalFunc_consteps_dirichletx_dirichlety_neumanny_3x, NULL); - projob_sol = gkyl_proj_on_basis_new(&grid, &basis, - 2*(poly_order+1), 1, evalFunc_consteps_dirichletx_dirichlety_neumanny_sol_3x, NULL); - } else if ((bcs.lo_type[0]==GKYL_POISSON_NEUMANN && bcs.up_type[0]==GKYL_POISSON_DIRICHLET) && - (bcs.lo_type[1]==GKYL_POISSON_DIRICHLET && bcs.up_type[1]==GKYL_POISSON_DIRICHLET)) { - projob = gkyl_proj_on_basis_new(&grid, &basis, - poly_order+1, 1, evalFunc_consteps_neumannx_dirichletx_dirichlety_3x, NULL); - projob_sol = gkyl_proj_on_basis_new(&grid, &basis, - 2*(poly_order+1), 1, evalFunc_consteps_neumannx_dirichletx_dirichlety_sol_3x, NULL); - } else if ((bcs.lo_type[0]==GKYL_POISSON_DIRICHLET && bcs.up_type[0]==GKYL_POISSON_NEUMANN) && - (bcs.lo_type[1]==GKYL_POISSON_DIRICHLET && bcs.up_type[1]==GKYL_POISSON_DIRICHLET)) { - projob = gkyl_proj_on_basis_new(&grid, &basis, - poly_order+1, 1, evalFunc_consteps_dirichletx_neumannx_dirichlety_3x, NULL); - projob_sol = gkyl_proj_on_basis_new(&grid, &basis, - 2*(poly_order+1), 1, evalFunc_consteps_dirichletx_neumannx_dirichlety_sol_3x, NULL); - } else if ((bcs.lo_type[0]==GKYL_POISSON_NEUMANN && bcs.up_type[0]==GKYL_POISSON_DIRICHLET) && - (bcs.lo_type[1]==GKYL_POISSON_PERIODIC && bcs.up_type[1]==GKYL_POISSON_PERIODIC)) { + 2*(poly_order+1), 1, evalFunc_consteps_neumannx_dirichletx_sol_2x, NULL); + } else if (bcs.lo_type[0]==GKYL_POISSON_DIRICHLET && bcs.up_type[0]==GKYL_POISSON_NEUMANN) { projob = gkyl_proj_on_basis_new(&grid, &basis, - poly_order+1, 1, evalFunc_consteps_neumannx_dirichletx_periodicy_3x, NULL); + poly_order+1, 1, evalFunc_consteps_dirichletx_neumannx_2x, NULL); projob_sol = gkyl_proj_on_basis_new(&grid, &basis, - 2*(poly_order+1), 1, evalFunc_consteps_neumannx_dirichletx_periodicy_sol_3x, NULL); + 2*(poly_order+1), 1, evalFunc_consteps_dirichletx_neumannx_sol_2x, NULL); } // Create DG field we wish to make continuous. @@ -977,18 +734,23 @@ test_fem_poisson_perp_consteps_3x(int poly_order, const int *cells, struct gkyl_ // Project the permittivity onto the basis. double dg0norm = pow(sqrt(2.),dim); gkyl_array_shiftc(eps, epsilon_0*dg0norm, 0*basis.num_basis); - gkyl_array_shiftc(eps, 0.*dg0norm, 1*basis.num_basis); - gkyl_array_shiftc(eps, epsilon_0*dg0norm, 2*basis.num_basis); // Project the analytic solution. gkyl_proj_on_basis_advance(projob_sol, 0.0, &localRange, phisol_ho); - // FEM poisson solver. - struct gkyl_fem_poisson_perp *poisson = gkyl_fem_poisson_perp_new(&localRange, &grid, basis, &bcs, eps, NULL, use_gpu); + // Specify the bias: + struct gkyl_poisson_bias_line bias = { + .perp_dirs = {0, 1}, + .perp_coords = {0.5, -M_PI}, // Location of the plane in the 'dir' dimension. + .val = 0., // Biasing value. + }; + struct gkyl_poisson_bias_line_list bll = { + .num_bias_line = 1, // Number of bias lines. + .bl = &bias, + }; -// struct gkyl_fem_parproj* smooth_op = gkyl_fem_parproj_new(&localRange, &localRange_ext, &basis, GKYL_FEM_PARPROJ_DIRICHLET, NULL, use_gpu); -// gkyl_fem_parproj_set_rhs(smooth_op, rho, rho); -// gkyl_fem_parproj_solve (smooth_op, rho); + // FEM poisson solver. + struct gkyl_fem_poisson_perp *poisson = gkyl_fem_poisson_perp_new(&localRange, &grid, basis, &bcs, &bll, eps, NULL, use_gpu); // Set the RHS source. gkyl_fem_poisson_perp_set_rhs(poisson, rho); @@ -997,155 +759,84 @@ test_fem_poisson_perp_consteps_3x(int poly_order, const int *cells, struct gkyl_ gkyl_fem_poisson_perp_solve(poisson, phi); gkyl_array_copy(phi_ho, phi); -// gkyl_fem_parproj_set_rhs(smooth_op, phi, phi); -// gkyl_fem_parproj_solve (smooth_op, phi); -// gkyl_fem_parproj_release(smooth_op); - - if (bcs.lo_type[0] == GKYL_POISSON_PERIODIC && bcs.lo_type[1] == GKYL_POISSON_PERIODIC) { - // Subtract the volume averaged sol from the numerical and analytic solutions. - // This is not strictly necessary, as the potential is only known up to - // constant shift, but it makes unit testing more robust across CPU/GPU. - struct gkyl_array *sol_cellavg = gkyl_array_new(GKYL_DOUBLE, 1, localRange_ext.volume); - double sol_avg[1]; - // Factor accounting for normalization when subtracting a constant from a - // DG field and the 1/N to properly compute the volume averaged RHS. - double mavgfac = -pow(sqrt(2.),dim); // /perpRange.volume; - // Subtract the volume averaged sol from the sol. - gkyl_array_clear(sol_cellavg, 0.0); - gkyl_dg_calc_average_range(basis, 0, sol_cellavg, 0, phi_ho, localRange); - for (int kIdx=0; kIdxncomp, rho->size); + phi_ho = mkarr(false, phi->ncomp, phi->size); + } + else { + rho_ho = gkyl_array_acquire(rho); + phi_ho = gkyl_array_acquire(phi); + } + + // Project RHS charge density on basis. + gkyl_proj_on_basis_advance(projob, 0.0, &localRange, rho_ho); + gkyl_array_copy(rho, rho_ho); + + // Project the permittivity onto the basis. + double dg0norm = pow(sqrt(2.),dim); + gkyl_array_shiftc(eps, epsilon_0*dg0norm, 0*basis.num_basis); + + // Project the analytic solution. + gkyl_proj_on_basis_advance(projob_sol, 0.0, &localRange, phisol_ho); + + // Specify the bias: + struct gkyl_poisson_bias_line bias = { + .perp_dirs = {0, 1}, + .perp_coords = {0.5, -M_PI}, // Location of the plane in the 'dir' dimension. + .val = 0., // Biasing value. + }; + struct gkyl_poisson_bias_line_list bll = { + .num_bias_line = 1, // Number of bias lines. + .bl = &bias, + }; + + // FEM poisson solver. + struct gkyl_fem_poisson_perp *poisson = gkyl_fem_poisson_perp_new(&localRange, &grid, basis, &bcs, &bll, eps, NULL, use_gpu); + + // Set the RHS source. + gkyl_fem_poisson_perp_set_rhs(poisson, rho); + + // Solve the problem. + gkyl_fem_poisson_perp_solve(poisson, phi); + gkyl_array_copy(phi_ho, phi); + +// double errL2 = error_L2norm(grid, localRange, basis, phi, phisol); +// printf("error L2 norm = %g\n",errL2); + + if (poly_order == 1) { + if (bcs.lo_type[0] == GKYL_POISSON_DIRICHLET && bcs.up_type[0] == GKYL_POISSON_DIRICHLET) { + // Solution; checked convergence: + const double sol[256] = { + 0.0523071668741079, 0.0301995568753129, 0.0043898894860765, 0.0025345038764989, + 0.0326575388702468, 0.0188548388578077, -0.0076848087077184, -0.004436826376072 , + 0.0060365806138147, 0.0034852214423708, -0.0076848087077184, -0.004436826376072 , + -0.0205843776426173, -0.011884395973066 , -0.0076848087077184, -0.004436826376072 , + -0.0472053358990496, -0.0272540133885028, -0.0076848087077183, -0.004436826376072 , + -0.0738262941554814, -0.0426236308039397, -0.0076848087077184, -0.004436826376072 , + -0.1004472524119136, -0.0579932482193765, -0.0076848087077186, -0.004436826376072 , + -0.1270682106683453, -0.0733628656348134, -0.0076848087077185, -0.004436826376072 , + + 0.1305913158241592, 0.0149978175942799, 0.0165830888926301, 0.0045052430831576, + 0.0834668670525276, 0.0104799404455762, -0.0196410056887545, -0.0024660871694134, + 0.0154284275231832, 0.0019371638989408, -0.0196410056887545, -0.0024660871694134, + -0.0526100120061611, -0.0066056126476946, -0.0196410056887545, -0.0024660871694134, + -0.1206484515355057, -0.0151483891943299, -0.0196410056887544, -0.0024660871694134, + -0.1886868910648499, -0.0236911657409653, -0.0196410056887545, -0.0024660871694134, + -0.2567253305941943, -0.0322339422876006, -0.0196410056887547, -0.0024660871694134, + -0.3247637701235385, -0.040776718834236 , -0.0196410056887545, -0.0024660871694134, + + 0.1587769509960808, 0.0012751664595096, 0.0352710125851786, 0.0062842346913305, + 0.1066760663456682, 0.0029198970139942, -0.0251024783837957, -0.0006870955612404, + 0.0197185304324009, 0.0005397281705472, -0.0251024783837957, -0.0006870955612404, + -0.0672390054808664, -0.0018404406728998, -0.0251024783837957, -0.0006870955612404, + -0.1541965413941337, -0.0042206095163468, -0.0251024783837957, -0.0006870955612405, + -0.2411540773074009, -0.0066007783597938, -0.0251024783837957, -0.0006870955612404, + -0.3281116132206683, -0.0089809472032408, -0.0251024783837958, -0.0006870955612404, + -0.4150691491339354, -0.0113611160466878, -0.0251024783837957, -0.0006870955612404, + + 0.1436956879050723, -0.0099823377648229, 0.0595680163429045, 0.0077436469686939, + 0.1060487906890969, -0.0032820547831718, -0.0249548710136595, 0.000772316716123 , + 0.0196025817051248, -0.0006066711994523, -0.0249548710136594, 0.000772316716123 , + -0.0668436272788473, 0.0020687123842672, -0.0249548710136594, 0.000772316716123 , + -0.1532898362628194, 0.0047440959679867, -0.0249548710136594, 0.000772316716123 , + -0.2397360452467914, 0.0074194795517062, -0.0249548710136595, 0.000772316716123 , + -0.3261822542307636, 0.0100948631354257, -0.0249548710136595, 0.000772316716123 , + -0.4126284632147356, 0.0127702467191452, -0.0249548710136594, 0.000772316716123 , + + 0.1095376103290749, -0.0097388375186793, 0.0639962374469919, -0.0051870123222179, + 0.0872305209919558, -0.0075826782921555, -0.020526649909572 , 0.0017843179303531, + 0.0161241198868402, -0.0014016196677002, -0.020526649909572 , 0.0017843179303531, + -0.0549822812182755, 0.0047794389567552, -0.020526649909572 , 0.0017843179303531, + -0.1260886823233912, 0.0109604975812106, -0.020526649909572 , 0.0017843179303531, + -0.1971950834285068, 0.017141556205666 , -0.020526649909572 , 0.0017843179303531, + -0.2683014845336226, 0.0233226148301214, -0.020526649909572 , 0.0017843179303531, + -0.3394078856387381, 0.0295036734545768, -0.020526649909572 , 0.0017843179303531, + + 0.0699659492984875, -0.013107871629611 , 0.0467843874558059, -0.0047502539034449, + 0.0577485651331015, -0.0094387368591906, -0.0135891035131684, 0.0022210763491261, + 0.0106745297048609, -0.0017447026908387, -0.0135891035131683, 0.0022210763491261, + -0.0363995057233797, 0.0059493314775132, -0.0135891035131683, 0.0022210763491261, + -0.0834735411516203, 0.0136433656458652, -0.0135891035131683, 0.0022210763491261, + -0.1305475765798609, 0.0213373998142171, -0.0135891035131683, 0.0022210763491261, + -0.1776216120081016, 0.0290314339825691, -0.0135891035131684, 0.0022210763491261, + -0.2246956474363422, 0.036725468150921 , -0.0135891035131683, 0.0022210763491261, + + 0.0281170830961668, -0.0110535825375795, 0.0298677522048923, -0.0050165700124528, + 0.0270120579611045, -0.0083069938305107, -0.0063563423764922, 0.0019547602401182, + 0.0049930420683294, -0.0015355057255103, -0.0063563423764922, 0.0019547602401182, + -0.0170259738244458, 0.0052359823794901, -0.0063563423764922, 0.0019547602401182, + -0.0390449897172209, 0.0120074704844905, -0.0063563423764922, 0.0019547602401182, + -0.0610640056099961, 0.0187789585894908, -0.0063563423764922, 0.0019547602401182, + -0.0830830215027712, 0.0255504466944912, -0.0063563423764922, 0.0019547602401182, + -0.1051020373955464, 0.0323219347994916, -0.0063563423764922, 0.0019547602401182, + + 0.0044858582677115, -0.0025899114784098, 0.0105893990317988, -0.0061137923815654, + 0.0063119612942494, -0.0036442125523494, -0.001485299161996 , 0.0008575378710055, + 0.0011667340682163, -0.0006736142283574, -0.001485299161996 , 0.0008575378710055, + -0.0039784931578168, 0.0022969840956346, -0.001485299161996 , 0.0008575378710055, + -0.0091237203838499, 0.0052675824196266, -0.001485299161996 , 0.0008575378710055, + -0.014268947609883 , 0.0082381807436186, -0.001485299161996 , 0.0008575378710055, + -0.0194141748359161, 0.0112087790676106, -0.001485299161996 , 0.0008575378710055, + -0.0245594020619492, 0.0141793773916026, -0.001485299161996 , 0.0008575378710055, + }; + long i = 0; + struct gkyl_range_iter iter; + gkyl_range_iter_init(&iter, &localRange); + while (gkyl_range_iter_next(&iter)) { + long loc = gkyl_range_idx(&localRange, iter.idx); + const double *phi_p = gkyl_array_cfetch(phi_ho, loc); + // Only check one cell in z: + for (int m=0; mncomp, rho->size); + phi_ho = mkarr(false, phi->ncomp, phi->size); + } + else { + rho_ho = gkyl_array_acquire(rho); + phi_ho = gkyl_array_acquire(phi); + } + + // Project RHS charge density on basis. + gkyl_proj_on_basis_advance(projob, 0.0, &localRange, rho_ho); + gkyl_array_copy(rho, rho_ho); + + // Project the permittivity onto the basis. + double dg0norm = pow(sqrt(2.),dim); + gkyl_array_shiftc(eps, epsilon_0*dg0norm, 0*basis.num_basis); + gkyl_array_shiftc(eps, 0.*dg0norm, 1*basis.num_basis); + gkyl_array_shiftc(eps, epsilon_0*dg0norm, 2*basis.num_basis); + + // Project the analytic solution. + gkyl_proj_on_basis_advance(projob_sol, 0.0, &localRange, phisol_ho); + + // FEM poisson solver. + struct gkyl_fem_poisson_perp *poisson = gkyl_fem_poisson_perp_new(&localRange, &grid, basis, &bcs, NULL, eps, NULL, use_gpu); + +// struct gkyl_fem_parproj* smooth_op = gkyl_fem_parproj_new(&localRange, &localRange_ext, &basis, GKYL_FEM_PARPROJ_DIRICHLET, NULL, use_gpu); +// gkyl_fem_parproj_set_rhs(smooth_op, rho, rho); +// gkyl_fem_parproj_solve (smooth_op, rho); + + // Set the RHS source. + gkyl_fem_poisson_perp_set_rhs(poisson, rho); + + // Solve the problem. + gkyl_fem_poisson_perp_solve(poisson, phi); + gkyl_array_copy(phi_ho, phi); + +// gkyl_fem_parproj_set_rhs(smooth_op, phi, phi); +// gkyl_fem_parproj_solve (smooth_op, phi); +// gkyl_fem_parproj_release(smooth_op); + + if (bcs.lo_type[0] == GKYL_POISSON_PERIODIC && bcs.lo_type[1] == GKYL_POISSON_PERIODIC) { + // Subtract the volume averaged sol from the numerical and analytic solutions. + // This is not strictly necessary, as the potential is only known up to + // constant shift, but it makes unit testing more robust across CPU/GPU. + struct gkyl_array *sol_cellavg = gkyl_array_new(GKYL_DOUBLE, 1, localRange_ext.volume); + double sol_avg[1]; + // Factor accounting for normalization when subtracting a constant from a + // DG field and the 1/N to properly compute the volume averaged RHS. + double mavgfac = -pow(sqrt(2.),dim); // /perpRange.volume; + // Subtract the volume averaged sol from the sol. + gkyl_array_clear(sol_cellavg, 0.0); + gkyl_dg_calc_average_range(basis, 0, sol_cellavg, 0, phi_ho, localRange); + for (int kIdx=0; kIdxncomp, rho->size); + phi_ho = mkarr(false, phi->ncomp, phi->size); + } + else { + rho_ho = gkyl_array_acquire(rho); + phi_ho = gkyl_array_acquire(phi); + } + + // Project RHS charge density on basis. + gkyl_proj_on_basis_advance(projob, 0.0, &localRange, rho_ho); + gkyl_array_copy(rho, rho_ho); + + // Project the permittivity onto the basis. + double dg0norm = pow(sqrt(2.),dim); + gkyl_array_shiftc(eps, epsilon_0*dg0norm, 0*basis.num_basis); + gkyl_array_shiftc(eps, 0.*dg0norm, 1*basis.num_basis); + gkyl_array_shiftc(eps, epsilon_0*dg0norm, 2*basis.num_basis); + + // Project the analytic solution. + gkyl_proj_on_basis_advance(projob_sol, 0.0, &localRange, phisol_ho); + + // Specify the bias: + struct gkyl_poisson_bias_line bias = { + .perp_dirs = {0, 2}, + .perp_coords = {0.5, -M_PI}, // Location of the plane in the 'dir' dimension. + .val = 0., // Biasing value. + }; + struct gkyl_poisson_bias_line_list bll = { + .num_bias_line = 1, // Number of bias lines. + .bl = &bias, + }; + + // FEM poisson solver. + struct gkyl_fem_poisson_perp *poisson = gkyl_fem_poisson_perp_new(&localRange, &grid, basis, &bcs, &bll, eps, NULL, use_gpu); + +// struct gkyl_fem_parproj* smooth_op = gkyl_fem_parproj_new(&localRange, &localRange_ext, &basis, GKYL_FEM_PARPROJ_DIRICHLET, NULL, use_gpu); +// gkyl_fem_parproj_set_rhs(smooth_op, rho, rho); +// gkyl_fem_parproj_solve (smooth_op, rho); + + // Set the RHS source. + gkyl_fem_poisson_perp_set_rhs(poisson, rho); + + // Solve the problem. + gkyl_fem_poisson_perp_solve(poisson, phi); + gkyl_array_copy(phi_ho, phi); + +// gkyl_fem_parproj_set_rhs(smooth_op, phi, phi); +// gkyl_fem_parproj_solve (smooth_op, phi); +// gkyl_fem_parproj_release(smooth_op); + +// double errL2 = error_L2norm(grid, localRange, basis, phi, phisol); +// printf("error L2 norm = %g\n",errL2); + + if (poly_order == 1) { + if ((bcs.lo_type[0] == GKYL_POISSON_DIRICHLET && bcs.up_type[0] == GKYL_POISSON_DIRICHLET) && + (bcs.lo_type[1] == GKYL_POISSON_DIRICHLET && bcs.up_type[1] == GKYL_POISSON_DIRICHLET)) { + // Solution; checked convergence: + const double sol[512] = { + -4.4041922402994508e-03, -2.5427615754988948e-03, -1.0665671304152860e-04, 3.7718620629148253e-05, + -6.1578281985007731e-05, 2.1776855773916784e-05, -1.6454514526474550e-05, -9.5000183910323872e-06, + -2.6096743371754640e-03, -1.5066961810654262e-03, -6.9169901643607081e-05, 6.1409551253443335e-04, + -3.9935261333768437e-05, 3.5454820946981773e-04, 1.6276715296146205e-05, 9.3973659577225150e-06, + -4.8238508035630792e-04, -2.7850515599675828e-04, -1.2785705897272424e-05, 6.1409551253432623e-04, + -7.3818307414892410e-06, 3.5454820946985161e-04, 1.6276715296142577e-05, 9.3973659577230299e-06, + 1.6449041764628515e-03, 9.4968586907191971e-04, 4.3598489849228317e-05, 6.1409551253429771e-04, + 2.5171599850703604e-05, 3.5454820946987070e-04, 1.6276715296122763e-05, 9.3973659577310852e-06, + 3.7721934332819408e-03, 2.1778768941405919e-03, 9.9982685595574256e-05, 6.1409551253416305e-04, + 5.7725030442970594e-05, 3.5454820946990772e-04, 1.6276715296088936e-05, 9.3973659577540534e-06, + 5.8994826901014163e-03, 3.4060679192091698e-03, 1.5636688134197224e-04, 6.1409551253423353e-04, + 9.0278461035230045e-05, 3.5454820946988067e-04, 1.6276715296172321e-05, 9.3973659576982136e-06, + 8.0267719469204173e-03, 4.6342589442779272e-03, 2.1275107708848732e-04, 6.1409551253416761e-04, + 1.2283189162741587e-04, 3.5454820946994730e-04, 1.6276715296031209e-05, 9.3973659577826543e-06, + 1.0154061203738809e-02, 5.8624499693468073e-03, 2.6913527283490597e-04, 6.1409551253420447e-04, + 1.5538532221965102e-04, 3.5454820946989601e-04, 1.6276715296035092e-05, 9.3973659577696252e-06, + + -1.1018979264020300e-02, -1.2762874932783809e-03, -2.6494102141839070e-04, -2.8994604615678344e-04, + -2.9807206064867279e-05, -2.1095413934670354e-04, -5.7460710141012667e-05, -1.4174919685463714e-05, + -6.6613512061697421e-03, -8.3254054991779977e-04, -1.7752438980077028e-04, 1.5675158485682092e-03, + -2.2623231571673787e-05, 1.9590927819014637e-04, 4.1774151505839880e-05, 5.3235857015895280e-06, + -1.2313170233906152e-03, -1.5389090291880844e-04, -3.2814484098407900e-05, 1.5675158485681827e-03, + -4.1817897444755747e-06, 1.9590927819015892e-04, 4.1774151505836052e-05, 5.3235857015888046e-06, + 4.1987171593885252e-03, 5.2475874408017883e-04, 1.1189542160396868e-04, 1.5675158485681906e-03, + 1.4259652082721208e-05, 1.9590927819016068e-04, 4.1774151505830529e-05, 5.3235857015890257e-06, + 9.6287513421676133e-03, 1.2034083910791829e-03, 2.5660532730632313e-04, 1.5675158485681483e-03, + 3.2701093909920751e-05, 1.9590927819017681e-04, 4.1774151505832115e-05, 5.3235857015865329e-06, + 1.5058785524946838e-02, 1.8820580380781381e-03, 4.0131523300871499e-04, 1.5675158485681689e-03, + 5.1142535737119170e-05, 1.9590927819017611e-04, 4.1774151505820053e-05, 5.3235857015869310e-06, + 2.0488819707725963e-02, 2.5607076850771271e-03, 5.4602513871109741e-04, 1.5675158485682298e-03, + 6.9583977564318124e-05, 1.9590927819018239e-04, 4.1774151505813304e-05, 5.3235857015801149e-06, + 2.5918853890504821e-02, 3.2393573320761929e-03, 6.9073504441345018e-04, 1.5675158485681817e-03, + 8.8025419391506493e-05, 1.9590927819018424e-04, 4.1774151505804312e-05, 5.3235857015857799e-06, + + -1.3366720692763396e-02, -7.9181652594083197e-05, -3.2014002221508991e-04, -1.5665805187687065e-03, + -2.0619519041054335e-06, -5.2611111707254622e-04, -1.0875897838019112e-04, -1.5442149291387570e-05, + -8.4983155591709623e-03, -2.2803131377920161e-04, -2.2803131377920622e-04, 1.9997811123959363e-03, + -6.5369545832163292e-06, 5.3659188242116111e-05, 5.3659188242125605e-05, 1.5382434574337128e-06, + -1.5708705777981867e-03, -4.2150433122697153e-05, -4.2150433122704234e-05, 1.9997811123959380e-03, + -1.2083229378424886e-06, 5.3659188242120123e-05, 5.3659188242120949e-05, 1.5382434574338455e-06, + 5.3565744035745932e-03, 1.4373044753380644e-04, 1.4373044753380633e-04, 1.9997811123959493e-03, + 4.1203087075293580e-06, 5.3659188242120502e-05, 5.3659188242116450e-05, 1.5382434574343029e-06, + 1.2284019384947355e-02, 3.2961132819031189e-04, 3.2961132819030463e-04, 1.9997811123959436e-03, + 9.4489403529038885e-06, 5.3659188242125564e-05, 5.3659188242113645e-05, 1.5382434574343915e-06, + 1.9211464366320145e-02, 5.1549220884680247e-04, 5.1549220884683142e-04, 1.9997811123959662e-03, + 1.4777571998274944e-05, 5.3659188242126635e-05, 5.3659188242104951e-05, 1.5382434574354242e-06, + 2.6138909347692911e-02, 7.0137308950330574e-04, 7.0137308950334932e-04, 1.9997811123960299e-03, + 2.0106203643644923e-05, 5.3659188242122142e-05, 5.3659188242088599e-05, 1.5382434574373129e-06, + 3.3066354329065621e-02, 8.8725397015985226e-04, 8.8725397015982602e-04, 1.9997811123959944e-03, + 2.5434835289019607e-05, 5.3659188242128064e-05, 5.3659188242090029e-05, 1.5382434574371947e-06, + + -1.1772420545074049e-02, 9.9965127203158893e-04, -2.9771347337083224e-04, -4.1374953013227720e-03, + 1.5009925916331957e-05, -9.5820722469863165e-04, -1.4619029680330181e-04, -6.1688324763178938e-06, + -8.4328227495495626e-03, 2.6584360504410145e-04, -2.2754565363904947e-04, 1.9843696720032210e-03, + 6.8173505958705989e-06, -6.2556987501449985e-05, 5.3544905127008731e-05, -1.6042248447103262e-06, + -1.5587645637327799e-03, 4.9139843602173047e-05, -4.2060661306196192e-05, 1.9843696720032301e-03, + 1.2601527202690473e-06, -6.2556987501449782e-05, 5.3544905127005309e-05, -1.6042248447096918e-06, + 5.3152936220840080e-03, -1.6756391783975450e-04, 1.4342433102665958e-04, 1.9843696720032410e-03, + -4.2970451553338836e-06, -6.2556987501450744e-05, 5.3544905127002904e-05, -1.6042248447089394e-06, + 1.2189351807900777e-02, -3.8426767928168319e-04, 3.2890932335951224e-04, 1.9843696720032457e-03, + -9.8542430309342842e-06, -6.2556987501449619e-05, 5.3544905127001169e-05, -1.6042248447085263e-06, + 1.9063409993717553e-02, -6.0097144072361120e-04, 5.1439431569237854e-04, 1.9843696720032670e-03, + -1.5411440906539592e-05, -6.2556987501451611e-05, 5.3544905126996466e-05, -1.6042248447072574e-06, + 2.5937468179534327e-02, -8.1767520216553769e-04, 6.9987930802523882e-04, 1.9843696720033108e-03, + -2.0968638782141884e-05, -6.2556987501459797e-05, 5.3544905126988287e-05, -1.6042248447047786e-06, + 3.2811526365351132e-02, -1.0343789636074571e-03, 8.8536430035807004e-04, 1.9843696720032926e-03, + -2.6525836657742338e-05, -6.2556987501455094e-05, 5.3544905126988287e-05, -1.6042248447056049e-06, + + -9.0272890314765722e-03, 5.8525114630483929e-04, -2.2574513915869974e-04, -4.4933715731932363e-03, + 2.6541011214171422e-05, 7.5274196333601873e-04, -1.5552020407559827e-04, 7.8220800114296213e-07, + -6.9204828041277604e-03, 6.0730626955139981e-04, -1.8789706627799494e-04, 1.6284934001327706e-03, + 1.6073771990022628e-05, -1.4290827386115464e-04, 4.4214997854705820e-05, -3.7823996304681823e-06, + -1.2792161864866225e-03, 1.1225748725241897e-04, -3.4731820796203245e-05, 1.6284934001327780e-03, + 2.9711553210232943e-06, -1.4290827386115610e-04, 4.4214997854704085e-05, -3.7823996304676809e-06, + 4.3620504311545211e-03, -3.8279129504656216e-04, 1.1843342468558873e-04, 1.6284934001327851e-03, + -1.0131461347976333e-05, -1.4290827386115716e-04, 4.4214997854703523e-05, -3.7823996304675407e-06, + 1.0003317048795649e-02, -8.7784007734554280e-04, 2.7159867016738124e-04, 1.6284934001327919e-03, + -2.3234078016975833e-05, -1.4290827386115735e-04, 4.4214997854702446e-05, -3.7823996304672675e-06, + 1.5644583666436781e-02, -1.3728888596445214e-03, 4.2476391564917615e-04, 1.6284934001328049e-03, + -3.6336694685976650e-05, -1.4290827386115966e-04, 4.4214997854700812e-05, -3.7823996304667661e-06, + 2.1285850284077916e-02, -1.8679376419435008e-03, 5.7792916113097177e-04, 1.6284934001328227e-03, + -4.9439311354977518e-05, -1.4290827386116670e-04, 4.4214997854699179e-05, -3.7823996304657628e-06, + 2.6927116901719089e-02, -2.3629864242424841e-03, 7.3109440661274961e-04, 1.6284934001328183e-03, + -6.2541928023973379e-05, -1.4290827386116294e-04, 4.4214997854697953e-05, -3.7823996304655858e-06, + + -6.2247900453550730e-03, 1.0327723977360613e-03, -1.3371278969370395e-04, -2.4924537019540933e-03, + 2.6593890523597406e-05, 4.0248850825023367e-04, -1.3292722975764579e-04, 1.2261851803121024e-05, + -4.5637037010479806e-03, 7.5338078003219552e-04, -1.2532535988959181e-04, 1.0739079292105612e-03, + 2.0052019536976041e-05, -1.7728179706443800e-04, 2.9490936864655919e-05, -4.7185409457015368e-06, + -8.4357750896041491e-04, 1.3925862048674964e-04, -2.3165757864813873e-05, 1.0739079292105657e-03, + 3.7065142258784086e-06, -1.7728179706443867e-04, 2.9490936864655435e-05, -4.7185409457013454e-06, + 2.8765486831271551e-03, -4.7486353905869716e-04, 7.8993844159963767e-05, 1.0739079292105696e-03, + -1.2638991085219166e-05, -1.7728179706443922e-04, 2.9490936864655282e-05, -4.7185409457013344e-06, + 6.5966748752147126e-03, -1.0889856986041411e-03, 1.8115344618474199e-04, 1.0739079292105755e-03, + -2.8984496396316930e-05, -1.7728179706443943e-04, 2.9490936864654591e-05, -4.7185409457010650e-06, + 1.0316801067302282e-02, -1.7031078581495856e-03, 2.8331304820951964e-04, 1.0739079292105826e-03, + -4.5330001707415101e-05, -1.7728179706444065e-04, 2.9490936864654490e-05, -4.7185409457012421e-06, + 1.4036927259389841e-02, -2.3172300176950325e-03, 3.8547265023429852e-04, 1.0739079292105855e-03, + -6.1675507018512700e-05, -1.7728179706444239e-04, 2.9490936864654900e-05, -4.7185409457009464e-06, + 1.7757053451477430e-02, -2.9313521772404848e-03, 4.8763225225907262e-04, 1.0739079292105883e-03, + -7.8021012329608367e-05, -1.7728179706444209e-04, 2.9490936864654080e-05, -4.7185409457005339e-06, + + -2.7685660836065627e-03, 9.6267943695907572e-04, -5.1302926806916285e-05, -1.3595218641067415e-03, + 2.0985465997969670e-05, 2.5160999330443233e-04, -8.5156552130073984e-05, 1.5318561784528383e-05, + -2.1160573442293054e-03, 6.5976850295807366e-04, -5.9827506156292608e-05, 4.9794003061817010e-04, + 1.7763183947286998e-05, -1.5525342423246231e-04, 1.4078309516760695e-05, -4.1799436025251460e-06, + -3.9114247992314439e-04, 1.2195486531873465e-04, -1.1058811420875967e-05, 4.9794003061817314e-04, + 3.2834345625935113e-06, -1.5525342423246226e-04, 1.4078309516760042e-05, -4.1799436025254264e-06, + 1.3337723843830172e-03, -4.1585877232060533e-04, 3.7709883314540850e-05, 4.9794003061817682e-04, + -1.1196314822099668e-05, -1.5525342423246185e-04, 1.4078309516759505e-05, -4.1799436025257211e-06, + 3.0586872486891748e-03, -9.5367240995994330e-04, 8.6478578049958005e-05, 4.9794003061818224e-04, + -2.5676064206792951e-05, -1.5525342423246198e-04, 1.4078309516758496e-05, -4.1799436025261192e-06, + 4.7836021129953393e-03, -1.4914860475992832e-03, 1.3524727278537308e-04, 4.9794003061818745e-04, + -4.0155813591486747e-05, -1.5525342423246160e-04, 1.4078309516757525e-05, -4.1799436025265182e-06, + 6.5085169773014956e-03, -2.0292996852386224e-03, 1.8401596752079196e-04, 4.9794003061818853e-04, + -5.4635562976179490e-05, -1.5525342423246120e-04, 1.4078309516757781e-05, -4.1799436025266952e-06, + 8.2334318416076614e-03, -2.5671133228779642e-03, 2.3278466225620765e-04, 4.9794003061819168e-04, + -6.9115312360872741e-05, -1.5525342423246101e-04, 1.4078309516756759e-05, -4.1799436025271077e-06, + + -5.5057819369581863e-04, 3.1787646834022232e-04, -7.4775167389616631e-06, -4.6186028600569848e-04, + 4.3171463021096952e-06, 2.6665516045338905e-04, -2.9312012410193478e-05, 1.6923298255515372e-05, + -4.8665238793613104e-04, 2.8096888717670101e-04, -1.4530384527701296e-05, 1.1451660589924915e-04, + 8.3891214184953722e-06, -6.6116193242614837e-05, 3.4192174122083424e-06, -1.9740860933551212e-06, + -8.9955228480437954e-05, 5.1935675378195315e-05, -2.6858679675683887e-06, 1.1451660589925117e-04, + 1.5506865940831339e-06, -6.6116193242615583e-05, 3.4192174122070139e-06, -1.9740860933552669e-06, + 3.0674193097525530e-04, -1.7709753642030946e-04, 9.1586485925635640e-06, 1.1451660589925462e-04, + -5.2877482303300981e-06, -6.6116193242616098e-05, 3.4192174122056849e-06, -1.9740860933554109e-06, + 7.0343909043094825e-04, -4.0613074821881383e-04, 2.1003165152696916e-05, 1.1451660589925732e-04, + -1.2126183054742609e-05, -6.6116193242617480e-05, 3.4192174122050653e-06, -1.9740860933548040e-06, + 1.1001362498866394e-03, -6.3516396001732215e-04, 3.2847681712829456e-05, 1.1451660589926117e-04, + -1.8964617879153966e-05, -6.6116193242618767e-05, 3.4192174122030078e-06, -1.9740860933549811e-06, + 1.4968334093423308e-03, -8.6419717181582527e-04, 4.4692198272961002e-05, 1.1451660589926484e-04, + -2.5803052703569116e-05, -6.6116193242617331e-05, 3.4192174122015514e-06, -1.9740860933558666e-06, + 1.8935305687980254e-03, -1.0932303836143303e-03, 5.6536714833096980e-05, 1.1451660589926414e-04, + -3.2641487527979211e-05, -6.6116193242619960e-05, 3.4192174122038129e-06, -1.9740860933535500e-06, }; long i = 0; struct gkyl_range_iter iter; @@ -2817,129 +4217,449 @@ test_fem_poisson_perp_consteps_3x(int poly_order, const int *cells, struct gkyl_ while (gkyl_range_iter_next(&iter)) { long loc = gkyl_range_idx(&localRange, iter.idx); const double *phi_p = gkyl_array_cfetch(phi_ho, loc); - if (iter.idx[2] == 3) { + if (iter.idx[1] == 3) { // Only check one cell in z: - for (int m=0; mncomp, rho->size); + phi_ho = mkarr(false, phi->ncomp, phi->size); + } + else { + rho_ho = gkyl_array_acquire(rho); + phi_ho = gkyl_array_acquire(phi); + } + + // Project RHS charge density on basis. + gkyl_proj_on_basis_advance(projob, 0.0, &localRange, rho_ho); + gkyl_array_copy(rho, rho_ho); + + // Project the permittivity onto the basis. + double dg0norm = pow(sqrt(2.),dim); + gkyl_array_shiftc(eps, epsilon_0*dg0norm, 0*basis.num_basis); + gkyl_array_shiftc(eps, 0.*dg0norm, 1*basis.num_basis); + gkyl_array_shiftc(eps, epsilon_0*dg0norm, 2*basis.num_basis); + + // Project the analytic solution. + gkyl_proj_on_basis_advance(projob_sol, 0.0, &localRange, phisol_ho); + + // Specify the bias: + struct gkyl_poisson_bias_line bias = { + .perp_dirs = {0, 2}, + .perp_coords = {0.5, -M_PI}, // Location of the plane in the 'dir' dimension. + .val = 0., // Biasing value. + }; + struct gkyl_poisson_bias_line_list bll = { + .num_bias_line = 1, // Number of bias lines. + .bl = &bias, + }; + + // FEM poisson solver. + struct gkyl_fem_poisson_perp *poisson = gkyl_fem_poisson_perp_new(&localRange, &grid, basis, &bcs, &bll, eps, NULL, use_gpu); + +// struct gkyl_fem_parproj* smooth_op = gkyl_fem_parproj_new(&localRange, &localRange_ext, &basis, GKYL_FEM_PARPROJ_DIRICHLET, NULL, use_gpu); +// gkyl_fem_parproj_set_rhs(smooth_op, rho, rho); +// gkyl_fem_parproj_solve (smooth_op, rho); + + // Set the RHS source. + gkyl_fem_poisson_perp_set_rhs(poisson, rho); + + // Solve the problem. + gkyl_fem_poisson_perp_solve(poisson, phi); + gkyl_array_copy(phi_ho, phi); + +// gkyl_fem_parproj_set_rhs(smooth_op, phi, phi); +// gkyl_fem_parproj_solve (smooth_op, phi); +// gkyl_fem_parproj_release(smooth_op); + +// double errL2 = error_L2norm(grid, localRange, basis, phi, phisol); +// printf("error L2 norm = %g\n",errL2); + + if (poly_order == 1) { + if ((bcs.lo_type[0] == GKYL_POISSON_DIRICHLET && bcs.up_type[0] == GKYL_POISSON_DIRICHLET) && + (bcs.lo_type[1] == GKYL_POISSON_DIRICHLET && bcs.up_type[1] == GKYL_POISSON_DIRICHLET)) { + // Solution; checked convergence: + const double sol[512] = { + -4.4041922402994508e-03, -2.5427615754988948e-03, -1.0665671304152860e-04, 3.7718620629148253e-05, + -6.1578281985007731e-05, 2.1776855773916784e-05, -1.6454514526474550e-05, -9.5000183910323872e-06, + -2.6096743371754640e-03, -1.5066961810654262e-03, -6.9169901643607081e-05, 6.1409551253443335e-04, + -3.9935261333768437e-05, 3.5454820946981773e-04, 1.6276715296146205e-05, 9.3973659577225150e-06, + -4.8238508035630792e-04, -2.7850515599675828e-04, -1.2785705897272424e-05, 6.1409551253432623e-04, + -7.3818307414892410e-06, 3.5454820946985161e-04, 1.6276715296142577e-05, 9.3973659577230299e-06, + 1.6449041764628515e-03, 9.4968586907191971e-04, 4.3598489849228317e-05, 6.1409551253429771e-04, + 2.5171599850703604e-05, 3.5454820946987070e-04, 1.6276715296122763e-05, 9.3973659577310852e-06, + 3.7721934332819408e-03, 2.1778768941405919e-03, 9.9982685595574256e-05, 6.1409551253416305e-04, + 5.7725030442970594e-05, 3.5454820946990772e-04, 1.6276715296088936e-05, 9.3973659577540534e-06, + 5.8994826901014163e-03, 3.4060679192091698e-03, 1.5636688134197224e-04, 6.1409551253423353e-04, + 9.0278461035230045e-05, 3.5454820946988067e-04, 1.6276715296172321e-05, 9.3973659576982136e-06, + 8.0267719469204173e-03, 4.6342589442779272e-03, 2.1275107708848732e-04, 6.1409551253416761e-04, + 1.2283189162741587e-04, 3.5454820946994730e-04, 1.6276715296031209e-05, 9.3973659577826543e-06, + 1.0154061203738809e-02, 5.8624499693468073e-03, 2.6913527283490597e-04, 6.1409551253420447e-04, + 1.5538532221965102e-04, 3.5454820946989601e-04, 1.6276715296035092e-05, 9.3973659577696252e-06, + + -1.1018979264020300e-02, -1.2762874932783809e-03, -2.6494102141839070e-04, -2.8994604615678344e-04, + -2.9807206064867279e-05, -2.1095413934670354e-04, -5.7460710141012667e-05, -1.4174919685463714e-05, + -6.6613512061697421e-03, -8.3254054991779977e-04, -1.7752438980077028e-04, 1.5675158485682092e-03, + -2.2623231571673787e-05, 1.9590927819014637e-04, 4.1774151505839880e-05, 5.3235857015895280e-06, + -1.2313170233906152e-03, -1.5389090291880844e-04, -3.2814484098407900e-05, 1.5675158485681827e-03, + -4.1817897444755747e-06, 1.9590927819015892e-04, 4.1774151505836052e-05, 5.3235857015888046e-06, + 4.1987171593885252e-03, 5.2475874408017883e-04, 1.1189542160396868e-04, 1.5675158485681906e-03, + 1.4259652082721208e-05, 1.9590927819016068e-04, 4.1774151505830529e-05, 5.3235857015890257e-06, + 9.6287513421676133e-03, 1.2034083910791829e-03, 2.5660532730632313e-04, 1.5675158485681483e-03, + 3.2701093909920751e-05, 1.9590927819017681e-04, 4.1774151505832115e-05, 5.3235857015865329e-06, + 1.5058785524946838e-02, 1.8820580380781381e-03, 4.0131523300871499e-04, 1.5675158485681689e-03, + 5.1142535737119170e-05, 1.9590927819017611e-04, 4.1774151505820053e-05, 5.3235857015869310e-06, + 2.0488819707725963e-02, 2.5607076850771271e-03, 5.4602513871109741e-04, 1.5675158485682298e-03, + 6.9583977564318124e-05, 1.9590927819018239e-04, 4.1774151505813304e-05, 5.3235857015801149e-06, + 2.5918853890504821e-02, 3.2393573320761929e-03, 6.9073504441345018e-04, 1.5675158485681817e-03, + 8.8025419391506493e-05, 1.9590927819018424e-04, 4.1774151505804312e-05, 5.3235857015857799e-06, + + -1.3366720692763396e-02, -7.9181652594083197e-05, -3.2014002221508991e-04, -1.5665805187687065e-03, + -2.0619519041054335e-06, -5.2611111707254622e-04, -1.0875897838019112e-04, -1.5442149291387570e-05, + -8.4983155591709623e-03, -2.2803131377920161e-04, -2.2803131377920622e-04, 1.9997811123959363e-03, + -6.5369545832163292e-06, 5.3659188242116111e-05, 5.3659188242125605e-05, 1.5382434574337128e-06, + -1.5708705777981867e-03, -4.2150433122697153e-05, -4.2150433122704234e-05, 1.9997811123959380e-03, + -1.2083229378424886e-06, 5.3659188242120123e-05, 5.3659188242120949e-05, 1.5382434574338455e-06, + 5.3565744035745932e-03, 1.4373044753380644e-04, 1.4373044753380633e-04, 1.9997811123959493e-03, + 4.1203087075293580e-06, 5.3659188242120502e-05, 5.3659188242116450e-05, 1.5382434574343029e-06, + 1.2284019384947355e-02, 3.2961132819031189e-04, 3.2961132819030463e-04, 1.9997811123959436e-03, + 9.4489403529038885e-06, 5.3659188242125564e-05, 5.3659188242113645e-05, 1.5382434574343915e-06, + 1.9211464366320145e-02, 5.1549220884680247e-04, 5.1549220884683142e-04, 1.9997811123959662e-03, + 1.4777571998274944e-05, 5.3659188242126635e-05, 5.3659188242104951e-05, 1.5382434574354242e-06, + 2.6138909347692911e-02, 7.0137308950330574e-04, 7.0137308950334932e-04, 1.9997811123960299e-03, + 2.0106203643644923e-05, 5.3659188242122142e-05, 5.3659188242088599e-05, 1.5382434574373129e-06, + 3.3066354329065621e-02, 8.8725397015985226e-04, 8.8725397015982602e-04, 1.9997811123959944e-03, + 2.5434835289019607e-05, 5.3659188242128064e-05, 5.3659188242090029e-05, 1.5382434574371947e-06, + + -1.1772420545074049e-02, 9.9965127203158893e-04, -2.9771347337083224e-04, -4.1374953013227720e-03, + 1.5009925916331957e-05, -9.5820722469863165e-04, -1.4619029680330181e-04, -6.1688324763178938e-06, + -8.4328227495495626e-03, 2.6584360504410145e-04, -2.2754565363904947e-04, 1.9843696720032210e-03, + 6.8173505958705989e-06, -6.2556987501449985e-05, 5.3544905127008731e-05, -1.6042248447103262e-06, + -1.5587645637327799e-03, 4.9139843602173047e-05, -4.2060661306196192e-05, 1.9843696720032301e-03, + 1.2601527202690473e-06, -6.2556987501449782e-05, 5.3544905127005309e-05, -1.6042248447096918e-06, + 5.3152936220840080e-03, -1.6756391783975450e-04, 1.4342433102665958e-04, 1.9843696720032410e-03, + -4.2970451553338836e-06, -6.2556987501450744e-05, 5.3544905127002904e-05, -1.6042248447089394e-06, + 1.2189351807900777e-02, -3.8426767928168319e-04, 3.2890932335951224e-04, 1.9843696720032457e-03, + -9.8542430309342842e-06, -6.2556987501449619e-05, 5.3544905127001169e-05, -1.6042248447085263e-06, + 1.9063409993717553e-02, -6.0097144072361120e-04, 5.1439431569237854e-04, 1.9843696720032670e-03, + -1.5411440906539592e-05, -6.2556987501451611e-05, 5.3544905126996466e-05, -1.6042248447072574e-06, + 2.5937468179534327e-02, -8.1767520216553769e-04, 6.9987930802523882e-04, 1.9843696720033108e-03, + -2.0968638782141884e-05, -6.2556987501459797e-05, 5.3544905126988287e-05, -1.6042248447047786e-06, + 3.2811526365351132e-02, -1.0343789636074571e-03, 8.8536430035807004e-04, 1.9843696720032926e-03, + -2.6525836657742338e-05, -6.2556987501455094e-05, 5.3544905126988287e-05, -1.6042248447056049e-06, + + -9.0272890314765722e-03, 5.8525114630483929e-04, -2.2574513915869974e-04, -4.4933715731932363e-03, + 2.6541011214171422e-05, 7.5274196333601873e-04, -1.5552020407559827e-04, 7.8220800114296213e-07, + -6.9204828041277604e-03, 6.0730626955139981e-04, -1.8789706627799494e-04, 1.6284934001327706e-03, + 1.6073771990022628e-05, -1.4290827386115464e-04, 4.4214997854705820e-05, -3.7823996304681823e-06, + -1.2792161864866225e-03, 1.1225748725241897e-04, -3.4731820796203245e-05, 1.6284934001327780e-03, + 2.9711553210232943e-06, -1.4290827386115610e-04, 4.4214997854704085e-05, -3.7823996304676809e-06, + 4.3620504311545211e-03, -3.8279129504656216e-04, 1.1843342468558873e-04, 1.6284934001327851e-03, + -1.0131461347976333e-05, -1.4290827386115716e-04, 4.4214997854703523e-05, -3.7823996304675407e-06, + 1.0003317048795649e-02, -8.7784007734554280e-04, 2.7159867016738124e-04, 1.6284934001327919e-03, + -2.3234078016975833e-05, -1.4290827386115735e-04, 4.4214997854702446e-05, -3.7823996304672675e-06, + 1.5644583666436781e-02, -1.3728888596445214e-03, 4.2476391564917615e-04, 1.6284934001328049e-03, + -3.6336694685976650e-05, -1.4290827386115966e-04, 4.4214997854700812e-05, -3.7823996304667661e-06, + 2.1285850284077916e-02, -1.8679376419435008e-03, 5.7792916113097177e-04, 1.6284934001328227e-03, + -4.9439311354977518e-05, -1.4290827386116670e-04, 4.4214997854699179e-05, -3.7823996304657628e-06, + 2.6927116901719089e-02, -2.3629864242424841e-03, 7.3109440661274961e-04, 1.6284934001328183e-03, + -6.2541928023973379e-05, -1.4290827386116294e-04, 4.4214997854697953e-05, -3.7823996304655858e-06, + + -6.2247900453550730e-03, 1.0327723977360613e-03, -1.3371278969370395e-04, -2.4924537019540933e-03, + 2.6593890523597406e-05, 4.0248850825023367e-04, -1.3292722975764579e-04, 1.2261851803121024e-05, + -4.5637037010479806e-03, 7.5338078003219552e-04, -1.2532535988959181e-04, 1.0739079292105612e-03, + 2.0052019536976041e-05, -1.7728179706443800e-04, 2.9490936864655919e-05, -4.7185409457015368e-06, + -8.4357750896041491e-04, 1.3925862048674964e-04, -2.3165757864813873e-05, 1.0739079292105657e-03, + 3.7065142258784086e-06, -1.7728179706443867e-04, 2.9490936864655435e-05, -4.7185409457013454e-06, + 2.8765486831271551e-03, -4.7486353905869716e-04, 7.8993844159963767e-05, 1.0739079292105696e-03, + -1.2638991085219166e-05, -1.7728179706443922e-04, 2.9490936864655282e-05, -4.7185409457013344e-06, + 6.5966748752147126e-03, -1.0889856986041411e-03, 1.8115344618474199e-04, 1.0739079292105755e-03, + -2.8984496396316930e-05, -1.7728179706443943e-04, 2.9490936864654591e-05, -4.7185409457010650e-06, + 1.0316801067302282e-02, -1.7031078581495856e-03, 2.8331304820951964e-04, 1.0739079292105826e-03, + -4.5330001707415101e-05, -1.7728179706444065e-04, 2.9490936864654490e-05, -4.7185409457012421e-06, + 1.4036927259389841e-02, -2.3172300176950325e-03, 3.8547265023429852e-04, 1.0739079292105855e-03, + -6.1675507018512700e-05, -1.7728179706444239e-04, 2.9490936864654900e-05, -4.7185409457009464e-06, + 1.7757053451477430e-02, -2.9313521772404848e-03, 4.8763225225907262e-04, 1.0739079292105883e-03, + -7.8021012329608367e-05, -1.7728179706444209e-04, 2.9490936864654080e-05, -4.7185409457005339e-06, + + -2.7685660836065627e-03, 9.6267943695907572e-04, -5.1302926806916285e-05, -1.3595218641067415e-03, + 2.0985465997969670e-05, 2.5160999330443233e-04, -8.5156552130073984e-05, 1.5318561784528383e-05, + -2.1160573442293054e-03, 6.5976850295807366e-04, -5.9827506156292608e-05, 4.9794003061817010e-04, + 1.7763183947286998e-05, -1.5525342423246231e-04, 1.4078309516760695e-05, -4.1799436025251460e-06, + -3.9114247992314439e-04, 1.2195486531873465e-04, -1.1058811420875967e-05, 4.9794003061817314e-04, + 3.2834345625935113e-06, -1.5525342423246226e-04, 1.4078309516760042e-05, -4.1799436025254264e-06, + 1.3337723843830172e-03, -4.1585877232060533e-04, 3.7709883314540850e-05, 4.9794003061817682e-04, + -1.1196314822099668e-05, -1.5525342423246185e-04, 1.4078309516759505e-05, -4.1799436025257211e-06, + 3.0586872486891748e-03, -9.5367240995994330e-04, 8.6478578049958005e-05, 4.9794003061818224e-04, + -2.5676064206792951e-05, -1.5525342423246198e-04, 1.4078309516758496e-05, -4.1799436025261192e-06, + 4.7836021129953393e-03, -1.4914860475992832e-03, 1.3524727278537308e-04, 4.9794003061818745e-04, + -4.0155813591486747e-05, -1.5525342423246160e-04, 1.4078309516757525e-05, -4.1799436025265182e-06, + 6.5085169773014956e-03, -2.0292996852386224e-03, 1.8401596752079196e-04, 4.9794003061818853e-04, + -5.4635562976179490e-05, -1.5525342423246120e-04, 1.4078309516757781e-05, -4.1799436025266952e-06, + 8.2334318416076614e-03, -2.5671133228779642e-03, 2.3278466225620765e-04, 4.9794003061819168e-04, + -6.9115312360872741e-05, -1.5525342423246101e-04, 1.4078309516756759e-05, -4.1799436025271077e-06, + + -5.5057819369581863e-04, 3.1787646834022232e-04, -7.4775167389616631e-06, -4.6186028600569848e-04, + 4.3171463021096952e-06, 2.6665516045338905e-04, -2.9312012410193478e-05, 1.6923298255515372e-05, + -4.8665238793613104e-04, 2.8096888717670101e-04, -1.4530384527701296e-05, 1.1451660589924915e-04, + 8.3891214184953722e-06, -6.6116193242614837e-05, 3.4192174122083424e-06, -1.9740860933551212e-06, + -8.9955228480437954e-05, 5.1935675378195315e-05, -2.6858679675683887e-06, 1.1451660589925117e-04, + 1.5506865940831339e-06, -6.6116193242615583e-05, 3.4192174122070139e-06, -1.9740860933552669e-06, + 3.0674193097525530e-04, -1.7709753642030946e-04, 9.1586485925635640e-06, 1.1451660589925462e-04, + -5.2877482303300981e-06, -6.6116193242616098e-05, 3.4192174122056849e-06, -1.9740860933554109e-06, + 7.0343909043094825e-04, -4.0613074821881383e-04, 2.1003165152696916e-05, 1.1451660589925732e-04, + -1.2126183054742609e-05, -6.6116193242617480e-05, 3.4192174122050653e-06, -1.9740860933548040e-06, + 1.1001362498866394e-03, -6.3516396001732215e-04, 3.2847681712829456e-05, 1.1451660589926117e-04, + -1.8964617879153966e-05, -6.6116193242618767e-05, 3.4192174122030078e-06, -1.9740860933549811e-06, + 1.4968334093423308e-03, -8.6419717181582527e-04, 4.4692198272961002e-05, 1.1451660589926484e-04, + -2.5803052703569116e-05, -6.6116193242617331e-05, 3.4192174122015514e-06, -1.9740860933558666e-06, + 1.8935305687980254e-03, -1.0932303836143303e-03, 5.6536714833096980e-05, 1.1451660589926414e-04, + -3.2641487527979211e-05, -6.6116193242619960e-05, 3.4192174122038129e-06, -1.9740860933535500e-06, }; long i = 0; struct gkyl_range_iter iter; @@ -2947,129 +4667,155 @@ test_fem_poisson_perp_consteps_3x(int poly_order, const int *cells, struct gkyl_ while (gkyl_range_iter_next(&iter)) { long loc = gkyl_range_idx(&localRange, iter.idx); const double *phi_p = gkyl_array_cfetch(phi_ho, loc); - if (iter.idx[2] == 3) { + if (iter.idx[1] == 3) { // Only check one cell in z: - for (int m=0; mgeo_int.jacobtot, fileNm); sprintf(fileNm, fmt, name, "jacobtot_inv"); gkyl_grid_sub_array_write(&grid, &local, 0, up->geo_int.jacobtot_inv, fileNm); - sprintf(fileNm, fmt, name, "bmag_inv"); - gkyl_grid_sub_array_write(&grid, &local, 0, up->geo_int.bmag_inv, fileNm); - sprintf(fileNm, fmt, name, "bmag_inv_sq"); - gkyl_grid_sub_array_write(&grid, &local, 0, up->geo_int.bmag_inv_sq, fileNm); sprintf(fileNm, fmt, name, "gxxj"); gkyl_grid_sub_array_write(&grid, &local, 0, up->geo_int.gxxj, fileNm); sprintf(fileNm, fmt, name, "gxyj"); diff --git a/gyrokinetic/unit/ctest_gk_geometry_mirror.c b/gyrokinetic/unit/ctest_gk_geometry_mirror.c index d093ea7884..c5fb213b6e 100644 --- a/gyrokinetic/unit/ctest_gk_geometry_mirror.c +++ b/gyrokinetic/unit/ctest_gk_geometry_mirror.c @@ -54,10 +54,6 @@ write_geometry(gk_geometry *up, struct gkyl_rect_grid grid, struct gkyl_range lo gkyl_grid_sub_array_write(&grid, &local, 0, up->geo_int.jacobtot, fileNm); sprintf(fileNm, fmt, name, "jacobtot_inv"); gkyl_grid_sub_array_write(&grid, &local, 0, up->geo_int.jacobtot_inv, fileNm); - sprintf(fileNm, fmt, name, "bmag_inv"); - gkyl_grid_sub_array_write(&grid, &local, 0, up->geo_int.bmag_inv, fileNm); - sprintf(fileNm, fmt, name, "bmag_inv_sq"); - gkyl_grid_sub_array_write(&grid, &local, 0, up->geo_int.bmag_inv_sq, fileNm); sprintf(fileNm, fmt, name, "gxxj"); gkyl_grid_sub_array_write(&grid, &local, 0, up->geo_int.gxxj, fileNm); sprintf(fileNm, fmt, name, "gxyj"); diff --git a/gyrokinetic/unit/ctest_gk_geometry_tok.c b/gyrokinetic/unit/ctest_gk_geometry_tok.c index 15a03cd4dc..9bd31c05a0 100644 --- a/gyrokinetic/unit/ctest_gk_geometry_tok.c +++ b/gyrokinetic/unit/ctest_gk_geometry_tok.c @@ -38,6 +38,8 @@ write_geometry(gk_geometry *up, struct gkyl_rect_grid grid, struct gkyl_range lo gkyl_grid_sub_array_write(&grid, &local, 0, up->geo_corn.mc2nu_pos, fileNm); sprintf(fileNm, fmt, name, "bmag_corn"); gkyl_grid_sub_array_write(&grid, &local, 0, up->geo_corn.bmag, fileNm); + sprintf(fileNm, fmt, name, "bmag_inv_corn"); + gkyl_grid_sub_array_write(&grid, &local, 0, up->geo_corn.bmag_inv, fileNm); sprintf(fileNm, fmt, name, "bmag"); gkyl_grid_sub_array_write(&grid, &local, 0, up->geo_int.bmag, fileNm); sprintf(fileNm, fmt, name, "g_ij"); @@ -64,10 +66,6 @@ write_geometry(gk_geometry *up, struct gkyl_rect_grid grid, struct gkyl_range lo gkyl_grid_sub_array_write(&grid, &local, 0, up->geo_int.jacobtot, fileNm); sprintf(fileNm, fmt, name, "jacobtot_inv"); gkyl_grid_sub_array_write(&grid, &local, 0, up->geo_int.jacobtot_inv, fileNm); - sprintf(fileNm, fmt, name, "bmag_inv"); - gkyl_grid_sub_array_write(&grid, &local, 0, up->geo_int.bmag_inv, fileNm); - sprintf(fileNm, fmt, name, "bmag_inv_sq"); - gkyl_grid_sub_array_write(&grid, &local, 0, up->geo_int.bmag_inv_sq, fileNm); sprintf(fileNm, fmt, name, "gxxj"); gkyl_grid_sub_array_write(&grid, &local, 0, up->geo_int.gxxj, fileNm); sprintf(fileNm, fmt, name, "gxyj"); @@ -78,7 +76,8 @@ write_geometry(gk_geometry *up, struct gkyl_rect_grid grid, struct gkyl_range lo gkyl_grid_sub_array_write(&grid, &local, 0, up->geo_int.gxzj, fileNm); sprintf(fileNm, fmt, name, "eps2"); gkyl_grid_sub_array_write(&grid, &local, 0, up->geo_int.eps2, fileNm); - + sprintf(fileNm, fmt, name, "qprofile"); + gkyl_grid_sub_array_write(&grid, &local, 0, up->geo_int.qprofile, fileNm); // Create Nodal Range and Grid and Write Nodal Coordinates struct gkyl_range nrange; @@ -612,8 +611,141 @@ test_3x_p1_straight_cylinder() gkyl_gk_geometry_release(gk_geom); } +void +test_asdex_qprofile_core() +{ + double clower[] = { -0.09, -0.01, -M_PI+1e-14 }; + double cupper[] = {0.14975, 0.01, M_PI-1e-14 }; + int ccells[] = { 16, 1, 4 }; + + int cpoly_order = 1; + int cnghost[GKYL_MAX_CDIM] = { 1, 1, 1 }; + struct gkyl_rect_grid cgrid; + struct gkyl_range clocal, clocal_ext; + struct gkyl_basis cbasis; + gkyl_rect_grid_init(&cgrid, 3, clower, cupper, ccells); + gkyl_create_grid_ranges(&cgrid, cnghost, &clocal_ext, &clocal); + gkyl_cart_modal_serendip(&cbasis, 3, cpoly_order); + + struct gkyl_efit_inp efit_inp = { + // psiRZ and related inputs + .filepath = "gyrokinetic/data/eqdsk/asdex.geqdsk", + .rz_poly_order = 2, + .flux_poly_order = 1, + }; + struct gkyl_tok_geo_grid_inp ginp = { + .ftype = GKYL_CORE, + .rmin = 0.0, + .rmax = 5.0, + .rclose = 2.5, + .rright = 2.5, + .rleft = 0.7, + .zmin = -1.3, + .zmax = 1.0, + .zmin_left = -1.2, + .zmin_right = -1.0, + }; + // Initialize geometry + struct gkyl_gk_geometry_inp geometry_input = { + .geometry_id = GKYL_GEOMETRY_TOKAMAK, + .efit_info = efit_inp, + .tok_grid_info = ginp, + .grid = cgrid, + .local = clocal, + .local_ext = clocal_ext, + .global = clocal, + .global_ext = clocal_ext, + .basis = cbasis, + .geo_grid = cgrid, + .geo_local = clocal, + .geo_local_ext = clocal_ext, + .geo_global = clocal, + .geo_global_ext = clocal_ext, + .geo_basis = cbasis, + }; + + struct gk_geometry *gk_geom = gkyl_gk_geometry_tok_new(&geometry_input); + write_geometry(gk_geom, cgrid, clocal, "asdex_core"); + +// // Create Nodal Range and Grid and Write Nodal Coordinates +// struct gkyl_range nrange; +// gkyl_gk_geometry_init_nodal_range(&nrange, &clocal, cpoly_order); +// struct gkyl_array* mc2p_nodal = gkyl_array_new(GKYL_DOUBLE, 3, nrange.volume); +// struct gkyl_nodal_ops *n2m = gkyl_nodal_ops_new(&cbasis, &cgrid, false); +// gkyl_nodal_ops_m2n(n2m, &cbasis, &cgrid, &nrange, &clocal, 3, mc2p_nodal, gk_geom->geo_int.mc2p, true); +// gkyl_nodal_ops_release(n2m); +// struct gkyl_rect_grid ngrid; +// gkyl_gk_geometry_init_nodal_grid(&ngrid, &cgrid, &nrange); +// +// gkyl_grid_sub_array_write(&ngrid, &nrange, 0, mc2p_nodal, "asdex_core_nodes.gkyl"); +// gkyl_array_release(mc2p_nodal); + + gkyl_gk_geometry_release(gk_geom); +} + +void +test_asdex_qprofile_sol() +{ + double clower[] = { 0.16, -0.01, -M_PI+1e-14 }; + double cupper[] = {0.17501, 0.01, M_PI-1e-14 }; + int ccells[] = { 4, 1, 16 }; + + int cpoly_order = 1; + int cnghost[GKYL_MAX_CDIM] = { 1, 1, 1 }; + struct gkyl_rect_grid cgrid; + struct gkyl_range clocal, clocal_ext; + struct gkyl_basis cbasis; + gkyl_rect_grid_init(&cgrid, 3, clower, cupper, ccells); + gkyl_create_grid_ranges(&cgrid, cnghost, &clocal_ext, &clocal); + gkyl_cart_modal_serendip(&cbasis, 3, cpoly_order); + + struct gkyl_efit_inp efit_inp = { + // psiRZ and related inputs + .filepath = "gyrokinetic/data/eqdsk/asdex.geqdsk", + .rz_poly_order = 2, + .flux_poly_order = 1, + }; + + struct gkyl_tok_geo_grid_inp ginp = { + .ftype = GKYL_LSN_SOL, + .rmin = 0.0, + .rmax = 5.0, + .rclose = 2.5, + .rright = 2.5, + .rleft = 0.7, + .zmin = -1.3, + .zmax = 1.0, + .zmin_left = -1.2, + .zmin_right = -1.0, + }; + + struct gkyl_gk_geometry_inp geometry_inp = { + .geometry_id = GKYL_GEOMETRY_TOKAMAK, + .efit_info = efit_inp, + .tok_grid_info = ginp, + .grid = cgrid, + .local = clocal, + .local_ext = clocal_ext, + .global = clocal, + .global_ext = clocal_ext, + .basis = cbasis, + .geo_grid = cgrid, + .geo_local = clocal, + .geo_local_ext = clocal_ext, + .geo_global = clocal, + .geo_global_ext = clocal_ext, + .geo_basis = cbasis, + }; + + struct gk_geometry* gk_geom = gkyl_gk_geometry_tok_new(&geometry_inp); + write_geometry(gk_geom, cgrid, clocal, "asdex_sol"); + gkyl_gk_geometry_release(gk_geom); +} + TEST_LIST = { { "test_elliptical", test_elliptical}, { "test_3x_p1_straight_cylinder", test_3x_p1_straight_cylinder}, + { "test_asdex_qprofile_core", test_asdex_qprofile_core}, + { "test_asdex_qprofile_sol", test_asdex_qprofile_sol}, { NULL, NULL }, }; diff --git a/gyrokinetic/unit/ctest_ltx_miller.c b/gyrokinetic/unit/ctest_ltx_miller.c index 2b0d93f211..ea46649491 100644 --- a/gyrokinetic/unit/ctest_ltx_miller.c +++ b/gyrokinetic/unit/ctest_ltx_miller.c @@ -54,10 +54,6 @@ write_geometry(gk_geometry *up, struct gkyl_rect_grid grid, struct gkyl_basis ba gkyl_grid_sub_array_write(&grid, &local, 0, up->geo_int.jacobtot, fileNm); sprintf(fileNm, fmt, name, "jacobtot_inv"); gkyl_grid_sub_array_write(&grid, &local, 0, up->geo_int.jacobtot_inv, fileNm); - sprintf(fileNm, fmt, name, "bmag_inv"); - gkyl_grid_sub_array_write(&grid, &local, 0, up->geo_int.bmag_inv, fileNm); - sprintf(fileNm, fmt, name, "bmag_inv_sq"); - gkyl_grid_sub_array_write(&grid, &local, 0, up->geo_int.bmag_inv_sq, fileNm); sprintf(fileNm, fmt, name, "gxxj"); gkyl_grid_sub_array_write(&grid, &local, 0, up->geo_int.gxxj, fileNm); sprintf(fileNm, fmt, name, "gxyj"); diff --git a/gyrokinetic/zero/calc_derived_geo.c b/gyrokinetic/zero/calc_derived_geo.c index 0e2125de70..7343f07d63 100644 --- a/gyrokinetic/zero/calc_derived_geo.c +++ b/gyrokinetic/zero/calc_derived_geo.c @@ -22,7 +22,11 @@ gkyl_calc_derived_geo_new(const struct gkyl_basis *cbasis, const struct gkyl_rec void -gkyl_calc_derived_geo_advance(const gkyl_calc_derived_geo *up, const struct gkyl_range *crange, struct gkyl_array *gFld, struct gkyl_array *bmagFld, struct gkyl_array *jFld, struct gkyl_array *jinvFld, struct gkyl_array *grFld, struct gkyl_array *biFld, struct gkyl_array *cmagFld, struct gkyl_array *jtotFld, struct gkyl_array *jtotinvFld, struct gkyl_array *bmaginvFld, struct gkyl_array *bmaginvsqFld, struct gkyl_array *gxxJFld, struct gkyl_array *gxyJFld, struct gkyl_array *gyyJFld, struct gkyl_array *gxzJFld, struct gkyl_array *eps2Fld) +gkyl_calc_derived_geo_advance(const gkyl_calc_derived_geo *up, const struct gkyl_range *crange, struct gkyl_array *gFld, + struct gkyl_array *bmagFld, struct gkyl_array *jFld, struct gkyl_array *jinvFld, struct gkyl_array *grFld, + struct gkyl_array *biFld, struct gkyl_array *cmagFld, struct gkyl_array *jtotFld, struct gkyl_array *jtotinvFld, + struct gkyl_array *gxxJFld, struct gkyl_array *gxyJFld, struct gkyl_array *gyyJFld, struct gkyl_array *gxzJFld, + struct gkyl_array *eps2Fld) { struct gkyl_range_iter iter; gkyl_range_iter_init(&iter, crange); @@ -44,8 +48,6 @@ gkyl_calc_derived_geo_advance(const gkyl_calc_derived_geo *up, const struct gkyl double *eps2_i= gkyl_array_fetch(eps2Fld, loc); up->kernel(gij, bmag_i, j_i, jinv_i, grij, bi_i, cmag_i, jtot_i, jtotinv_i, gxxJ_i, gxyJ_i, gyyJ_i, gxzJ_i, eps2_i); } - gkyl_dg_inv_op_range(up->cbasis, 0, bmaginvFld, 0, bmagFld, crange); - gkyl_dg_mul_op_range(up->cbasis, 0, bmaginvsqFld, 0, bmaginvFld, 0, bmaginvFld, crange); } void diff --git a/gyrokinetic/zero/calc_metric_mirror.c b/gyrokinetic/zero/calc_metric_mirror.c index 0759653136..f293d83350 100644 --- a/gyrokinetic/zero/calc_metric_mirror.c +++ b/gyrokinetic/zero/calc_metric_mirror.c @@ -7,6 +7,7 @@ #include #include #include +#include gkyl_calc_metric_mirror* gkyl_calc_metric_mirror_new(const struct gkyl_basis *cbasis, const struct gkyl_rect_grid *grid, @@ -47,43 +48,50 @@ calc_dual(double J, const double e_2[3], const double e_3[3], double e1[3]) void gkyl_calc_metric_mirror_advance( gkyl_calc_metric_mirror *up, struct gk_geometry *gk_geom, struct gkyl_mirror_grid_gen *mirror_grid) { - enum { PSI_IDX, AL_IDX, TH_IDX }; // arrangement of computational coordinates - enum { R_IDX, Z_IDX, PHI_IDX }; // arrangement of cartesian coordinates + enum { PSI_IDX, AL_IDX, TH_IDX }; // Arrangement of computational coordinates. + enum { R_IDX, Z_IDX, PHI_IDX }; // Arrangement of cartesian coordinates. int cidx[3]; for(int ia=gk_geom->nrange_corn.lower[AL_IDX]; ia<=gk_geom->nrange_corn.upper[AL_IDX]; ++ia){ - for (int ip=gk_geom->nrange_corn.lower[PSI_IDX]; ip<=gk_geom->nrange_corn.upper[PSI_IDX]; ++ip) { - for (int it=gk_geom->nrange_corn.lower[TH_IDX]; it<=gk_geom->nrange_corn.upper[TH_IDX]; ++it) { - cidx[PSI_IDX] = ip; - cidx[AL_IDX] = ia; - cidx[TH_IDX] = it; - - // First fetch the mirror stuff at this location - const double *mirror_rza_n = gkyl_array_cfetch(mirror_grid->nodes_rza, gkyl_range_idx(&gk_geom->nrange_corn, cidx)); - const double *mirror_psi_n = gkyl_array_cfetch(mirror_grid->nodes_psi, gkyl_range_idx(&gk_geom->nrange_corn, cidx)); - const struct gkyl_mirror_grid_gen_geom *mirror_geo_n = gkyl_array_cfetch(mirror_grid->nodes_geom, gkyl_range_idx(&gk_geom->nrange_corn, cidx)); - - // Next fetch the gk_geometry nodal values at this location - double *mc2p_n = gkyl_array_fetch(gk_geom->geo_corn.mc2p_nodal, gkyl_range_idx(&gk_geom->nrange_corn, cidx)); - double *mc2nu_pos_n = gkyl_array_fetch(gk_geom->geo_corn.mc2nu_pos_nodal, gkyl_range_idx(&gk_geom->nrange_corn, cidx)); - double *bmag_n = gkyl_array_fetch(gk_geom->geo_corn.bmag_nodal, gkyl_range_idx(&gk_geom->nrange_corn, cidx)); - - // Set mapc2p - mc2p_n[0] = mirror_rza_n[0]; // R - mc2p_n[1] = mirror_rza_n[1]; // Z - mc2p_n[2] = mirror_rza_n[2]; // PHI - // Set mapc2nu - mc2nu_pos_n[0] = mirror_psi_n[0]; - mc2nu_pos_n[1] = mirror_rza_n[2]; - mc2nu_pos_n[2] = mirror_rza_n[1]; - // Set bmag - struct gkyl_vec3 B_cart = gkyl_vec3_polar_con_to_cart(mirror_rza_n[0], mirror_rza_n[2], mirror_geo_n->B); - bmag_n[0] = gkyl_vec3_len(B_cart); + for (int ip=gk_geom->nrange_corn.lower[PSI_IDX]; ip<=gk_geom->nrange_corn.upper[PSI_IDX]; ++ip) { + for (int it=gk_geom->nrange_corn.lower[TH_IDX]; it<=gk_geom->nrange_corn.upper[TH_IDX]; ++it) { + cidx[PSI_IDX] = ip; + cidx[AL_IDX] = ia; + cidx[TH_IDX] = it; + + // First fetch the mirror stuff at this location + const double *mirror_rza_n = gkyl_array_cfetch(mirror_grid->nodes_rza, gkyl_range_idx(&gk_geom->nrange_corn, cidx)); + const double *mirror_psi_n = gkyl_array_cfetch(mirror_grid->nodes_psi, gkyl_range_idx(&gk_geom->nrange_corn, cidx)); + const struct gkyl_mirror_grid_gen_geom *mirror_geo_n = gkyl_array_cfetch(mirror_grid->nodes_geom, gkyl_range_idx(&gk_geom->nrange_corn, cidx)); + + // Next fetch the gk_geometry nodal values at this location + double *mc2p_n = gkyl_array_fetch(gk_geom->geo_corn.mc2p_nodal, gkyl_range_idx(&gk_geom->nrange_corn, cidx)); + double *mc2nu_pos_n = gkyl_array_fetch(gk_geom->geo_corn.mc2nu_pos_nodal, gkyl_range_idx(&gk_geom->nrange_corn, cidx)); + double *bmag_n = gkyl_array_fetch(gk_geom->geo_corn.bmag_nodal, gkyl_range_idx(&gk_geom->nrange_corn, cidx)); + + // Set mapc2p + mc2p_n[0] = mirror_rza_n[0]; // R + mc2p_n[1] = mirror_rza_n[1]; // Z + mc2p_n[2] = mirror_rza_n[2]; // PHI + // Set mapc2nu + mc2nu_pos_n[0] = mirror_psi_n[0]; + mc2nu_pos_n[1] = mirror_rza_n[2]; + mc2nu_pos_n[2] = mirror_rza_n[1]; + // Set bmag + struct gkyl_vec3 B_cart = gkyl_vec3_polar_con_to_cart(mirror_rza_n[0], mirror_rza_n[2], mirror_geo_n->B); + bmag_n[0] = gkyl_vec3_len(B_cart); } } } - gkyl_nodal_ops_n2m(up->n2m, up->cbasis, up->grid, &gk_geom->nrange_corn, &gk_geom->local, 3, gk_geom->geo_corn.mc2p_nodal, gk_geom->geo_corn.mc2p, false); - gkyl_nodal_ops_n2m(up->n2m, up->cbasis, up->grid, &gk_geom->nrange_corn, &gk_geom->local, 3, gk_geom->geo_corn.mc2nu_pos_nodal, gk_geom->geo_corn.mc2nu_pos, false); - gkyl_nodal_ops_n2m(up->n2m, up->cbasis, up->grid, &gk_geom->nrange_corn, &gk_geom->local, 1, gk_geom->geo_corn.bmag_nodal, gk_geom->geo_corn.bmag, false); + gkyl_nodal_ops_n2m(up->n2m, up->cbasis, up->grid, &gk_geom->nrange_corn, &gk_geom->local, 3, + gk_geom->geo_corn.mc2p_nodal, gk_geom->geo_corn.mc2p, false); + gkyl_nodal_ops_n2m(up->n2m, up->cbasis, up->grid, &gk_geom->nrange_corn, &gk_geom->local, 3, + gk_geom->geo_corn.mc2nu_pos_nodal, gk_geom->geo_corn.mc2nu_pos, false); + gkyl_nodal_ops_n2m(up->n2m, up->cbasis, up->grid, &gk_geom->nrange_corn, &gk_geom->local, 1, + gk_geom->geo_corn.bmag_nodal, gk_geom->geo_corn.bmag, false); + + // Need 1/B for LBO collisions, computed weakly. + gkyl_dg_inv_op_range(*up->cbasis, 0, gk_geom->geo_corn.bmag_inv, 0, gk_geom->geo_corn.bmag, &gk_geom->local); + } void diff --git a/gyrokinetic/zero/efit.c b/gyrokinetic/zero/efit.c index 60a40882a7..e81ece916e 100644 --- a/gyrokinetic/zero/efit.c +++ b/gyrokinetic/zero/efit.c @@ -255,10 +255,21 @@ gkyl_efit* gkyl_efit_new(const struct gkyl_efit_inp *inp) // Now lets read the q profile struct gkyl_array *qflux_n = gkyl_array_new(GKYL_DOUBLE, 1, flux_nrange.volume); - for (int i = up->nr-1; i>=0; i--){ - fidx[0] = i; - double *q_n= gkyl_array_fetch(qflux_n, gkyl_range_idx(&flux_nrange, fidx)); - status = fscanf(ptr,"%lf", q_n); + int geqdsk_sign_convention = up->sibry > up->simag ? 0 : 1; + if (geqdsk_sign_convention) { + // psi increases toward magnetic axis. + for (int i = up->nr-1; i>=0; i--) { + fidx[0] = i; + double *q_n= gkyl_array_fetch(qflux_n, gkyl_range_idx(&flux_nrange, fidx)); + status = fscanf(ptr, "%lf", q_n); + } + } else { + // psi increases away from magnetic axis. + for (int i = 0; inr; i++) { + fidx[0] = i; + double *q_n= gkyl_array_fetch(qflux_n, gkyl_range_idx(&flux_nrange, fidx)); + status = fscanf(ptr, "%lf", q_n); + } } gkyl_nodal_ops_n2m(n2m_flux, &up->fluxbasis, &up->fluxgrid, &flux_nrange, &up->fluxlocal, 1, qflux_n, up->qflux, false); diff --git a/gyrokinetic/zero/fem_parproj.c b/gyrokinetic/zero/fem_parproj.c index b26bdca4dd..2d389cf0f7 100644 --- a/gyrokinetic/zero/fem_parproj.c +++ b/gyrokinetic/zero/fem_parproj.c @@ -8,16 +8,6 @@ gkyl_fem_parproj_new(const struct gkyl_range *solve_range, { struct gkyl_fem_parproj *up = gkyl_malloc(sizeof(struct gkyl_fem_parproj)); - up->kernels = gkyl_malloc(sizeof(struct gkyl_fem_parproj_kernels)); -#ifdef GKYL_HAVE_CUDA - if (use_gpu) - up->kernels_cu = gkyl_cu_malloc(sizeof(struct gkyl_fem_parproj_kernels)); - else - up->kernels_cu = up->kernels; -#else - up->kernels_cu = up->kernels; -#endif - up->solve_range = solve_range; up->ndim = solve_range->ndim; up->num_basis = basis->num_basis; @@ -25,7 +15,7 @@ gkyl_fem_parproj_new(const struct gkyl_range *solve_range, up->poly_order = basis->poly_order; up->pardir = up->ndim-1; // Assume parallel direction is always the last. up->isperiodic = bctype == GKYL_FEM_PARPROJ_PERIODIC; - up->isdirichlet = bctype == GKYL_FEM_PARPROJ_DIRICHLET; + up->isdirichlet = bctype == GKYL_FEM_PARPROJ_DIRICHLET_GHOST || GKYL_FEM_PARPROJ_DIRICHLET_SKIN; up->use_gpu = use_gpu; up->has_weight_rhs = false; @@ -72,23 +62,22 @@ gkyl_fem_parproj_new(const struct gkyl_range *solve_range, up->brhs = gkyl_array_new(GKYL_DOUBLE, 1, up->numnodes_global*perp_range.volume); // Global right side vector. - // Select local-to-global mapping kernel: - fem_parproj_choose_local2global_kernel(basis, up->isperiodic, up->kernels->l2g); - - // Select weighted LHS kernel (not always used): - fem_parproj_choose_lhs_kernel(basis, up->isdirichlet, has_weight_lhs, up->kernels->lhsker); - - // Select RHS source kernel: - fem_parproj_choose_srcstencil_kernel(basis, up->isdirichlet, up->has_weight_rhs, up->kernels->srcker); - - // Select kernel that fetches the solution: - up->kernels->solker = fem_parproj_choose_solstencil_kernel(basis); + // Allocate struct holding kernel pointers. + struct gkyl_fem_parproj_kernels *kernels_ho = gkyl_malloc(sizeof(struct gkyl_fem_parproj_kernels)); + if (!use_gpu) + up->kernels = gkyl_malloc(sizeof(struct gkyl_fem_parproj_kernels)); #ifdef GKYL_HAVE_CUDA - if (up->use_gpu) - fem_parproj_choose_kernels_cu(basis, up->has_weight_rhs, up->isperiodic, up->isdirichlet, up->kernels_cu); + if (use_gpu) + up->kernels = gkyl_cu_malloc(sizeof(struct gkyl_fem_parproj_kernels)); #endif + // Choose kernels. + fem_parproj_choose_kernels(basis, has_weight_lhs, up->has_weight_rhs, bctype, use_gpu, up->kernels); + + // Select kernels for building LHS matrix on host: + fem_parproj_choose_kernels(basis, has_weight_lhs, up->has_weight_rhs, bctype, false, kernels_ho); + // We support two cases: // a) No weight, or weight is a single number so we can divide the RHS by it. // Then we solve Ax=B where A is the discrete FEM projection operator, @@ -149,11 +138,11 @@ gkyl_fem_parproj_new(const struct gkyl_range *solve_range, } int keri = up->par_iter1d.idx[0] == up->parnum_cells? 1 : 0; - up->kernels->l2g[keri](up->parnum_cells, paridx, up->globalidx); + kernels_ho->l2g[keri](up->parnum_cells, paridx, up->globalidx); // Apply the wgt*phi*basis stencil. keri = idx_to_inloup_ker(up->parnum_cells, up->par_iter1d.idx[0]); - up->kernels->lhsker[keri](wgt_p, up->globalidx, tri[perpidx]); + kernels_ho->lhsker[keri](wgt_p, up->globalidx, tri[perpidx]); } } #ifdef GKYL_HAVE_CUDA @@ -168,6 +157,7 @@ gkyl_fem_parproj_new(const struct gkyl_range *solve_range, for (size_t i=0; ibrhs, 0.0); double *brhs_p = gkyl_array_fetch(up->brhs, 0); - int idx1[GKYL_MAX_CDIM]; + int idx1[GKYL_MAX_CDIM], dirichlet_idx[GKYL_MAX_CDIM]; gkyl_range_iter_init(&up->perp_iter2d, &up->perp_range2d); while (gkyl_range_iter_next(&up->perp_iter2d)) { long perpidx = gkyl_range_idx(&up->perp_range2d, up->perp_iter2d.idx); @@ -207,8 +197,8 @@ gkyl_fem_parproj_set_rhs(struct gkyl_fem_parproj* up, const struct gkyl_array *r long linidx = gkyl_range_idx(up->solve_range, idx1); const double *wgt_p = up->has_weight_rhs? gkyl_array_cfetch(up->weight_rhs, linidx) : NULL; - const double *phibc_p = up->isdirichlet? gkyl_array_cfetch(phibc, linidx) : NULL; const double *rhsin_p = gkyl_array_cfetch(rhsin, linidx); + const double *phibc_p = up->kernels->get_dirichlet_value(up->pardir, up->parnum_cells, idx1, up->solve_range, phibc); long perpProbOff = perpidx*up->numnodes_global; @@ -267,18 +257,17 @@ void gkyl_fem_parproj_release(struct gkyl_fem_parproj *up) if (up->has_weight_rhs) { gkyl_array_release(up->weight_rhs); } + if (!up->use_gpu) { + gkyl_free(up->kernels); + gkyl_superlu_prob_release(up->prob); + } #ifdef GKYL_HAVE_CUDA if (up->use_gpu) { - gkyl_cu_free(up->kernels_cu); + gkyl_cu_free(up->kernels); gkyl_culinsolver_prob_release(up->prob_cu); - } else { - gkyl_superlu_prob_release(up->prob); } -#else - gkyl_superlu_prob_release(up->prob); #endif gkyl_array_release(up->brhs); gkyl_free(up->globalidx); - gkyl_free(up->kernels); gkyl_free(up); } diff --git a/gyrokinetic/zero/fem_parproj_cu.cu b/gyrokinetic/zero/fem_parproj_cu.cu index 4fbbb884f8..73ff57b578 100644 --- a/gyrokinetic/zero/fem_parproj_cu.cu +++ b/gyrokinetic/zero/fem_parproj_cu.cu @@ -12,10 +12,11 @@ extern "C" { // cudaMemcpyFromSymbol. __global__ static void fem_parproj_set_cu_ker_ptrs(struct gkyl_fem_parproj_kernels* kers, enum gkyl_basis_type b_type, - int dim, int poly_order, bool isperiodic, bool isweighted, bool isdirichlet) + int dim, int poly_order, bool has_weight_lhs, bool has_weight_rhs, + enum gkyl_fem_parproj_bc_type bctype) { // Set l2g kernels. - int bckey_periodic = isperiodic? 0 : 1; + int bckey_periodic = bctype == GKYL_FEM_PARPROJ_PERIODIC? 0 : 1; const local2global_kern_list *local2global_kernels; switch (b_type) { case GKYL_BASIS_MODAL_SERENDIPITY: @@ -29,11 +30,18 @@ fem_parproj_set_cu_ker_ptrs(struct gkyl_fem_parproj_kernels* kers, enum gkyl_bas kers->l2g[k] = CK(local2global_kernels, dim, bckey_periodic, poly_order, k); // Set RHS stencil kernels. - int bckey_dirichlet = isdirichlet? 1 : 0; + int bckey_dirichlet; + if (bctype == GKYL_FEM_PARPROJ_DIRICHLET_GHOST) + bckey_dirichlet = 1; + else if (bctype == GKYL_FEM_PARPROJ_DIRICHLET_SKIN) + bckey_dirichlet = 2; + else + bckey_dirichlet = 0; + const srcstencil_kern_list *srcstencil_kernels; switch (b_type) { case GKYL_BASIS_MODAL_SERENDIPITY: - srcstencil_kernels = isweighted? ser_srcstencil_list_weighted : ser_srcstencil_list_noweight; + srcstencil_kernels = has_weight_rhs? ser_srcstencil_list_weighted : ser_srcstencil_list_noweight; break; default: assert(false); @@ -52,14 +60,20 @@ fem_parproj_set_cu_ker_ptrs(struct gkyl_fem_parproj_kernels* kers, enum gkyl_bas } kers->solker = solstencil_kernels[dim-1].kernels[poly_order-1]; + if (bctype == GKYL_FEM_PARPROJ_DIRICHLET_GHOST) + kers->get_dirichlet_value = get_dirichlet_value_enabled_ghost; + else if (bctype == GKYL_FEM_PARPROJ_DIRICHLET_SKIN) + kers->get_dirichlet_value = get_dirichlet_value_enabled_skin; + else + kers->get_dirichlet_value = get_dirichlet_value_disabled; } void -fem_parproj_choose_kernels_cu(const struct gkyl_basis *basis, bool has_weight_rhs, - bool isperiodic, bool isdirichlet, struct gkyl_fem_parproj_kernels *kers) +fem_parproj_choose_kernels_cu(const struct gkyl_basis *basis, bool has_weight_lhs, bool has_weight_rhs, + enum gkyl_fem_parproj_bc_type bctype, struct gkyl_fem_parproj_kernels *kers) { fem_parproj_set_cu_ker_ptrs<<<1,1>>>(kers, basis->b_type, basis->ndim, - basis->poly_order, isperiodic, has_weight_rhs, isdirichlet); + basis->poly_order, has_weight_lhs, has_weight_rhs, bctype); } __global__ void @@ -86,8 +100,8 @@ gkyl_fem_parproj_set_rhs_kernel(double *rhs_global, const struct gkyl_array *rhs long linidx = gkyl_range_idx(&range, idx); const double *wgt_p = weight? (const double *) gkyl_array_cfetch(weight, linidx) : NULL; - const double *phibc_p = phibc? (const double *) gkyl_array_cfetch(phibc, linidx) : NULL; const double *rhsin_p = (const double*) gkyl_array_cfetch(rhsin, linidx); + const double *phibc_p = kers->get_dirichlet_value(range.ndim-1, parnum_cells, idx, &range, phibc); int idx1d[] = {idx[range.ndim-1]}; long paridx = gkyl_range_idx(&par_range1d, idx1d); @@ -116,7 +130,7 @@ gkyl_fem_parproj_set_rhs_cu(gkyl_fem_parproj *up, const struct gkyl_array *rhsin const struct gkyl_array *wgt_cu = up->has_weight_rhs? up->weight_rhs->on_dev : NULL; gkyl_fem_parproj_set_rhs_kernel<<nblocks, rhsin->nthreads>>>(rhs_cu, rhsin->on_dev, wgt_cu, phibc_cu, - *up->solve_range, up->perp_range2d, up->par_range1d, up->kernels_cu, up->numnodes_global); + *up->solve_range, up->perp_range2d, up->par_range1d, up->kernels, up->numnodes_global); } __global__ void @@ -165,5 +179,5 @@ gkyl_fem_parproj_solve_cu(gkyl_fem_parproj *up, struct gkyl_array *phiout) double *x_cu = gkyl_culinsolver_get_sol_ptr(up->prob_cu, 0); gkyl_fem_parproj_get_sol_kernel<<nblocks, phiout->nthreads>>>(phiout->on_dev, x_cu, - *up->solve_range, up->perp_range2d, up->par_range1d, up->kernels_cu, up->numnodes_global); -} \ No newline at end of file + *up->solve_range, up->perp_range2d, up->par_range1d, up->kernels, up->numnodes_global); +} diff --git a/gyrokinetic/zero/fem_poisson_perp.c b/gyrokinetic/zero/fem_poisson_perp.c index 96085bb331..16f75dc59e 100644 --- a/gyrokinetic/zero/fem_poisson_perp.c +++ b/gyrokinetic/zero/fem_poisson_perp.c @@ -2,10 +2,75 @@ #include #include +void +fem_poisson_perp_bias_src_disabled(gkyl_fem_poisson_perp* up, struct gkyl_array *rhsin) +{ +} + +void +fem_poisson_perp_bias_src_enabled(gkyl_fem_poisson_perp* up, struct gkyl_array *rhsin) +{ +#ifdef GKYL_HAVE_CUDA + if (up->use_gpu) { + assert(gkyl_array_is_cu_dev(rhsin)); + + gkyl_fem_poisson_perp_bias_src_enabled_cu(up, rhsin); + return; + } +#endif + + double *brhs_p = gkyl_array_fetch(up->brhs, 0); + + int idx0[GKYL_MAX_CDIM], idx1[GKYL_MAX_CDIM]; + gkyl_range_iter_init(&up->par_iter1d, &up->par_range1d); + while (gkyl_range_iter_next(&up->par_iter1d)) { + long paridx = gkyl_range_idx(&up->par_range1d, up->par_iter1d.idx); + + gkyl_range_iter_init(&up->perp_iter2d, &up->perp_range2d); + while (gkyl_range_iter_next(&up->perp_iter2d)) { + long perpidx = gkyl_range_idx(&up->perp_range2d, up->perp_iter2d.idx); + + for (size_t d=0; dndim_perp; d++) idx1[d] = up->perp_iter2d.idx[d]; + idx1[up->pardir] = up->par_iter1d.idx[0]; + + int keri = idx_to_inup_ker(up->ndim_perp, up->num_cells, up->perp_iter2d.idx); + for (size_t d=0; dndim; d++) idx0[d] = idx1[d] - 1; + up->kernels->l2g[keri](up->num_cells, idx0, up->globalidx); + + long parProbOff = paridx*up->numnodes_global; + + for (int i=0; inum_bias_line; i++) { + // Index of the cell that abuts the line from below. + struct gkyl_poisson_bias_line *bl = &up->bias_lines[i]; + int bl_idx_m[up->bl_ndim_perp]; + for (int d=0; dbl_ndim_perp; d++) { + int perp_dir = bl->perp_dirs[d]; + double dx = up->grid.dx[perp_dir]; + bl_idx_m[d] = (bl->perp_coords[d]-1e-3*dx - up->grid.lower[perp_dir])/dx+1; + } + + if ( + ( idx1[bl->perp_dirs[0]] == bl_idx_m[0] && idx1[bl->perp_dirs[1]] == bl_idx_m[1] ) || + ( idx1[bl->perp_dirs[0]] == bl_idx_m[0]+1 && idx1[bl->perp_dirs[1]] == bl_idx_m[1] ) || + ( idx1[bl->perp_dirs[0]] == bl_idx_m[0] && idx1[bl->perp_dirs[1]] == bl_idx_m[1]+1 ) || + ( idx1[bl->perp_dirs[0]] == bl_idx_m[0]+1 && idx1[bl->perp_dirs[1]] == bl_idx_m[1]+1 ) + ) { + int edge[2] = { + -1+2*((bl_idx_m[0]+1)-idx1[bl->perp_dirs[0]]), + -1+2*((bl_idx_m[1]+1)-idx1[bl->perp_dirs[1]]), + }; + up->kernels->bias_src_ker[keri](edge, bl->perp_dirs, bl->val, parProbOff, up->globalidx, brhs_p); + } + } + } + + } +} + struct gkyl_fem_poisson_perp* gkyl_fem_poisson_perp_new(const struct gkyl_range *solve_range, const struct gkyl_rect_grid *grid, - const struct gkyl_basis basis, struct gkyl_poisson_bc *bcs, struct gkyl_array *epsilon, - struct gkyl_array *kSq, bool use_gpu) + const struct gkyl_basis basis, struct gkyl_poisson_bc *bcs, struct gkyl_poisson_bias_line_list *bias_lines, + struct gkyl_array *epsilon, struct gkyl_array *kSq, bool use_gpu) { struct gkyl_fem_poisson_perp *up = gkyl_malloc(sizeof(struct gkyl_fem_poisson_perp)); @@ -37,7 +102,11 @@ gkyl_fem_poisson_perp_new(const struct gkyl_range *solve_range, const struct gky } else { up->ishelmholtz = false; kSq_ho = gkyl_array_new(GKYL_DOUBLE, up->num_basis, 1); - gkyl_array_clear(kSq_ho, 0.); + gkyl_array_clear(kSq_ho, 0.0); + + up->kSq_null = use_gpu? gkyl_array_cu_dev_new(GKYL_DOUBLE, kSq_ho->ncomp, kSq_ho->size) + : gkyl_array_acquire(kSq_ho); + gkyl_array_clear(up->kSq_null, 0.0); } up->globalidx = gkyl_malloc(sizeof(long[up->num_basis])); // global index, one for each basis in a cell. @@ -163,6 +232,79 @@ gkyl_fem_poisson_perp_new(const struct gkyl_range *solve_range, const struct gky fem_poisson_perp_choose_kernels_cu(&basis, bcs, up->isdirperiodic, up->kernels_cu); #endif + // Copy the biasing line list (bias_lines) into this updater. + up->num_bias_line = 0; + bool *bl_in_solve_range = 0; + if (bias_lines) { + if (bias_lines->num_bias_line > 0) { + // Check if any bias lines are in solve_range, and copy their info into updater. + bl_in_solve_range = gkyl_malloc(bias_lines->num_bias_line * sizeof(bool)); + for (int i=0; inum_bias_line; i++) + bl_in_solve_range[i] = false; + + for (int i=0; inum_bias_line; i++) { + struct gkyl_poisson_bias_line *bl = &bias_lines->bl[i]; + + // MF 2025/11/10: For now limit ourselves to lines perpendicular to x and z. + up->bl_ndim_perp = 2; + assert(bl->perp_dirs[0] == 0 && bl->perp_dirs[1] == up->ndim-1); + + double line_coords[up->ndim]; + for (int d=0; dndim; d++) + line_coords[d] = grid->lower[d]+grid->dx[d]/2.0; + + for (int d=0; dbl_ndim_perp; d++) + line_coords[bl->perp_dirs[d]] = bl->perp_coords[d]; + + // If biased line is at domain boundary, shift it minimally so it is inside the domain. + for (int d=0; dndim; d++) { + if (fabs(line_coords[d] - grid->lower[d]) < 1e-3*grid->dx[d]) { + line_coords[d] += 1e-3*grid->dx[d]; + } + if (fabs(line_coords[d] - grid->upper[d]) < 1e-3*grid->dx[d]) { + line_coords[d] += -1e-3*grid->dx[d]; + } + } + + bool pick_lower = true; // If at a cell boundary, pick the cell lower than the biased line. + int line_idx[GKYL_MAX_CDIM]; + gkyl_rect_grid_find_cell(grid, line_coords, pick_lower, (int[3]){-1,-1,-1}, line_idx); + + bl_in_solve_range[i] = gkyl_range_contains_idx(solve_range, line_idx); + if (bl_in_solve_range[i]) + up->num_bias_line++; + } + + if (up->num_bias_line) { + // Copy biased lines in solve range into a temporary struct. + size_t bl_sz = up->num_bias_line * sizeof(struct gkyl_poisson_bias_line); + struct gkyl_poisson_bias_line *bias_lines_buff = gkyl_malloc(bl_sz); + int blc = 0; + for (int i=0; inum_bias_line; i++) { + if (bl_in_solve_range[i]) { + struct gkyl_poisson_bias_line *bl = &bias_lines->bl[i]; + memcpy(&bias_lines_buff[blc], &bias_lines->bl[i], sizeof(struct gkyl_poisson_bias_line)); + blc++; + } + } + + if (up->use_gpu) { + up->bias_lines = gkyl_cu_malloc(bl_sz); + gkyl_cu_memcpy(up->bias_lines, bias_lines_buff, bl_sz, GKYL_CU_MEMCPY_H2D); + } + else { + up->bias_lines = gkyl_malloc(bl_sz); + memcpy(up->bias_lines, bias_lines_buff, bl_sz); + } + gkyl_free(bias_lines_buff); + + // Select biasing kernels: + fem_poisson_perp_choose_bias_lhs_kernels(&basis, up->isdirperiodic, up->kernels->bias_lhs_ker); + fem_poisson_perp_choose_bias_src_kernels(&basis, up->isdirperiodic, up->kernels->bias_src_ker); + } + } + } + // Create a linear Ax=B problem for each perp plane. Here A is the discrete (global) // matrix representation of the LHS of the perpendiculat Helmholtz equation. // cuSolverRF may support for A_i x_i = B_i, so we may revisit this @@ -177,11 +319,11 @@ gkyl_fem_poisson_perp_new(const struct gkyl_range *solve_range, const struct gky up->prob = gkyl_superlu_prob_new(up->par_range.volume, up->numnodes_global, up->numnodes_global, 1); #endif - struct gkyl_mat_triples **tri = gkyl_malloc(up->par_range.volume*sizeof(struct gkyl_mat_triples *)); + up->tri = gkyl_malloc(up->par_range.volume*sizeof(struct gkyl_mat_triples *)); for (size_t i=0; ipar_range.volume; i++) { - tri[i] = gkyl_mat_triples_new(up->numnodes_global, up->numnodes_global); + up->tri[i] = gkyl_mat_triples_new(up->numnodes_global, up->numnodes_global); #ifdef GKYL_HAVE_CUDA - if (up->use_gpu) gkyl_mat_triples_set_rowmaj_order(tri[i]); + if (up->use_gpu) gkyl_mat_triples_set_rowmaj_order(up->tri[i]); #endif } @@ -209,21 +351,130 @@ gkyl_fem_poisson_perp_new(const struct gkyl_range *solve_range, const struct gky // Apply the -nabla . (epsilon*nabla_perp)-kSq stencil. keri = idx_to_inloup_ker(up->ndim_perp, up->num_cells, idx1); - up->kernels->lhsker[keri](eps_p, kSq_p, up->dx, up->bcvals, up->globalidx, tri[paridx]); + up->kernels->lhsker[keri](eps_p, kSq_p, up->dx, up->bcvals, up->globalidx, up->tri[paridx]); } } + + if (up->num_bias_line > 0) { + // If biased lines are specified, replace the corresponding equation in the + // linear system so it only has a 1. + gkyl_range_iter_init(&up->par_iter1d, &up->par_range1d); + while (gkyl_range_iter_next(&up->par_iter1d)) { + long paridx = gkyl_range_idx(&up->par_range1d, up->par_iter1d.idx); + + gkyl_range_iter_init(&up->perp_iter2d, &up->perp_range2d); + while (gkyl_range_iter_next(&up->perp_iter2d)) { + long perpidx = gkyl_range_idx(&up->perp_range2d, up->perp_iter2d.idx); + + for (size_t d=0; dndim_perp; d++) idx1[d] = up->perp_iter2d.idx[d]; + idx1[up->pardir] = up->par_iter1d.idx[0]; + + int keri = idx_to_inup_ker(up->ndim_perp, up->num_cells, up->perp_iter2d.idx); + for (size_t d=0; dndim; d++) idx0[d] = idx1[d] - 1; + up->kernels->l2g[keri](up->num_cells, idx0, up->globalidx); + + for (int i=0; inum_bias_line; i++) { + if (bl_in_solve_range[i]) { + // Index of the cell that abuts the line from below. + struct gkyl_poisson_bias_line *bl = &bias_lines->bl[i]; + int bl_idx_m[up->bl_ndim_perp]; + for (int d=0; dbl_ndim_perp; d++) { + int perp_dir = bl->perp_dirs[d]; + double dx = up->grid.dx[perp_dir]; + bl_idx_m[d] = (bl->perp_coords[d]-1e-3*dx - up->grid.lower[perp_dir])/dx+1; + } + + if ( + ( idx1[bl->perp_dirs[0]] == bl_idx_m[0] && idx1[bl->perp_dirs[1]] == bl_idx_m[1] ) || + ( idx1[bl->perp_dirs[0]] == bl_idx_m[0]+1 && idx1[bl->perp_dirs[1]] == bl_idx_m[1] ) || + ( idx1[bl->perp_dirs[0]] == bl_idx_m[0] && idx1[bl->perp_dirs[1]] == bl_idx_m[1]+1 ) || + ( idx1[bl->perp_dirs[0]] == bl_idx_m[0]+1 && idx1[bl->perp_dirs[1]] == bl_idx_m[1]+1 ) + ) { + int edge[2] = { + -1+2*((bl_idx_m[0]+1)-idx1[bl->perp_dirs[0]]), + -1+2*((bl_idx_m[1]+1)-idx1[bl->perp_dirs[1]]), + }; + up->kernels->bias_lhs_ker[keri](edge, bl->perp_dirs, up->globalidx, up->tri[paridx]); + } + } + } + } + } + + up->bias_line_src = fem_poisson_perp_bias_src_enabled; + } + else { + up->bias_line_src = fem_poisson_perp_bias_src_disabled; + } + + if (bl_in_solve_range) + gkyl_free(bl_in_solve_range); + + if (!(up->use_gpu)) + gkyl_superlu_amat_from_triples(up->prob, up->tri); #ifdef GKYL_HAVE_CUDA if (up->use_gpu) - gkyl_culinsolver_amat_from_triples(up->prob_cu, tri); - else - gkyl_superlu_amat_from_triples(up->prob, tri); -#else - gkyl_superlu_amat_from_triples(up->prob, tri); + gkyl_culinsolver_amat_from_triples(up->prob_cu, up->tri); #endif - for (size_t i=0; ipar_range.volume; i++) - gkyl_mat_triples_release(tri[i]); - gkyl_free(tri); +#ifdef GKYL_HAVE_CUDA + if (up->use_gpu) { + // Store offsets into csr_val in cudss_ops.cu so we can update the LHS matrix on the GPU. + up->csr_val_idx = gkyl_array_cu_dev_new(GKYL_LONG, pow(up->basis.num_basis, 2), up->epsilon->size); + struct gkyl_array *csr_val_idx_ho = gkyl_array_new(GKYL_LONG, up->csr_val_idx->ncomp, up->csr_val_idx->size); + + gkyl_range_iter_init(&up->par_iter1d, &up->par_range1d); + while (gkyl_range_iter_next(&up->par_iter1d)) { + long paridx = gkyl_range_idx(&up->par_range1d, up->par_iter1d.idx); + + gkyl_range_iter_init(&up->perp_iter2d, &up->perp_range2d); + while (gkyl_range_iter_next(&up->perp_iter2d)) { + long perpidx = gkyl_range_idx(&up->perp_range2d, up->perp_iter2d.idx); + + for (size_t d=0; dndim_perp; d++) idx1[d] = up->perp_iter2d.idx[d]; + idx1[up->pardir] = up->par_iter1d.idx[0]; + + long linidx = gkyl_range_idx(up->solve_range, idx1); + + long *csr_val_idx_p = gkyl_array_fetch(csr_val_idx_ho, linidx); + + int keri = idx_to_inup_ker(up->ndim_perp, up->num_cells, up->perp_iter2d.idx); + for (size_t d=0; dndim; d++) idx0[d] = idx1[d] - 1; + up->kernels->l2g[keri](up->num_cells, idx0, up->globalidx); + + for (int k=0; kbasis.num_basis; k++) { + for (int l=0; lbasis.num_basis; l++) { + size_t nnz = gkyl_mat_triples_size(up->tri[paridx]); // Number of nonzero elements. + // Given the global i,j (row-col) place in the LHS matrix, find the linear index into the mat_triples list. + // Here we do a brute-force search as we are unsure of the order, and this is done only once at t=0. + long off = -1; + gkyl_mat_triples_iter *mtt_iter = gkyl_mat_triples_iter_new(up->tri[k]); + for (size_t m=0; mglobalidx[k] == mt.row) && (up->globalidx[l] == mt.col)) { + off = m; + break; + } + } + + csr_val_idx_p[k*up->basis.num_basis+l] = paridx*nnz + off; + } + } + } + } + + gkyl_array_copy(up->csr_val_idx, csr_val_idx_ho); + gkyl_array_release(csr_val_idx_ho); + } +#endif + + if (up->use_gpu) { + for (size_t i=0; ipar_range.volume; i++) + gkyl_mat_triples_release(up->tri[i]); + + gkyl_free(up->tri); + } gkyl_array_release(epsilon_ho); gkyl_array_release(kSq_ho); @@ -304,6 +555,9 @@ gkyl_fem_poisson_perp_set_rhs(gkyl_fem_poisson_perp *up, struct gkyl_array *rhsi } + // Set the corresponding entries to the biasing potential. + up->bias_line_src(up, rhsin); + gkyl_superlu_brhs_from_array(up->prob, brhs_p); } @@ -350,6 +604,54 @@ gkyl_fem_poisson_perp_solve(gkyl_fem_poisson_perp *up, struct gkyl_array *phiout } +void +gkyl_fem_poisson_perp_update_lhs(gkyl_fem_poisson_perp *up, struct gkyl_array *epsilon, struct gkyl_array *kSq) +{ + assert(up->num_bias_line == 0); // Have not accounted for bias in csr_val_idx. +#ifdef GKYL_HAVE_CUDA + if (up->use_gpu) { + assert(gkyl_array_is_cu_dev(epsilon)); + if (up->ishelmholtz) + assert(gkyl_array_is_cu_dev(kSq)); + + gkyl_fem_poisson_perp_update_lhs_cu(up, epsilon, kSq); + return; + } +#endif + + int idx0[GKYL_MAX_CDIM], idx1[GKYL_MAX_CDIM]; + gkyl_range_iter_init(&up->par_iter1d, &up->par_range1d); + while (gkyl_range_iter_next(&up->par_iter1d)) { + long paridx = gkyl_range_idx(&up->par_range1d, up->par_iter1d.idx); + + // Clear mat triples. + gkyl_mat_triples_clear(up->tri[paridx], 0.0); + + gkyl_range_iter_init(&up->perp_iter2d, &up->perp_range2d); + while (gkyl_range_iter_next(&up->perp_iter2d)) { + long perpidx = gkyl_range_idx(&up->perp_range2d, up->perp_iter2d.idx); + + for (size_t d=0; dndim_perp; d++) idx1[d] = up->perp_iter2d.idx[d]; + idx1[up->pardir] = up->par_iter1d.idx[0]; + + long linidx = gkyl_range_idx(up->solve_range, idx1); + + double *eps_p = gkyl_array_fetch(epsilon, linidx); + double *kSq_p = up->ishelmholtz? gkyl_array_fetch(kSq, linidx) : gkyl_array_fetch(up->kSq_null,0); + + int keri = idx_to_inup_ker(up->ndim_perp, up->num_cells, up->perp_iter2d.idx); + for (size_t d=0; dndim; d++) idx0[d] = idx1[d] - 1; + up->kernels->l2g[keri](up->num_cells, idx0, up->globalidx); + + // Apply the -nabla . (epsilon*nabla_perp)-kSq stencil. + keri = idx_to_inloup_ker(up->ndim_perp, up->num_cells, idx1); + up->kernels->lhsker[keri](eps_p, kSq_p, up->dx, up->bcvals, up->globalidx, up->tri[paridx]); + } + } + + gkyl_superlu_amat_update_from_triples(up->prob, up->tri); +} + void gkyl_fem_poisson_perp_release(struct gkyl_fem_poisson_perp *up) { if (up->isdomperiodic) { @@ -357,18 +659,32 @@ void gkyl_fem_poisson_perp_release(struct gkyl_fem_poisson_perp *up) gkyl_free(up->rhs_avg); } + if (!(up->ishelmholtz)) + gkyl_array_release(up->kSq_null); + + if (!(up->use_gpu)) { + for (size_t i=0; ipar_range.volume; i++) + gkyl_mat_triples_release(up->tri[i]); + + gkyl_free(up->tri); + gkyl_superlu_prob_release(up->prob); + if (up->num_bias_line > 0) + gkyl_free(up->bias_lines); + } + #ifdef GKYL_HAVE_CUDA if (up->use_gpu) { gkyl_cu_free(up->kernels_cu); gkyl_cu_free(up->dx_cu); - if (up->isdomperiodic) gkyl_cu_free(up->rhs_avg_cu); + if (up->isdomperiodic) + gkyl_cu_free(up->rhs_avg_cu); + gkyl_cu_free(up->bcvals_cu); + gkyl_array_release(up->csr_val_idx); gkyl_culinsolver_prob_release(up->prob_cu); - } else { - gkyl_superlu_prob_release(up->prob); + if (up->num_bias_line > 0) + gkyl_cu_free(up->bias_lines); } -#else - gkyl_superlu_prob_release(up->prob); #endif gkyl_array_release(up->brhs); diff --git a/gyrokinetic/zero/fem_poisson_perp_cu.cu b/gyrokinetic/zero/fem_poisson_perp_cu.cu index 23908c36c5..8ca522353d 100644 --- a/gyrokinetic/zero/fem_poisson_perp_cu.cu +++ b/gyrokinetic/zero/fem_poisson_perp_cu.cu @@ -42,6 +42,19 @@ fem_poisson_perp_set_cu_ker_ptrs(struct gkyl_fem_poisson_perp_kernels* kers, enu { int ndim_perp = ndim-1; + switch (b_type) { + case GKYL_BASIS_MODAL_SERENDIPITY: + for (int k=0; klhsker[k] = ndim == 2? CK2x(ser_lhsstencil_list_2x, poly_order, k, bckey[0]) + : CK3x(ser_lhsstencil_list_3x, poly_order, k, bckey[0], bckey[1]); + break; +// case GKYL_BASIS_MODAL_TENSOR: +// break; + default: + assert(false); + break; + } + // Set RHS stencil kernels. const srcstencil_kern_bcx_list_2x *srcstencil_2x_kernels; const srcstencil_kern_bcx_list_3x *srcstencil_3x_kernels; @@ -77,6 +90,36 @@ fem_poisson_perp_set_cu_ker_ptrs(struct gkyl_fem_poisson_perp_kernels* kers, enu kers->solker = solstencil_kernels[ndim].kernels[poly_order]; } +__global__ static void +fem_poisson_perp_set_cu_biasker_ptrs(struct gkyl_fem_poisson_perp_kernels* kers, + int ndim, enum gkyl_basis_type b_type, int poly_order, const int *bckey) +{ + + // Set biasing kernels. + int ndim_perp = ndim-1; + const bias_src_kern_bcx_list_2x *bias_plane_2x_kernels; + const bias_src_kern_bcx_list_3x *bias_plane_3x_kernels; + + switch (b_type) { + case GKYL_BASIS_MODAL_SERENDIPITY: + bias_plane_2x_kernels = ser_bias_src_list_2x; + bias_plane_3x_kernels = ser_bias_src_list_3x; + break; + default: + assert(false); + break; + } + + for (int k=0; k<(int)(pow(2,ndim_perp)+0.5); k++) { + if (ndim == 2) { + kers->bias_src_ker[k] = CK2x(bias_plane_2x_kernels, poly_order, k, bckey[0]); + } else if ( ndim == 3) { + kers->bias_src_ker[k] = CK3x(bias_plane_3x_kernels, poly_order, k, bckey[0], bckey[1]); + } + } + +} + void fem_poisson_perp_choose_kernels_cu(const struct gkyl_basis* basis, const struct gkyl_poisson_bc *bcs, const bool *isdirperiodic, struct gkyl_fem_poisson_perp_kernels *kers) @@ -93,6 +136,9 @@ fem_poisson_perp_choose_kernels_cu(const struct gkyl_basis* basis, const struct fem_poisson_perp_set_cu_l2gker_ptrs<<<1,1>>>(kers, ndim, basis->b_type, poly_order, bckey_d); + // Biasing kernels (set this before redefining bckey_d below). + fem_poisson_perp_set_cu_biasker_ptrs<<<1,1>>>(kers, ndim, basis->b_type, poly_order, bckey_d); + for (int d=0; dlo_type[d]==GKYL_POISSON_PERIODIC && bcs->up_type[d]==GKYL_POISSON_PERIODIC ) { bckey[d] = 0; } else if (bcs->lo_type[d]==GKYL_POISSON_DIRICHLET && bcs->up_type[d]==GKYL_POISSON_DIRICHLET) { bckey[d] = 1; } @@ -157,6 +203,76 @@ gkyl_fem_poisson_perp_set_rhs_cu(gkyl_fem_poisson_perp *up, struct gkyl_array *r gkyl_fem_poisson_perp_set_rhs_kernel<<nblocks, rhsin->nthreads>>>(up->epsilon->on_dev, up->dx_cu, rhs_cu, rhsin->on_dev, *up->solve_range, up->par_range1d, up->bcvals_cu, up->kernels_cu, up->numnodes_global); + + // Set the corresponding entries to the biasing potential. + up->bias_line_src(up, rhsin); +} + +__global__ void +gkyl_fem_poisson_perp_bias_src_kernel(double *rhs_global, struct gkyl_rect_grid grid, + const struct gkyl_range range, struct gkyl_range par_range1d, + struct gkyl_fem_poisson_perp_kernels *kers, long numnodes_global, + int num_bias_line, struct gkyl_poisson_bias_line *bias_lines) +{ + const int bl_ndim_perp = 2; + + int idx[GKYL_MAX_CDIM]; int idx0[GKYL_MAX_CDIM]; int num_cells[GKYL_MAX_CDIM]; + long globalidx[32]; + + int ndim = range.ndim; + int ndim_perp = ndim-1; + + for (int d=0; dl2g[keri](num_cells, idx0, globalidx); + + // Modify the RHS source to enforce biasing of the solution. + int idx1d[] = {idx[ndim-1]}; + long paridx = gkyl_range_idx(&par_range1d, idx1d); + long parProbOff = paridx*numnodes_global; + + for (int i=0; iperp_dirs[d]; + double dx = grid.dx[perp_dir]; + bl_idx_m[d] = (bl->perp_coords[d]-1e-3*dx - grid.lower[perp_dir])/dx+1; + } + + if ( + ( idx[bl->perp_dirs[0]] == bl_idx_m[0] && idx[bl->perp_dirs[1]] == bl_idx_m[1] ) || + ( idx[bl->perp_dirs[0]] == bl_idx_m[0]+1 && idx[bl->perp_dirs[1]] == bl_idx_m[1] ) || + ( idx[bl->perp_dirs[0]] == bl_idx_m[0] && idx[bl->perp_dirs[1]] == bl_idx_m[1]+1 ) || + ( idx[bl->perp_dirs[0]] == bl_idx_m[0]+1 && idx[bl->perp_dirs[1]] == bl_idx_m[1]+1 ) + ) { + int edge[2] = { + -1+2*((bl_idx_m[0]+1)-idx[bl->perp_dirs[0]]), + -1+2*((bl_idx_m[1]+1)-idx[bl->perp_dirs[1]]), + }; + kers->bias_src_ker[keri](edge, bl->perp_dirs, bl->val, parProbOff, globalidx, rhs_global); + } + } + } +} + +void +gkyl_fem_poisson_perp_bias_src_enabled_cu(gkyl_fem_poisson_perp *up, struct gkyl_array *rhsin) +{ + double *rhs_cu = gkyl_culinsolver_get_rhs_ptr(up->prob_cu, 0); + gkyl_fem_poisson_perp_bias_src_kernel<<nblocks, rhsin->nthreads>>>(rhs_cu, up->grid, + *up->solve_range, up->par_range1d, up->kernels_cu, up->numnodes_global, up->num_bias_line, up->bias_lines); } __global__ void @@ -207,3 +323,69 @@ gkyl_fem_poisson_perp_solve_cu(struct gkyl_fem_poisson_perp *up, struct gkyl_arr gkyl_fem_poisson_perp_get_sol_kernel<<nblocks, phiout->nthreads>>>(phiout->on_dev, x_cu, *up->solve_range, up->par_range1d, up->kernels_cu, up->numnodes_global); } + +__global__ void +gkyl_fem_poisson_perp_update_lhs_kernel(bool is_helmholtz, const double *dx, const double *bcvals, + const struct gkyl_range range, struct gkyl_range par_range1d, + struct gkyl_fem_poisson_perp_kernels *kers, long numnodes_global, + struct gkyl_array *csr_val_idx, struct gkyl_array *epsilon, struct gkyl_array *kSq, double *csr_values) +{ + int idx[GKYL_MAX_CDIM]; int idx0[GKYL_MAX_CDIM]; int num_cells[GKYL_MAX_CDIM]; + long globalidx[32]; + + int ndim = range.ndim; + int ndim_perp = ndim-1; + + for (int d=0; dl2g[keri](num_cells, idx0, globalidx); + + int idx1d[] = {idx[ndim-1]}; + long paridx = gkyl_range_idx(&par_range1d, idx1d); + + // Apply the RHS source stencil. It's mostly the mass matrix times a + // modal-to-nodal operator times the source, modified by BCs in skin cells. + // Apply the -nabla . (epsilon*nabla_perp)-kSq stencil. + keri = idx_to_inloup_ker(ndim_perp, num_cells, idx); + + kers->lhsker[keri](epsilon_c, kSq_c, dx, bcvals, csr_val_idx_c, csr_values); + } +} + +void +gkyl_fem_poisson_perp_update_lhs_cu(gkyl_fem_poisson_perp *up, struct gkyl_array *epsilon, struct gkyl_array *kSq) +{ + gkyl_culinsolver_clear_csr_values(up->prob_cu, 0); + double *csr_val_cu = gkyl_culinsolver_get_csr_values_ptr(up->prob_cu, 0); + + struct gkyl_array *kSq_on_dev; + if (up->ishelmholtz) + kSq_on_dev = kSq->on_dev; + else + kSq_on_dev = up->kSq_null->on_dev; + + gkyl_fem_poisson_perp_update_lhs_kernel<<nblocks, epsilon->nthreads>>>(up->ishelmholtz, up->dx_cu, + up->bcvals_cu, *up->solve_range, up->par_range1d, up->kernels_cu, up->numnodes_global, + up->csr_val_idx->on_dev, epsilon->on_dev, kSq_on_dev, csr_val_cu); + + gkyl_culinsolver_amat_update(up->prob_cu, csr_val_cu); +} diff --git a/gyrokinetic/zero/gk_geometry.c b/gyrokinetic/zero/gk_geometry.c index d05f3c575c..0311cde1ad 100644 --- a/gyrokinetic/zero/gk_geometry.c +++ b/gyrokinetic/zero/gk_geometry.c @@ -449,6 +449,7 @@ gkyl_gk_geometry_deflate(const struct gk_geometry* up_3d, struct gkyl_gk_geometr gkyl_deflate_geo_advance(deflator, &up_3d->local, &up->local, up_3d->geo_corn.mc2p, up->geo_corn.mc2p, 3); gkyl_deflate_geo_advance(deflator, &up_3d->local, &up->local, up_3d->geo_corn.mc2nu_pos, up->geo_corn.mc2nu_pos, 3); gkyl_deflate_geo_advance(deflator, &up_3d->local, &up->local, up_3d->geo_corn.bmag, up->geo_corn.bmag, 1); + gkyl_deflate_geo_advance(deflator, &up_3d->local, &up->local, up_3d->geo_corn.bmag_inv, up->geo_corn.bmag_inv, 1); gkyl_deflate_geo_advance(deflator, &up_3d->local, &up->local, up_3d->geo_int.bmag, up->geo_int.bmag, 1); gkyl_deflate_geo_advance(deflator, &up_3d->local, &up->local, up_3d->geo_int.g_ij, up->geo_int.g_ij, 6); @@ -467,8 +468,6 @@ gkyl_gk_geometry_deflate(const struct gk_geometry* up_3d, struct gkyl_gk_geometr gkyl_deflate_geo_advance(deflator, &up_3d->local, &up->local, up_3d->geo_int.cmag, up->geo_int.cmag, 1); gkyl_deflate_geo_advance(deflator, &up_3d->local, &up->local, up_3d->geo_int.jacobtot, up->geo_int.jacobtot, 1); gkyl_deflate_geo_advance(deflator, &up_3d->local, &up->local, up_3d->geo_int.jacobtot_inv, up->geo_int.jacobtot_inv, 1); - gkyl_deflate_geo_advance(deflator, &up_3d->local, &up->local, up_3d->geo_int.bmag_inv, up->geo_int.bmag_inv, 1); - gkyl_deflate_geo_advance(deflator, &up_3d->local, &up->local, up_3d->geo_int.bmag_inv_sq, up->geo_int.bmag_inv_sq, 1); gkyl_deflate_geo_advance(deflator, &up_3d->local, &up->local, up_3d->geo_int.gxxj, up->geo_int.gxxj, 1); gkyl_deflate_geo_advance(deflator, &up_3d->local, &up->local, up_3d->geo_int.gxyj, up->geo_int.gxyj, 1); gkyl_deflate_geo_advance(deflator, &up_3d->local, &up->local, up_3d->geo_int.gyyj, up->geo_int.gyyj, 1); @@ -479,7 +478,9 @@ gkyl_gk_geometry_deflate(const struct gk_geometry* up_3d, struct gkyl_gk_geometr gkyl_deflate_geo_advance(deflator, &up_3d->local, &up->local, up_3d->geo_int.rtg33inv, up->geo_int.rtg33inv, 1); gkyl_deflate_geo_advance(deflator, &up_3d->local, &up->local, up_3d->geo_int.bioverJB, up->geo_int.bioverJB, 3); gkyl_deflate_geo_advance(deflator, &up_3d->local, &up->local, up_3d->geo_int.B3, up->geo_int.B3, 1); + gkyl_deflate_geo_advance(deflator, &up_3d->local, &up->local, up_3d->geo_int.qprofile, up->geo_int.qprofile, 1); // Done deflating modal + // Deflate nodal quantities gkyl_deflate_geo_advance_nodal(deflator, &up_3d->nrange_int, &up->nrange_int, up_3d->geo_int.jacobgeo_nodal, up->geo_int.jacobgeo_nodal, 1); gkyl_deflate_geo_advance_nodal(deflator, &up_3d->nrange_int, &up->nrange_int, up_3d->geo_int.dxdz_nodal, up->geo_int.dxdz_nodal, 9); @@ -498,12 +499,12 @@ gkyl_gk_geometry_deflate(const struct gk_geometry* up_3d, struct gkyl_gk_geometr // In 2D geometry, make mapc2p a function of only R and Z // and mc2nu_pos only a function of psi and length along field line struct gkyl_array *temp = gkyl_array_new(GKYL_DOUBLE, up->basis.num_basis, up->local_ext.volume); - gkyl_array_set_offset(up->geo_corn.mc2p_deflated, 1.0, up->geo_corn.mc2p, 0 * up->basis.num_basis); // - gkyl_array_set_offset(temp, 1.0, up->geo_corn.mc2p, 1 * up->basis.num_basis); - gkyl_array_set_offset(up->geo_corn.mc2p_deflated, 1.0, temp, 1 * up->basis.num_basis); - gkyl_array_set_offset(up->geo_corn.mc2nu_pos_deflated, 1.0, up->geo_corn.mc2nu_pos, 0 * up->basis.num_basis); - gkyl_array_set_offset(temp, 1.0, up->geo_corn.mc2nu_pos, 2 * up->basis.num_basis); - gkyl_array_set_offset(up->geo_corn.mc2nu_pos_deflated, 1.0, temp, 1 * up->basis.num_basis); + gkyl_array_set_offset(up->geo_corn.mc2p_deflated , 1.0, up->geo_corn.mc2p , 0*up->basis.num_basis); + gkyl_array_set_offset(temp , 1.0, up->geo_corn.mc2p , 1*up->basis.num_basis); + gkyl_array_set_offset(up->geo_corn.mc2p_deflated , 1.0, temp , 1*up->basis.num_basis); + gkyl_array_set_offset(up->geo_corn.mc2nu_pos_deflated, 1.0, up->geo_corn.mc2nu_pos, 0*up->basis.num_basis); + gkyl_array_set_offset(temp , 1.0, up->geo_corn.mc2nu_pos, 2*up->basis.num_basis); + gkyl_array_set_offset(up->geo_corn.mc2nu_pos_deflated, 1.0, temp , 1*up->basis.num_basis); gkyl_array_release(temp); } else if (up->grid.ndim==3) { @@ -512,7 +513,7 @@ gkyl_gk_geometry_deflate(const struct gk_geometry* up_3d, struct gkyl_gk_geometr gkyl_array_copy(up->geo_corn.mc2nu_pos_deflated, up->geo_corn.mc2nu_pos); } // Deflate surface geo - int count = 0; + int count = 0; for (int dir = 0; dir < 3; dir++) { if(rem_dirs[dir] == 0) { struct gkyl_range local_ext_in_dir_3d; @@ -610,6 +611,7 @@ gkyl_gk_geometry_free(const struct gkyl_ref_count *ref) gkyl_array_release(up->geo_corn.mc2p); gkyl_array_release(up->geo_corn.mc2nu_pos); gkyl_array_release(up->geo_corn.bmag); + gkyl_array_release(up->geo_corn.bmag_inv); gkyl_array_release(up->geo_corn.mc2p_deflated); gkyl_array_release(up->geo_corn.mc2nu_pos_deflated); @@ -631,8 +633,6 @@ gkyl_gk_geometry_free(const struct gkyl_ref_count *ref) gkyl_array_release(up->geo_int.cmag); gkyl_array_release(up->geo_int.jacobtot); gkyl_array_release(up->geo_int.jacobtot_inv); - gkyl_array_release(up->geo_int.bmag_inv); - gkyl_array_release(up->geo_int.bmag_inv_sq); gkyl_array_release(up->geo_int.gxxj); gkyl_array_release(up->geo_int.gxyj); gkyl_array_release(up->geo_int.gyyj); @@ -643,6 +643,7 @@ gkyl_gk_geometry_free(const struct gkyl_ref_count *ref) gkyl_array_release(up->geo_int.rtg33inv); gkyl_array_release(up->geo_int.bioverJB); gkyl_array_release(up->geo_int.B3); + gkyl_array_release(up->geo_int.qprofile); for (int dir = 0; dir < up->grid.ndim; dir++) { gkyl_array_release(up->geo_surf[dir].jacobgeo); diff --git a/gyrokinetic/zero/gk_geometry_cu.cu b/gyrokinetic/zero/gk_geometry_cu.cu index c4f2c6e9fc..f165123860 100644 --- a/gyrokinetic/zero/gk_geometry_cu.cu +++ b/gyrokinetic/zero/gk_geometry_cu.cu @@ -13,7 +13,7 @@ extern "C" { __global__ static void gk_geometry_set_corn_cu_kernel(struct gk_geometry *gk_geom, - struct gkyl_array *mc2p, struct gkyl_array *mc2nu_pos, struct gkyl_array *bmag, + struct gkyl_array *mc2p, struct gkyl_array *mc2nu_pos, struct gkyl_array *bmag, struct gkyl_array *bmag_inv, struct gkyl_array *mc2p_nodal, struct gkyl_array *mc2nu_pos_nodal, struct gkyl_array *bmag_nodal, struct gkyl_array *mc2p_deflated, struct gkyl_array *mc2nu_pos_deflated ) @@ -22,6 +22,7 @@ gk_geometry_set_corn_cu_kernel(struct gk_geometry *gk_geom, gk_geom->geo_corn.mc2p = mc2p; gk_geom->geo_corn.mc2nu_pos = mc2nu_pos; gk_geom->geo_corn.bmag = bmag; + gk_geom->geo_corn.bmag_inv = bmag_inv; // Nodal. gk_geom->geo_corn.mc2p_nodal = mc2p_nodal; gk_geom->geo_corn.mc2nu_pos_nodal = mc2nu_pos_nodal; @@ -37,7 +38,7 @@ gk_geometry_set_int_cu_kernel(struct gk_geometry *gk_geom, struct gkyl_array *dxdz, struct gkyl_array *dzdx, struct gkyl_array *dualmag, struct gkyl_array *normals, struct gkyl_array *jacobgeo, struct gkyl_array *jacobgeo_ghost, struct gkyl_array *jacobgeo_inv, struct gkyl_array *gij, struct gkyl_array *gij_neut, struct gkyl_array *b_i, struct gkyl_array *bcart, struct gkyl_array *cmag, - struct gkyl_array *jacobtot, struct gkyl_array *jacobtot_inv, struct gkyl_array *bmag_inv, struct gkyl_array *bmag_inv_sq, + struct gkyl_array *jacobtot, struct gkyl_array *jacobtot_inv, struct gkyl_array *gxxj, struct gkyl_array *gxyj, struct gkyl_array *gyyj, struct gkyl_array *gxzj, struct gkyl_array *eps2, struct gkyl_array *rtg33inv, struct gkyl_array *dualcurlbhatoverB, struct gkyl_array *bioverJB, struct gkyl_array *B3, struct gkyl_array *dualcurlbhat, struct gkyl_array *mc2p_nodal_fd, struct gkyl_array *mc2p_nodal, @@ -47,7 +48,7 @@ gk_geometry_set_int_cu_kernel(struct gk_geometry *gk_geom, struct gkyl_array *dualmag_nodal, struct gkyl_array *normals_nodal, struct gkyl_array *gij_neut_nodal, struct gkyl_array *b_i_nodal, struct gkyl_array *b_i_nodal_fd, struct gkyl_array *bcart_nodal, struct gkyl_array *B3_nodal, struct gkyl_array *dualcurlbhatoverB_nodal, struct gkyl_array *rtg33inv_nodal, - struct gkyl_array *bioverJB_nodal + struct gkyl_array *bioverJB_nodal, struct gkyl_array *qprofile ) { // Expansions. @@ -69,8 +70,6 @@ gk_geometry_set_int_cu_kernel(struct gk_geometry *gk_geom, gk_geom->geo_int.cmag = cmag; gk_geom->geo_int.jacobtot = jacobtot; gk_geom->geo_int.jacobtot_inv = jacobtot_inv; - gk_geom->geo_int.bmag_inv = bmag_inv; - gk_geom->geo_int.bmag_inv_sq = bmag_inv_sq; gk_geom->geo_int.gxxj = gxxj; gk_geom->geo_int.gxyj = gxyj; gk_geom->geo_int.gyyj = gyyj; @@ -81,6 +80,7 @@ gk_geometry_set_int_cu_kernel(struct gk_geometry *gk_geom, gk_geom->geo_int.dualcurlbhat = dualcurlbhat; gk_geom->geo_int.bioverJB = bioverJB; gk_geom->geo_int.B3 = B3; + gk_geom->geo_int.qprofile = qprofile; // Nodal. gk_geom->geo_int.mc2p_nodal_fd = mc2p_nodal_fd; gk_geom->geo_int.mc2p_nodal = mc2p_nodal; @@ -159,7 +159,7 @@ void gkyl_geometry_set_corn_cu(struct gk_geometry *gk_geom, struct gk_geom_corn *geo_corn) { gk_geometry_set_corn_cu_kernel<<<1,1>>>(gk_geom, - geo_corn->mc2p->on_dev, geo_corn->mc2nu_pos->on_dev, geo_corn->bmag->on_dev, + geo_corn->mc2p->on_dev, geo_corn->mc2nu_pos->on_dev, geo_corn->bmag->on_dev, geo_corn->bmag_inv->on_dev, geo_corn->mc2p_nodal->on_dev, geo_corn->mc2nu_pos_nodal->on_dev, geo_corn->bmag_nodal->on_dev, geo_corn->mc2p_deflated->on_dev, geo_corn->mc2nu_pos_deflated->on_dev); } @@ -173,7 +173,7 @@ gkyl_geometry_set_int_cu(struct gk_geometry *gk_geom, struct gk_geom_int *geo_in geo_int->dxdz->on_dev, geo_int->dzdx->on_dev, geo_int->dualmag->on_dev, geo_int->normals->on_dev, geo_int->jacobgeo->on_dev, geo_int->jacobgeo_ghost->on_dev, geo_int->jacobgeo_inv->on_dev, geo_int->gij->on_dev, geo_int->gij_neut->on_dev, geo_int->b_i->on_dev, geo_int->bcart->on_dev, geo_int->cmag->on_dev, - geo_int->jacobtot->on_dev, geo_int->jacobtot_inv->on_dev, geo_int->bmag_inv->on_dev, geo_int->bmag_inv_sq->on_dev, + geo_int->jacobtot->on_dev, geo_int->jacobtot_inv->on_dev, geo_int->gxxj->on_dev, geo_int->gxyj->on_dev, geo_int->gyyj->on_dev, geo_int->gxzj->on_dev, geo_int->eps2->on_dev, geo_int->rtg33inv->on_dev, geo_int->dualcurlbhatoverB->on_dev, geo_int->bioverJB->on_dev, geo_int->B3->on_dev, geo_int->dualcurlbhat->on_dev, @@ -183,7 +183,8 @@ gkyl_geometry_set_int_cu(struct gk_geometry *gk_geom, struct gk_geom_int *geo_in geo_int->dxdz_nodal->on_dev, geo_int->dzdx_nodal->on_dev, geo_int->dualmag_nodal->on_dev, geo_int->normals_nodal->on_dev, geo_int->gij_neut_nodal->on_dev, geo_int->b_i_nodal->on_dev, geo_int->b_i_nodal_fd->on_dev, geo_int->bcart_nodal->on_dev, geo_int->B3_nodal->on_dev, - geo_int->dualcurlbhatoverB_nodal->on_dev, geo_int->rtg33inv_nodal->on_dev, geo_int->bioverJB_nodal->on_dev); + geo_int->dualcurlbhatoverB_nodal->on_dev, geo_int->rtg33inv_nodal->on_dev, geo_int->bioverJB_nodal->on_dev, + geo_int->qprofile->on_dev); } // Host-side wrapper for set_surf_cu_kernel @@ -209,22 +210,24 @@ gk_geometry_corn_cu_dev_alloc(struct gk_geom_corn up_corn_host) struct gk_geom_corn *up_corn_dev = (struct gk_geom_corn*) gkyl_malloc(sizeof(struct gk_geom_corn)); // Expansions. up_corn_dev->mc2p = gkyl_array_cu_dev_new(up_corn_host.mc2p->type, - up_corn_host.mc2p->ncomp, up_corn_host.mc2p->size); + up_corn_host.mc2p->ncomp, up_corn_host.mc2p->size); up_corn_dev->mc2nu_pos = gkyl_array_cu_dev_new(up_corn_host.mc2nu_pos->type, - up_corn_host.mc2nu_pos->ncomp, up_corn_host.mc2nu_pos->size); + up_corn_host.mc2nu_pos->ncomp, up_corn_host.mc2nu_pos->size); up_corn_dev->bmag = gkyl_array_cu_dev_new(up_corn_host.bmag->type, - up_corn_host.bmag->ncomp, up_corn_host.bmag->size); + up_corn_host.bmag->ncomp, up_corn_host.bmag->size); + up_corn_dev->bmag_inv = gkyl_array_cu_dev_new(up_corn_host.bmag_inv->type, + up_corn_host.bmag_inv->ncomp, up_corn_host.bmag_inv->size); up_corn_dev->mc2p_deflated = gkyl_array_cu_dev_new(up_corn_host.mc2p_deflated->type, - up_corn_host.mc2p_deflated->ncomp, up_corn_host.mc2p_deflated->size); + up_corn_host.mc2p_deflated->ncomp, up_corn_host.mc2p_deflated->size); up_corn_dev->mc2nu_pos_deflated = gkyl_array_cu_dev_new(up_corn_host.mc2nu_pos_deflated->type, - up_corn_host.mc2nu_pos_deflated->ncomp, up_corn_host.mc2nu_pos_deflated->size); + up_corn_host.mc2nu_pos_deflated->ncomp, up_corn_host.mc2nu_pos_deflated->size); // Nodal. up_corn_dev->mc2p_nodal = gkyl_array_cu_dev_new(up_corn_host.mc2p_nodal->type, - up_corn_host.mc2p_nodal->ncomp, up_corn_host.mc2p_nodal->size); + up_corn_host.mc2p_nodal->ncomp, up_corn_host.mc2p_nodal->size); up_corn_dev->mc2nu_pos_nodal = gkyl_array_cu_dev_new(up_corn_host.mc2nu_pos_nodal->type, - up_corn_host.mc2nu_pos_nodal->ncomp, up_corn_host.mc2nu_pos_nodal->size); + up_corn_host.mc2nu_pos_nodal->ncomp, up_corn_host.mc2nu_pos_nodal->size); up_corn_dev->bmag_nodal = gkyl_array_cu_dev_new(up_corn_host.bmag_nodal->type, - up_corn_host.bmag_nodal->ncomp, up_corn_host.bmag_nodal->size); + up_corn_host.bmag_nodal->ncomp, up_corn_host.bmag_nodal->size); return up_corn_dev; } @@ -269,10 +272,6 @@ gk_geometry_int_cu_dev_alloc(struct gk_geom_int up_int_host) up_int_host.jacobtot->ncomp, up_int_host.jacobtot->size); up_int_dev->jacobtot_inv = gkyl_array_cu_dev_new(up_int_host.jacobtot_inv->type, up_int_host.jacobtot_inv->ncomp, up_int_host.jacobtot_inv->size); - up_int_dev->bmag_inv = gkyl_array_cu_dev_new(up_int_host.bmag_inv->type, - up_int_host.bmag_inv->ncomp, up_int_host.bmag_inv->size); - up_int_dev->bmag_inv_sq = gkyl_array_cu_dev_new(up_int_host.bmag_inv_sq->type, - up_int_host.bmag_inv_sq->ncomp, up_int_host.bmag_inv_sq->size); up_int_dev->gxxj = gkyl_array_cu_dev_new(up_int_host.gxxj->type, up_int_host.gxxj->ncomp, up_int_host.gxxj->size); up_int_dev->gxyj = gkyl_array_cu_dev_new(up_int_host.gxyj->type, @@ -293,6 +292,8 @@ gk_geometry_int_cu_dev_alloc(struct gk_geom_int up_int_host) up_int_host.B3->ncomp, up_int_host.B3->size); up_int_dev->dualcurlbhat = gkyl_array_cu_dev_new(up_int_host.dualcurlbhat->type, up_int_host.dualcurlbhat->ncomp, up_int_host.dualcurlbhat->size); + up_int_dev->qprofile = gkyl_array_cu_dev_new(up_int_host.qprofile->type, + up_int_host.qprofile->ncomp, up_int_host.qprofile->size); // Nodal. up_int_dev->mc2p_nodal_fd = gkyl_array_cu_dev_new(up_int_host.mc2p_nodal_fd->type, up_int_host.mc2p_nodal_fd->ncomp, up_int_host.mc2p_nodal_fd->size); @@ -464,6 +465,7 @@ gkyl_gk_geometry_cu_dev_new(struct gk_geometry* geo_host, struct gkyl_gk_geometr gkyl_array_copy(geo_corn_dev->mc2nu_pos, geo_host->geo_corn.mc2nu_pos); gkyl_array_copy(geo_corn_dev->mc2nu_pos_deflated, geo_host->geo_corn.mc2nu_pos_deflated); gkyl_array_copy(geo_corn_dev->bmag, geo_host->geo_corn.bmag); + gkyl_array_copy(geo_corn_dev->bmag_inv, geo_host->geo_corn.bmag_inv); // Nodal. gkyl_array_copy(geo_corn_dev->mc2p_nodal, geo_host->geo_corn.mc2p_nodal); gkyl_array_copy(geo_corn_dev->mc2nu_pos_nodal, geo_host->geo_corn.mc2nu_pos_nodal); @@ -488,8 +490,6 @@ gkyl_gk_geometry_cu_dev_new(struct gk_geometry* geo_host, struct gkyl_gk_geometr gkyl_array_copy(geo_int_dev->cmag, geo_host->geo_int.cmag); gkyl_array_copy(geo_int_dev->jacobtot, geo_host->geo_int.jacobtot); gkyl_array_copy(geo_int_dev->jacobtot_inv, geo_host->geo_int.jacobtot_inv); - gkyl_array_copy(geo_int_dev->bmag_inv, geo_host->geo_int.bmag_inv); - gkyl_array_copy(geo_int_dev->bmag_inv_sq, geo_host->geo_int.bmag_inv_sq); gkyl_array_copy(geo_int_dev->gxxj, geo_host->geo_int.gxxj); gkyl_array_copy(geo_int_dev->gxyj, geo_host->geo_int.gxyj); gkyl_array_copy(geo_int_dev->gyyj, geo_host->geo_int.gyyj); @@ -500,6 +500,7 @@ gkyl_gk_geometry_cu_dev_new(struct gk_geometry* geo_host, struct gkyl_gk_geometr gkyl_array_copy(geo_int_dev->bioverJB, geo_host->geo_int.bioverJB); gkyl_array_copy(geo_int_dev->B3, geo_host->geo_int.B3); gkyl_array_copy(geo_int_dev->dualcurlbhat, geo_host->geo_int.dualcurlbhat); + gkyl_array_copy(geo_int_dev->qprofile, geo_host->geo_int.qprofile); // Nodal. gkyl_array_copy(geo_int_dev->mc2p_nodal_fd, geo_host->geo_int.mc2p_nodal_fd); gkyl_array_copy(geo_int_dev->mc2p_nodal, geo_host->geo_int.mc2p_nodal); @@ -578,6 +579,7 @@ gkyl_gk_geometry_cu_dev_new(struct gk_geometry* geo_host, struct gkyl_gk_geometr up->geo_corn.mc2p = geo_corn_dev->mc2p; up->geo_corn.mc2nu_pos = geo_corn_dev->mc2nu_pos; up->geo_corn.bmag = geo_corn_dev->bmag; + up->geo_corn.bmag_inv = geo_corn_dev->bmag_inv; up->geo_corn.mc2p_deflated = geo_corn_dev->mc2p_deflated; up->geo_corn.mc2nu_pos_deflated = geo_corn_dev->mc2nu_pos_deflated; // Nodal. @@ -605,8 +607,6 @@ gkyl_gk_geometry_cu_dev_new(struct gk_geometry* geo_host, struct gkyl_gk_geometr up->geo_int.cmag = geo_int_dev->cmag; up->geo_int.jacobtot = geo_int_dev->jacobtot; up->geo_int.jacobtot_inv = geo_int_dev->jacobtot_inv; - up->geo_int.bmag_inv = geo_int_dev->bmag_inv; - up->geo_int.bmag_inv_sq = geo_int_dev->bmag_inv_sq; up->geo_int.gxxj = geo_int_dev->gxxj; up->geo_int.gxyj = geo_int_dev->gxyj; up->geo_int.gyyj = geo_int_dev->gyyj; @@ -617,6 +617,7 @@ gkyl_gk_geometry_cu_dev_new(struct gk_geometry* geo_host, struct gkyl_gk_geometr up->geo_int.bioverJB = geo_int_dev->bioverJB; up->geo_int.B3 = geo_int_dev->B3; up->geo_int.dualcurlbhat = geo_int_dev->dualcurlbhat; + up->geo_int.qprofile = geo_int_dev->qprofile; // Nodal. up->geo_int.mc2p_nodal_fd = geo_int_dev->mc2p_nodal_fd; up->geo_int.mc2p_nodal = geo_int_dev->mc2p_nodal; diff --git a/gyrokinetic/zero/gk_geometry_mapc2p.c b/gyrokinetic/zero/gk_geometry_mapc2p.c index efcb34a86d..829c802d0c 100644 --- a/gyrokinetic/zero/gk_geometry_mapc2p.c +++ b/gyrokinetic/zero/gk_geometry_mapc2p.c @@ -14,6 +14,7 @@ #include #include #include +#include #include static @@ -76,6 +77,10 @@ void gk_geometry_mapc2p_advance(struct gk_geometry* up, struct gkyl_range *nrang gkyl_nodal_ops_n2m(n2m, &up->basis, &up->grid, nrange, &up->local, 3, up->geo_corn.mc2nu_pos_nodal, up->geo_corn.mc2nu_pos, false); gkyl_nodal_ops_n2m(n2m, &up->basis, &up->grid, nrange, &up->local, 1, up->geo_corn.bmag_nodal, up->geo_corn.bmag, false); gkyl_nodal_ops_release(n2m); + + // Need 1/B for LBO collisions, computed weakly. + gkyl_dg_inv_op_range(up->basis, 0, up->geo_corn.bmag_inv, 0, up->geo_corn.bmag, &up->local); + } static @@ -184,16 +189,16 @@ void gk_geometry_mapc2p_advance_interior(struct gk_geometry* up, struct gkyl_ran gkyl_nodal_ops_n2m(n2m, &up->basis, &up->grid, nrange, &up->local, 1, up->geo_int.bmag_nodal, up->geo_int.bmag, true); gkyl_nodal_ops_release(n2m); - // now calculate the metrics + // Now calculate the metrics. struct gkyl_calc_metric* mcalc = gkyl_calc_metric_new(&up->basis, &up->grid, &up->global, &up->global_ext, &up->local, &up->local_ext, false); gkyl_calc_metric_advance_interior(mcalc, up); gkyl_array_copy(up->geo_int.g_ij_neut, up->geo_int.g_ij); - // calculate the derived geometric quantities + // Calculate the derived geometric quantities. struct gkyl_calc_derived_geo *jcalculator = gkyl_calc_derived_geo_new(&up->basis, &up->grid, 1, false); gkyl_calc_derived_geo_advance(jcalculator, &up->local, up->geo_int.g_ij, up->geo_int.bmag, up->geo_int.jacobgeo, up->geo_int.jacobgeo_inv, up->geo_int.gij, up->geo_int.b_i, up->geo_int.cmag, up->geo_int.jacobtot, up->geo_int.jacobtot_inv, - up->geo_int.bmag_inv, up->geo_int.bmag_inv_sq, up->geo_int.gxxj, up->geo_int.gxyj, up->geo_int.gyyj, up->geo_int.gxzj, up->geo_int.eps2); + up->geo_int.gxxj, up->geo_int.gxyj, up->geo_int.gyyj, up->geo_int.gxzj, up->geo_int.eps2); gkyl_array_copy(up->geo_int.gij_neut, up->geo_int.gij); gkyl_calc_derived_geo_release(jcalculator); gkyl_calc_metric_advance_bcart(mcalc, nrange, up->geo_int.b_i, up->geo_int.dzdx, up->geo_int.bcart, &up->local); diff --git a/gyrokinetic/zero/gk_geometry_mirror.c b/gyrokinetic/zero/gk_geometry_mirror.c index 7113797f28..91df30ae83 100644 --- a/gyrokinetic/zero/gk_geometry_mirror.c +++ b/gyrokinetic/zero/gk_geometry_mirror.c @@ -51,7 +51,7 @@ gk_geometry_mirror_init(struct gkyl_gk_geometry_inp *geometry_inp) gkyl_position_map_optimize(geometry_inp->position_map, up->grid, up->global); - // create mirror geometry for corners + // Create mirror geometry for corners. struct gkyl_mirror_grid_gen *mirror_grid_corn = gkyl_mirror_grid_gen_inew(&(struct gkyl_mirror_grid_gen_inp) { .comp_grid = &up->grid, @@ -64,8 +64,8 @@ gk_geometry_mirror_init(struct gkyl_gk_geometry_inp *geometry_inp) .Z = { psi_grid.lower[1], psi_grid.upper[1] }, // psi(R,Z) grid size - .nrcells = psi_grid.cells[0]-1, // cells and not nodes - .nzcells = psi_grid.cells[1]-1, // cells and not nodes + .nrcells = psi_grid.cells[0]-1, // Cells and not nodes. + .nzcells = psi_grid.cells[1]-1, // Cells and not nodes. .psiRZ = psi, .fl_coord = geometry_inp->mirror_grid_info.fl_coord, @@ -74,7 +74,7 @@ gk_geometry_mirror_init(struct gkyl_gk_geometry_inp *geometry_inp) } ); - // create mirror geometry for interior + // Create mirror geometry for interior. struct gkyl_mirror_grid_gen *mirror_grid_int = gkyl_mirror_grid_gen_int_inew(&(struct gkyl_mirror_grid_gen_inp) { .comp_grid = &up->grid, @@ -86,9 +86,9 @@ gk_geometry_mirror_init(struct gkyl_gk_geometry_inp *geometry_inp) .R = { psi_grid.lower[0], psi_grid.upper[0] }, .Z = { psi_grid.lower[1], psi_grid.upper[1] }, - // psi(R,Z) grid size - .nrcells = psi_grid.cells[0]-1, // cells and not nodes - .nzcells = psi_grid.cells[1]-1, // cells and not nodes + // psi(R,Z) grid size. + .nrcells = psi_grid.cells[0]-1, // Cells and not nodes. + .nzcells = psi_grid.cells[1]-1, // Cells and not nodes. .psiRZ = psi, .fl_coord = geometry_inp->mirror_grid_info.fl_coord, @@ -112,9 +112,9 @@ gk_geometry_mirror_init(struct gkyl_gk_geometry_inp *geometry_inp) .R = { psi_grid.lower[0], psi_grid.upper[0] }, .Z = { psi_grid.lower[1], psi_grid.upper[1] }, - // psi(R,Z) grid size - .nrcells = psi_grid.cells[0]-1, // cells and not nodes - .nzcells = psi_grid.cells[1]-1, // cells and not nodes + // psi(R,Z) grid size. + .nrcells = psi_grid.cells[0]-1, // Cells and not nodes. + .nzcells = psi_grid.cells[1]-1, // Cells and not nodes. .psiRZ = psi, .fl_coord = geometry_inp->mirror_grid_info.fl_coord, @@ -124,24 +124,23 @@ gk_geometry_mirror_init(struct gkyl_gk_geometry_inp *geometry_inp) ); } - // Now calculate the derived geometric coefficients at necessary nodes and compute modal expansions where required - // Now calculate the metrics at corner and interior nodes + // Now calculate the derived geometric coefficients at necessary nodes and compute modal expansions where required. + // Now calculate the metrics at corner and interior nodes. struct gkyl_calc_metric_mirror* mcalc = gkyl_calc_metric_mirror_new(&up->basis, &up->grid, &up->local, &up->local_ext, false); gkyl_calc_metric_mirror_advance(mcalc, up, mirror_grid_corn); gkyl_calc_metric_mirror_advance_interior(mcalc, up, mirror_grid_int); - // calculate the derived geometric quantities at interior nodes + // Calculate the derived geometric quantities at interior nodes. gkyl_rz_calc_derived_geo *jcalculator = gkyl_rz_calc_derived_geo_new(&up->basis, &up->grid, 1, false); gkyl_rz_calc_derived_geo_advance(jcalculator, &up->local, up->geo_int.g_ij, up->geo_int.bmag, - up->geo_int.jacobgeo, up->geo_int.jacobgeo_inv, up->geo_int.gij, up->geo_int.b_i, up->geo_int.cmag, - up->geo_int.jacobtot, up->geo_int.jacobtot_inv, up->geo_int.bmag_inv, up->geo_int.bmag_inv_sq, - up->geo_int.gxxj, up->geo_int.gxyj, up->geo_int.gyyj, up->geo_int.gxzj, up->geo_int.eps2); + up->geo_int.jacobgeo, up->geo_int.jacobgeo_inv, up->geo_int.gij, up->geo_int.b_i, up->geo_int.cmag, up->geo_int.jacobtot, + up->geo_int.jacobtot_inv, up->geo_int.gxxj, up->geo_int.gxyj, up->geo_int.gyyj, up->geo_int.gxzj, up->geo_int.eps2); gkyl_rz_calc_derived_geo_release(jcalculator); - // Calculate metrics/derived geo quantities at surface + // Calculate metrics/derived geo quantities at surface. for (int dir = 0; dir grid.ndim; dir++) { gkyl_calc_metric_mirror_advance_surface(mcalc, dir, up, mirror_grid_surf[dir]); } gkyl_calc_metric_mirror_release(mcalc); - // Calculate surface expansions + // Calculate surface expansions. for (int dir = 0; dir grid.ndim; dir++) gk_geometry_surf_calc_expansions(up, dir, up->nrange_surf[dir]); @@ -156,7 +155,7 @@ gk_geometry_mirror_init(struct gkyl_gk_geometry_inp *geometry_inp) up->flags = 0; GKYL_CLEAR_CU_ALLOC(up->flags); up->ref_count = gkyl_ref_count_init(gkyl_gk_geometry_free); - up->on_dev = up; // CPU eqn obj points to itself + up->on_dev = up; // CPU eqn obj points to itself. gkyl_mirror_grid_gen_release(mirror_grid_corn); gkyl_mirror_grid_gen_release(mirror_grid_int); diff --git a/gyrokinetic/zero/gk_geometry_tok.c b/gyrokinetic/zero/gk_geometry_tok.c index f6ace4169c..69d61d7813 100644 --- a/gyrokinetic/zero/gk_geometry_tok.c +++ b/gyrokinetic/zero/gk_geometry_tok.c @@ -78,34 +78,34 @@ gk_geometry_tok_init(struct gkyl_gk_geometry_inp *geometry_inp) gkyl_position_map_optimize(geometry_inp->position_map, up->grid, up->global); - // calculate bmag and mapc2p in cylindrical coords at corner nodes for - // getting cell coordinates (used only for plotting) + // Calculate bmag and mapc2p in cylindrical coords at corner nodes for + // getting cell coordinates (used only for plotting). gkyl_tok_geo_calc(up, &up->nrange_corn, geo, &ginp, geometry_inp->position_map); - // calculate bmag and mapc2p in cylindrical coords at interior nodes for - // calculating geo quantity volume expansions + // Calculate bmag and mapc2p in cylindrical coords at interior nodes for + // calculating geo quantity volume expansions. gkyl_tok_geo_calc_interior(up, &up->nrange_int, up->dzc, geo, &ginp, geometry_inp->position_map); - // calculate bmag and mapc2p in cylindrical coords at surfaces + // Calculate bmag and mapc2p in cylindrical coords at surfaces. for (int dir = 0; dir grid.ndim; dir++) gkyl_tok_geo_calc_surface(up, dir, &up->nrange_surf[dir], up->dzc, geo, &ginp, geometry_inp->position_map); - // Now calculate the metrics at interior nodes + // Now calculate the metrics at interior nodes. struct gkyl_calc_metric* mcalc = gkyl_calc_metric_new(&up->basis, &up->grid, &up->global, &up->global_ext, &up->local, &up->local_ext, false); gkyl_calc_metric_advance_rz_interior(mcalc, up); gkyl_array_copy(up->geo_int.jacobgeo_ghost, up->geo_int.jacobgeo); - // Calculate neutral metrics at interior nodes + // Calculate neutral metrics at interior nodes. gkyl_calc_metric_advance_rz_neut_interior(mcalc, up); - // calculate the derived geometric quantities at interior nodes + // Calculate the derived geometric quantities at interior nodes. gkyl_rz_calc_derived_geo *jcalculator = gkyl_rz_calc_derived_geo_new(&up->basis, &up->grid, 1, false); gkyl_rz_calc_derived_geo_advance(jcalculator, &up->local, up->geo_int.g_ij, up->geo_int.bmag, - up->geo_int.jacobgeo, up->geo_int.jacobgeo_inv, up->geo_int.gij, up->geo_int.b_i, up->geo_int.cmag, up->geo_int.jacobtot, up->geo_int.jacobtot_inv, - up->geo_int.bmag_inv, up->geo_int.bmag_inv_sq, up->geo_int.gxxj, up->geo_int.gxyj, up->geo_int.gyyj, up->geo_int.gxzj, up->geo_int.eps2); + up->geo_int.jacobgeo, up->geo_int.jacobgeo_inv, up->geo_int.gij, up->geo_int.b_i, up->geo_int.cmag, up->geo_int.jacobtot, + up->geo_int.jacobtot_inv, up->geo_int.gxxj, up->geo_int.gxyj, up->geo_int.gyyj, up->geo_int.gxzj, up->geo_int.eps2); gkyl_rz_calc_derived_geo_release(jcalculator); - // Calculate metrics/derived geo quantities at surface + // Calculate metrics/derived geo quantities at surface. for (int dir = 0; dir grid.ndim; dir++) { gkyl_calc_metric_advance_rz_surface(mcalc, dir, up); } gkyl_calc_metric_release(mcalc); - // Calculate surface expansions + // Calculate surface expansions. for (int dir = 0; dir grid.ndim; dir++) gk_geometry_surf_calc_expansions(up, dir, up->nrange_surf[dir]); @@ -121,7 +121,7 @@ gk_geometry_tok_init(struct gkyl_gk_geometry_inp *geometry_inp) up->flags = 0; GKYL_CLEAR_CU_ALLOC(up->flags); up->ref_count = gkyl_ref_count_init(gkyl_gk_geometry_free); - up->on_dev = up; // CPU eqn obj points to itself + up->on_dev = up; // CPU eqn obj points to itself. gkyl_tok_geo_release(geo); diff --git a/gyrokinetic/zero/gkyl_bc_basic_gyrokinetic_priv.h b/gyrokinetic/zero/gkyl_bc_basic_gyrokinetic_priv.h index 39106e987a..9aa5be9834 100644 --- a/gyrokinetic/zero/gkyl_bc_basic_gyrokinetic_priv.h +++ b/gyrokinetic/zero/gkyl_bc_basic_gyrokinetic_priv.h @@ -94,34 +94,34 @@ conf_boundary_value_bc(size_t nc, double *out, const double *inp, void *ctx) if (cdim == 1) { if (edge == GKYL_LOWER_EDGE) { - out[0] = inp[0]-sqrt(3.0)*inp[1]; + out[0] = inp[0]-1.7320508075688772*inp[1]; } else { - out[0] = inp[0]+sqrt(3.0)*inp[1]; + out[0] = inp[0]+1.7320508075688772*inp[1]; } out[1] = 0.0; } else if (cdim == 2) { if (dir == 0) { if (edge == GKYL_LOWER_EDGE) { - out[0] = inp[0]-sqrt(3.0)*inp[1]; - out[2] = inp[2]-sqrt(3.0)*inp[3]; + out[0] = inp[0]-1.7320508075688772*inp[1]; + out[2] = inp[2]-1.7320508075688772*inp[3]; } else { - out[0] = inp[0]+sqrt(3.0)*inp[1]; - out[2] = inp[2]+sqrt(3.0)*inp[3]; + out[0] = inp[0]+1.7320508075688772*inp[1]; + out[2] = inp[2]+1.7320508075688772*inp[3]; } out[1] = 0.0; out[3] = 0.0; } else if (dir == 1) { if (edge == GKYL_LOWER_EDGE) { - out[0] = inp[0]-sqrt(3.0)*inp[2]; - out[1] = inp[1]-sqrt(3.0)*inp[3]; + out[0] = inp[0]-1.7320508075688772*inp[2]; + out[1] = inp[1]-1.7320508075688772*inp[3]; } else { - out[0] = inp[0]+sqrt(3.0)*inp[2]; - out[1] = inp[1]+sqrt(3.0)*inp[3]; + out[0] = inp[0]+1.7320508075688772*inp[2]; + out[1] = inp[1]+1.7320508075688772*inp[3]; } out[2] = 0.0; out[3] = 0.0; @@ -130,16 +130,16 @@ conf_boundary_value_bc(size_t nc, double *out, const double *inp, void *ctx) else if (cdim == 3) { if (dir == 0) { if (edge == GKYL_LOWER_EDGE) { - out[0] = inp[0]-sqrt(3.0)*inp[1]; - out[2] = inp[2]-sqrt(3.0)*inp[4]; - out[3] = inp[3]-sqrt(3.0)*inp[5]; - out[6] = inp[6]-sqrt(3.0)*inp[7]; + out[0] = inp[0]-1.7320508075688772*inp[1]; + out[2] = inp[2]-1.7320508075688772*inp[4]; + out[3] = inp[3]-1.7320508075688772*inp[5]; + out[6] = inp[6]-1.7320508075688772*inp[7]; } else { - out[0] = inp[0]+sqrt(3.0)*inp[1]; - out[2] = inp[2]+sqrt(3.0)*inp[4]; - out[3] = inp[3]+sqrt(3.0)*inp[5]; - out[6] = inp[6]+sqrt(3.0)*inp[7]; + out[0] = inp[0]+1.7320508075688772*inp[1]; + out[2] = inp[2]+1.7320508075688772*inp[4]; + out[3] = inp[3]+1.7320508075688772*inp[5]; + out[6] = inp[6]+1.7320508075688772*inp[7]; } out[1] = 0.0; out[4] = 0.0; @@ -148,16 +148,16 @@ conf_boundary_value_bc(size_t nc, double *out, const double *inp, void *ctx) } else if (dir == 1) { if (edge == GKYL_LOWER_EDGE) { - out[0] = inp[0]-sqrt(3.0)*inp[2]; - out[1] = inp[1]-sqrt(3.0)*inp[4]; - out[3] = inp[3]-sqrt(3.0)*inp[6]; - out[5] = inp[5]-sqrt(3.0)*inp[7]; + out[0] = inp[0]-1.7320508075688772*inp[2]; + out[1] = inp[1]-1.7320508075688772*inp[4]; + out[3] = inp[3]-1.7320508075688772*inp[6]; + out[5] = inp[5]-1.7320508075688772*inp[7]; } else { - out[0] = inp[0]+sqrt(3.0)*inp[2]; - out[1] = inp[1]+sqrt(3.0)*inp[4]; - out[3] = inp[3]+sqrt(3.0)*inp[6]; - out[5] = inp[5]+sqrt(3.0)*inp[7]; + out[0] = inp[0]+1.7320508075688772*inp[2]; + out[1] = inp[1]+1.7320508075688772*inp[4]; + out[3] = inp[3]+1.7320508075688772*inp[6]; + out[5] = inp[5]+1.7320508075688772*inp[7]; } out[2] = 0.0; out[4] = 0.0; @@ -166,16 +166,16 @@ conf_boundary_value_bc(size_t nc, double *out, const double *inp, void *ctx) } else if (dir == 2) { if (edge == GKYL_LOWER_EDGE) { - out[0] = inp[0]-sqrt(3.0)*inp[3]; - out[1] = inp[1]-sqrt(3.0)*inp[5]; - out[2] = inp[2]-sqrt(3.0)*inp[6]; - out[4] = inp[4]-sqrt(3.0)*inp[7]; + out[0] = inp[0]-1.7320508075688772*inp[3]; + out[1] = inp[1]-1.7320508075688772*inp[5]; + out[2] = inp[2]-1.7320508075688772*inp[6]; + out[4] = inp[4]-1.7320508075688772*inp[7]; } else { - out[0] = inp[0]+sqrt(3.0)*inp[3]; - out[1] = inp[1]+sqrt(3.0)*inp[5]; - out[2] = inp[2]+sqrt(3.0)*inp[6]; - out[4] = inp[4]+sqrt(3.0)*inp[7]; + out[0] = inp[0]+1.7320508075688772*inp[3]; + out[1] = inp[1]+1.7320508075688772*inp[5]; + out[2] = inp[2]+1.7320508075688772*inp[6]; + out[4] = inp[4]+1.7320508075688772*inp[7]; } out[3] = 0.0; out[5] = 0.0; diff --git a/gyrokinetic/zero/gkyl_calc_derived_geo.h b/gyrokinetic/zero/gkyl_calc_derived_geo.h index d6da871394..3a0286e647 100644 --- a/gyrokinetic/zero/gkyl_calc_derived_geo.h +++ b/gyrokinetic/zero/gkyl_calc_derived_geo.h @@ -35,8 +35,6 @@ gkyl_calc_derived_geo* gkyl_calc_derived_geo_new(const struct gkyl_basis *cbasis * @param cmagFld DG representation of C factor in field-line following coordinate formulation * @param jtotFld DG representation of total Jacobian (jacobgeo*bmag) * @param jtotinvFld DG represenation of inverse of the total Jacobian (1/(jacobgeo*B)) - * @param bmaginvFld DG represenation of the inverse of the magnetic field magnitude (1/B) - * @param bmaginvsqFld DG representation of the inverse of the magnetic field magnitude squared (1/B^2) * @param gxxJFld DG representation of gxx*J (appears in Poisson and diffusion equation) * @param gxyJFld DG representation of gxy*J (appears in Poisson equation) * @param gyyJFld DG representation of gyy*J (appears in Poisson equation) @@ -47,9 +45,8 @@ gkyl_calc_derived_geo* gkyl_calc_derived_geo_new(const struct gkyl_basis *cbasis void gkyl_calc_derived_geo_advance(const gkyl_calc_derived_geo *up, const struct gkyl_range *crange, struct gkyl_array *gFld, struct gkyl_array *bmagFld, struct gkyl_array *jFld, struct gkyl_array *jinvFld, struct gkyl_array *grFld, struct gkyl_array *biFld, struct gkyl_array *cmagFld, struct gkyl_array *jtotFld, - struct gkyl_array *jtotinvFld, struct gkyl_array *bmaginvFld, struct gkyl_array *bmaginvsqFld, - struct gkyl_array *gxxJFld, struct gkyl_array *gxyJFld, struct gkyl_array *gyyJFld, struct gkyl_array *gxzJFld, - struct gkyl_array *eps2Fld); + struct gkyl_array *jtotinvFld, struct gkyl_array *gxxJFld, struct gkyl_array *gxyJFld, + struct gkyl_array *gyyJFld, struct gkyl_array *gxzJFld, struct gkyl_array *eps2Fld); /** * Delete updater. diff --git a/gyrokinetic/zero/gkyl_dg_lbo_gyrokinetic_diff_priv.h b/gyrokinetic/zero/gkyl_dg_lbo_gyrokinetic_diff_priv.h index 0bf726404e..e57d4c4c49 100644 --- a/gyrokinetic/zero/gkyl_dg_lbo_gyrokinetic_diff_priv.h +++ b/gyrokinetic/zero/gkyl_dg_lbo_gyrokinetic_diff_priv.h @@ -80,7 +80,7 @@ kernel_lbo_gyrokinetic_diff_vol_1x1v_ser_p1(const struct gkyl_dg_eqn *eqn, const return lbo_gyrokinetic_diff_vol_1x1v_ser_p1(dx, (const double*) gkyl_array_cfetch(lbo->vel_map->vmap, vidx), (const double*) gkyl_array_cfetch(lbo->vel_map->vmap_prime, vidx), lbo->mass, - (const double*) gkyl_array_cfetch(lbo->gk_geom->geo_int.bmag_inv, cidx), + (const double*) gkyl_array_cfetch(lbo->gk_geom->geo_corn.bmag_inv, cidx), nuSum_p, nuPrimMomsSum_p, qIn, qRhsOut); } else { return 0.; @@ -111,7 +111,7 @@ kernel_lbo_gyrokinetic_diff_vol_1x2v_ser_p1(const struct gkyl_dg_eqn *eqn, const return lbo_gyrokinetic_diff_vol_1x2v_ser_p1(dx, (const double*) gkyl_array_cfetch(lbo->vel_map->vmap, vidx), (const double*) gkyl_array_cfetch(lbo->vel_map->vmap_prime, vidx), lbo->mass, - (const double*) gkyl_array_cfetch(lbo->gk_geom->geo_int.bmag_inv, cidx), + (const double*) gkyl_array_cfetch(lbo->gk_geom->geo_corn.bmag_inv, cidx), nuSum_p, nuPrimMomsSum_p, qIn, qRhsOut); } else { return 0.; @@ -142,7 +142,7 @@ kernel_lbo_gyrokinetic_diff_vol_2x2v_ser_p1(const struct gkyl_dg_eqn *eqn, const return lbo_gyrokinetic_diff_vol_2x2v_ser_p1(dx, (const double*) gkyl_array_cfetch(lbo->vel_map->vmap, vidx), (const double*) gkyl_array_cfetch(lbo->vel_map->vmap_prime, vidx), lbo->mass, - (const double*) gkyl_array_cfetch(lbo->gk_geom->geo_int.bmag_inv, cidx), + (const double*) gkyl_array_cfetch(lbo->gk_geom->geo_corn.bmag_inv, cidx), nuSum_p, nuPrimMomsSum_p, qIn, qRhsOut); } else { return 0.; @@ -173,7 +173,7 @@ kernel_lbo_gyrokinetic_diff_vol_3x2v_ser_p1(const struct gkyl_dg_eqn *eqn, const return lbo_gyrokinetic_diff_vol_3x2v_ser_p1(dx, (const double*) gkyl_array_cfetch(lbo->vel_map->vmap, vidx), (const double*) gkyl_array_cfetch(lbo->vel_map->vmap_prime, vidx), lbo->mass, - (const double*) gkyl_array_cfetch(lbo->gk_geom->geo_int.bmag_inv, cidx), + (const double*) gkyl_array_cfetch(lbo->gk_geom->geo_corn.bmag_inv, cidx), nuSum_p, nuPrimMomsSum_p, qIn, qRhsOut); } else { return 0.; @@ -327,7 +327,7 @@ surf(const struct gkyl_dg_eqn *eqn, (const double*) gkyl_array_cfetch(lbo->vel_map->jacobvel, pidxC), (const double*) gkyl_array_cfetch(lbo->vel_map->jacobvel, pidxR), lbo->mass, - (const double*) gkyl_array_cfetch(lbo->gk_geom->geo_int.bmag_inv, cidx), + (const double*) gkyl_array_cfetch(lbo->gk_geom->geo_corn.bmag_inv, cidx), nuSum_p, nuPrimMomsSum_p, qInL, qInC, qInR, qRhsOut); } return 0.; @@ -371,7 +371,7 @@ boundary_surf(const struct gkyl_dg_eqn *eqn, int dir, (const double*) gkyl_array_cfetch(lbo->vel_map->vmap_prime, vidxSkin), (const double*) gkyl_array_cfetch(lbo->vel_map->jacobvel, pidxEdge), (const double*) gkyl_array_cfetch(lbo->vel_map->jacobvel, pidxSkin), lbo->mass, - (const double*) gkyl_array_cfetch(lbo->gk_geom->geo_int.bmag_inv, cidx), + (const double*) gkyl_array_cfetch(lbo->gk_geom->geo_corn.bmag_inv, cidx), nuSum_p, nuPrimMomsSum_p, edge, qInEdge, qInSkin, qRhsOut); } return 0.; diff --git a/gyrokinetic/zero/gkyl_dg_lbo_gyrokinetic_drag_priv.h b/gyrokinetic/zero/gkyl_dg_lbo_gyrokinetic_drag_priv.h index a4275e727e..e7424b46d5 100644 --- a/gyrokinetic/zero/gkyl_dg_lbo_gyrokinetic_drag_priv.h +++ b/gyrokinetic/zero/gkyl_dg_lbo_gyrokinetic_drag_priv.h @@ -78,7 +78,7 @@ kernel_lbo_gyrokinetic_drag_vol_1x1v_ser_p1(const struct gkyl_dg_eqn *eqn, const return lbo_gyrokinetic_drag_vol_1x1v_ser_p1(dx, (const double*) gkyl_array_cfetch(lbo->vel_map->vmap, vidx), (const double*) gkyl_array_cfetch(lbo->vel_map->vmap_prime, vidx), lbo->mass, - (const double*) gkyl_array_cfetch(lbo->gk_geom->geo_int.bmag_inv, cidx), + (const double*) gkyl_array_cfetch(lbo->gk_geom->geo_corn.bmag_inv, cidx), nuSum_p, nuPrimMomsSum_p, qIn, qRhsOut); } else { return 0.; @@ -109,7 +109,7 @@ kernel_lbo_gyrokinetic_drag_vol_1x2v_ser_p1(const struct gkyl_dg_eqn *eqn, const return lbo_gyrokinetic_drag_vol_1x2v_ser_p1(dx, (const double*) gkyl_array_cfetch(lbo->vel_map->vmap, vidx), (const double*) gkyl_array_cfetch(lbo->vel_map->vmap_prime, vidx), lbo->mass, - (const double*) gkyl_array_cfetch(lbo->gk_geom->geo_int.bmag_inv, cidx), + (const double*) gkyl_array_cfetch(lbo->gk_geom->geo_corn.bmag_inv, cidx), nuSum_p, nuPrimMomsSum_p, qIn, qRhsOut); } else { return 0.; @@ -140,7 +140,7 @@ kernel_lbo_gyrokinetic_drag_vol_2x2v_ser_p1(const struct gkyl_dg_eqn *eqn, const return lbo_gyrokinetic_drag_vol_2x2v_ser_p1(dx, (const double*) gkyl_array_cfetch(lbo->vel_map->vmap, vidx), (const double*) gkyl_array_cfetch(lbo->vel_map->vmap_prime, vidx), lbo->mass, - (const double*) gkyl_array_cfetch(lbo->gk_geom->geo_int.bmag_inv, cidx), + (const double*) gkyl_array_cfetch(lbo->gk_geom->geo_corn.bmag_inv, cidx), nuSum_p, nuPrimMomsSum_p, qIn, qRhsOut); } else { return 0.; @@ -171,7 +171,7 @@ kernel_lbo_gyrokinetic_drag_vol_3x2v_ser_p1(const struct gkyl_dg_eqn *eqn, const return lbo_gyrokinetic_drag_vol_3x2v_ser_p1(dx, (const double*) gkyl_array_cfetch(lbo->vel_map->vmap, vidx), (const double*) gkyl_array_cfetch(lbo->vel_map->vmap_prime, vidx), lbo->mass, - (const double*) gkyl_array_cfetch(lbo->gk_geom->geo_int.bmag_inv, cidx), + (const double*) gkyl_array_cfetch(lbo->gk_geom->geo_corn.bmag_inv, cidx), nuSum_p, nuPrimMomsSum_p, qIn, qRhsOut); } else { return 0.; @@ -277,7 +277,7 @@ surf(const struct gkyl_dg_eqn *eqn, (const double*) gkyl_array_cfetch(lbo->vel_map->vmap_prime, vidxL), (const double*) gkyl_array_cfetch(lbo->vel_map->vmap_prime, vidxC), (const double*) gkyl_array_cfetch(lbo->vel_map->vmap_prime, vidxR), lbo->mass, - (const double*) gkyl_array_cfetch(lbo->gk_geom->geo_int.bmag_inv, cidx), + (const double*) gkyl_array_cfetch(lbo->gk_geom->geo_corn.bmag_inv, cidx), nuSum_p, nuPrimMomsSum_p, qInL, qInC, qInR, qRhsOut); } return 0.; @@ -317,7 +317,7 @@ boundary_surf(const struct gkyl_dg_eqn *eqn, (const double*) gkyl_array_cfetch(lbo->vel_map->vmap, vidxSkin), (const double*) gkyl_array_cfetch(lbo->vel_map->vmap_prime, vidxEdge), (const double*) gkyl_array_cfetch(lbo->vel_map->vmap_prime, vidxSkin), lbo->mass, - (const double*) gkyl_array_cfetch(lbo->gk_geom->geo_int.bmag_inv, cidx), + (const double*) gkyl_array_cfetch(lbo->gk_geom->geo_corn.bmag_inv, cidx), nuSum_p, nuPrimMomsSum_p, edge, qInEdge, qInSkin, qRhsOut); } return 0.; diff --git a/gyrokinetic/zero/gkyl_fem_parproj.h b/gyrokinetic/zero/gkyl_fem_parproj.h index d69bfd9755..fd10af818c 100644 --- a/gyrokinetic/zero/gkyl_fem_parproj.h +++ b/gyrokinetic/zero/gkyl_fem_parproj.h @@ -17,7 +17,8 @@ typedef struct gkyl_fem_parproj gkyl_fem_parproj; // Boundary condition types. enum gkyl_fem_parproj_bc_type { GKYL_FEM_PARPROJ_PERIODIC = 0, - GKYL_FEM_PARPROJ_DIRICHLET, // sets the value. + GKYL_FEM_PARPROJ_DIRICHLET_GHOST, // Solution = ghost evaluated at the boundary. + GKYL_FEM_PARPROJ_DIRICHLET_SKIN, // Solution = skin evaluated at the boundary. GKYL_FEM_PARPROJ_NONE, // does not enforce a BC. }; @@ -50,7 +51,7 @@ struct gkyl_fem_parproj* gkyl_fem_parproj_new(const struct gkyl_range *solve_ran * * @param up FEM project updater to run. * @param rhsin DG field to set as RHS source. - * @param phibc Potential to use for Dirichlet BCs (only use ghost cells). + * @param phibc Potential to use for Dirichlet BCs. */ void gkyl_fem_parproj_set_rhs(struct gkyl_fem_parproj* up, const struct gkyl_array *rhsin, const struct gkyl_array *phibc); diff --git a/gyrokinetic/zero/gkyl_fem_parproj_priv.h b/gyrokinetic/zero/gkyl_fem_parproj_priv.h index 99825d4e11..1bf4a57a96 100644 --- a/gyrokinetic/zero/gkyl_fem_parproj_priv.h +++ b/gyrokinetic/zero/gkyl_fem_parproj_priv.h @@ -132,7 +132,7 @@ static const lhsstencil_kern_list ser_lhsstencil_list_noweight[] = { {fem_parproj_lhs_stencil_noweight_1x_ser_p2_inx_nondirichletx, fem_parproj_lhs_stencil_noweight_1x_ser_p2_lox_dirichletx, fem_parproj_lhs_stencil_noweight_1x_ser_p2_upx_dirichletx,}, }, }, - } + }, }, // 2x {.list={ @@ -226,7 +226,7 @@ typedef void (*srcstencil_t)(const double *weight, const double *rho, const doub typedef struct { srcstencil_t kernels[3]; } srcstencil_kern_loc_list; // For use in kernel tables. typedef struct { srcstencil_kern_loc_list list[2]; } srcstencil_kern_bc_list; // For use in kernel tables. -typedef struct { srcstencil_kern_bc_list list[2]; } srcstencil_kern_list; // For use in kernel tables. +typedef struct { srcstencil_kern_bc_list list[3]; } srcstencil_kern_list; // For use in kernel tables. // Serendipity src kernels. GKYL_CU_D @@ -239,10 +239,16 @@ static const srcstencil_kern_list ser_srcstencil_list_noweight[] = { {fem_parproj_src_stencil_noweight_1x_ser_p2_inx_nondirichletx, fem_parproj_src_stencil_noweight_1x_ser_p2_lox_nondirichletx, fem_parproj_src_stencil_noweight_1x_ser_p2_upx_nondirichletx,}, }, }, - // dirichletx + // dirichletx ghost + {.list={ + {fem_parproj_src_stencil_noweight_1x_ser_p1_inx_nondirichletx, fem_parproj_src_stencil_noweight_1x_ser_p1_lox_dirichlet_ghostx, fem_parproj_src_stencil_noweight_1x_ser_p1_upx_dirichlet_ghostx,}, + {fem_parproj_src_stencil_noweight_1x_ser_p2_inx_nondirichletx, fem_parproj_src_stencil_noweight_1x_ser_p2_lox_dirichlet_ghostx, fem_parproj_src_stencil_noweight_1x_ser_p2_upx_dirichlet_ghostx,}, + }, + }, + // dirichletx skin {.list={ - {fem_parproj_src_stencil_noweight_1x_ser_p1_inx_nondirichletx, fem_parproj_src_stencil_noweight_1x_ser_p1_lox_dirichletx, fem_parproj_src_stencil_noweight_1x_ser_p1_upx_dirichletx,}, - {fem_parproj_src_stencil_noweight_1x_ser_p2_inx_nondirichletx, fem_parproj_src_stencil_noweight_1x_ser_p2_lox_dirichletx, fem_parproj_src_stencil_noweight_1x_ser_p2_upx_dirichletx,}, + {fem_parproj_src_stencil_noweight_1x_ser_p1_inx_nondirichletx, fem_parproj_src_stencil_noweight_1x_ser_p1_lox_dirichlet_skinx, fem_parproj_src_stencil_noweight_1x_ser_p1_upx_dirichlet_skinx,}, + {fem_parproj_src_stencil_noweight_1x_ser_p2_inx_nondirichletx, fem_parproj_src_stencil_noweight_1x_ser_p2_lox_dirichlet_skinx, fem_parproj_src_stencil_noweight_1x_ser_p2_upx_dirichlet_skinx,}, }, }, } @@ -255,10 +261,16 @@ static const srcstencil_kern_list ser_srcstencil_list_noweight[] = { {fem_parproj_src_stencil_noweight_2x_ser_p2_iny_nondirichlety, fem_parproj_src_stencil_noweight_2x_ser_p2_loy_nondirichlety, fem_parproj_src_stencil_noweight_2x_ser_p2_upy_nondirichlety,}, }, }, - // dirichlety + // dirichlety ghost {.list={ - {fem_parproj_src_stencil_noweight_2x_ser_p1_iny_nondirichlety, fem_parproj_src_stencil_noweight_2x_ser_p1_loy_dirichlety, fem_parproj_src_stencil_noweight_2x_ser_p1_upy_dirichlety,}, - {fem_parproj_src_stencil_noweight_2x_ser_p2_iny_nondirichlety, fem_parproj_src_stencil_noweight_2x_ser_p2_loy_dirichlety, fem_parproj_src_stencil_noweight_2x_ser_p2_upy_dirichlety,}, + {fem_parproj_src_stencil_noweight_2x_ser_p1_iny_nondirichlety, fem_parproj_src_stencil_noweight_2x_ser_p1_loy_dirichlet_ghosty, fem_parproj_src_stencil_noweight_2x_ser_p1_upy_dirichlet_ghosty,}, + {fem_parproj_src_stencil_noweight_2x_ser_p2_iny_nondirichlety, fem_parproj_src_stencil_noweight_2x_ser_p2_loy_dirichlet_ghosty, fem_parproj_src_stencil_noweight_2x_ser_p2_upy_dirichlet_ghosty,}, + }, + }, + // dirichlety skin + {.list={ + {fem_parproj_src_stencil_noweight_2x_ser_p1_iny_nondirichlety, fem_parproj_src_stencil_noweight_2x_ser_p1_loy_dirichlet_skiny, fem_parproj_src_stencil_noweight_2x_ser_p1_upy_dirichlet_skiny,}, + {fem_parproj_src_stencil_noweight_2x_ser_p2_iny_nondirichlety, fem_parproj_src_stencil_noweight_2x_ser_p2_loy_dirichlet_skiny, fem_parproj_src_stencil_noweight_2x_ser_p2_upy_dirichlet_skiny,}, }, }, } @@ -271,10 +283,16 @@ static const srcstencil_kern_list ser_srcstencil_list_noweight[] = { {fem_parproj_src_stencil_noweight_3x_ser_p2_inz_nondirichletz, fem_parproj_src_stencil_noweight_3x_ser_p2_loz_nondirichletz, fem_parproj_src_stencil_noweight_3x_ser_p2_upz_nondirichletz,}, }, }, - // dirichletz + // dirichletz ghost + {.list={ + {fem_parproj_src_stencil_noweight_3x_ser_p1_inz_nondirichletz, fem_parproj_src_stencil_noweight_3x_ser_p1_loz_dirichlet_ghostz, fem_parproj_src_stencil_noweight_3x_ser_p1_upz_dirichlet_ghostz,}, + {fem_parproj_src_stencil_noweight_3x_ser_p2_inz_nondirichletz, fem_parproj_src_stencil_noweight_3x_ser_p2_loz_dirichlet_ghostz, fem_parproj_src_stencil_noweight_3x_ser_p2_upz_dirichlet_ghostz,}, + }, + }, + // dirichletz skin {.list={ - {fem_parproj_src_stencil_noweight_3x_ser_p1_inz_nondirichletz, fem_parproj_src_stencil_noweight_3x_ser_p1_loz_dirichletz, fem_parproj_src_stencil_noweight_3x_ser_p1_upz_dirichletz,}, - {fem_parproj_src_stencil_noweight_3x_ser_p2_inz_nondirichletz, fem_parproj_src_stencil_noweight_3x_ser_p2_loz_dirichletz, fem_parproj_src_stencil_noweight_3x_ser_p2_upz_dirichletz,}, + {fem_parproj_src_stencil_noweight_3x_ser_p1_inz_nondirichletz, fem_parproj_src_stencil_noweight_3x_ser_p1_loz_dirichlet_skinz, fem_parproj_src_stencil_noweight_3x_ser_p1_upz_dirichlet_skinz,}, + {fem_parproj_src_stencil_noweight_3x_ser_p2_inz_nondirichletz, fem_parproj_src_stencil_noweight_3x_ser_p2_loz_dirichlet_skinz, fem_parproj_src_stencil_noweight_3x_ser_p2_upz_dirichlet_skinz,}, }, }, } @@ -291,10 +309,16 @@ static const srcstencil_kern_list ser_srcstencil_list_weighted[] = { {fem_parproj_src_stencil_weighted_1x_ser_p2_inx_nondirichletx, fem_parproj_src_stencil_weighted_1x_ser_p2_lox_nondirichletx, fem_parproj_src_stencil_weighted_1x_ser_p2_upx_nondirichletx,}, }, }, - // dirichletx + // dirichletx ghost + {.list={ + {fem_parproj_src_stencil_weighted_1x_ser_p1_inx_nondirichletx, fem_parproj_src_stencil_weighted_1x_ser_p1_lox_dirichlet_ghostx, fem_parproj_src_stencil_weighted_1x_ser_p1_upx_dirichlet_ghostx,}, + {fem_parproj_src_stencil_weighted_1x_ser_p2_inx_nondirichletx, fem_parproj_src_stencil_weighted_1x_ser_p2_lox_dirichlet_ghostx, fem_parproj_src_stencil_weighted_1x_ser_p2_upx_dirichlet_ghostx,}, + }, + }, + // dirichletx skin {.list={ - {fem_parproj_src_stencil_weighted_1x_ser_p1_inx_nondirichletx, fem_parproj_src_stencil_weighted_1x_ser_p1_lox_dirichletx, fem_parproj_src_stencil_weighted_1x_ser_p1_upx_dirichletx,}, - {fem_parproj_src_stencil_weighted_1x_ser_p2_inx_nondirichletx, fem_parproj_src_stencil_weighted_1x_ser_p2_lox_dirichletx, fem_parproj_src_stencil_weighted_1x_ser_p2_upx_dirichletx,}, + {fem_parproj_src_stencil_weighted_1x_ser_p1_inx_nondirichletx, fem_parproj_src_stencil_weighted_1x_ser_p1_lox_dirichlet_skinx, fem_parproj_src_stencil_weighted_1x_ser_p1_upx_dirichlet_skinx,}, + {fem_parproj_src_stencil_weighted_1x_ser_p2_inx_nondirichletx, fem_parproj_src_stencil_weighted_1x_ser_p2_lox_dirichlet_skinx, fem_parproj_src_stencil_weighted_1x_ser_p2_upx_dirichlet_skinx,}, }, }, } @@ -307,10 +331,16 @@ static const srcstencil_kern_list ser_srcstencil_list_weighted[] = { {fem_parproj_src_stencil_weighted_2x_ser_p2_iny_nondirichlety, fem_parproj_src_stencil_weighted_2x_ser_p2_loy_nondirichlety, fem_parproj_src_stencil_weighted_2x_ser_p2_upy_nondirichlety,}, }, }, - // dirichlety + // dirichlety ghost {.list={ - {fem_parproj_src_stencil_weighted_2x_ser_p1_iny_nondirichlety, fem_parproj_src_stencil_weighted_2x_ser_p1_loy_dirichlety, fem_parproj_src_stencil_weighted_2x_ser_p1_upy_dirichlety,}, - {fem_parproj_src_stencil_weighted_2x_ser_p2_iny_nondirichlety, fem_parproj_src_stencil_weighted_2x_ser_p2_loy_dirichlety, fem_parproj_src_stencil_weighted_2x_ser_p2_upy_dirichlety,}, + {fem_parproj_src_stencil_weighted_2x_ser_p1_iny_nondirichlety, fem_parproj_src_stencil_weighted_2x_ser_p1_loy_dirichlet_ghosty, fem_parproj_src_stencil_weighted_2x_ser_p1_upy_dirichlet_ghosty,}, + {fem_parproj_src_stencil_weighted_2x_ser_p2_iny_nondirichlety, fem_parproj_src_stencil_weighted_2x_ser_p2_loy_dirichlet_ghosty, fem_parproj_src_stencil_weighted_2x_ser_p2_upy_dirichlet_ghosty,}, + }, + }, + // dirichlety skin + {.list={ + {fem_parproj_src_stencil_weighted_2x_ser_p1_iny_nondirichlety, fem_parproj_src_stencil_weighted_2x_ser_p1_loy_dirichlet_skiny, fem_parproj_src_stencil_weighted_2x_ser_p1_upy_dirichlet_skiny,}, + {fem_parproj_src_stencil_weighted_2x_ser_p2_iny_nondirichlety, fem_parproj_src_stencil_weighted_2x_ser_p2_loy_dirichlet_skiny, fem_parproj_src_stencil_weighted_2x_ser_p2_upy_dirichlet_skiny,}, }, }, } @@ -323,10 +353,16 @@ static const srcstencil_kern_list ser_srcstencil_list_weighted[] = { {fem_parproj_src_stencil_weighted_3x_ser_p2_inz_nondirichletz, fem_parproj_src_stencil_weighted_3x_ser_p2_loz_nondirichletz, fem_parproj_src_stencil_weighted_3x_ser_p2_upz_nondirichletz,}, }, }, - // dirichletz + // dirichletz ghost {.list={ - {fem_parproj_src_stencil_weighted_3x_ser_p1_inz_nondirichletz, fem_parproj_src_stencil_weighted_3x_ser_p1_loz_dirichletz, fem_parproj_src_stencil_weighted_3x_ser_p1_upz_dirichletz,}, - {fem_parproj_src_stencil_weighted_3x_ser_p2_inz_nondirichletz, fem_parproj_src_stencil_weighted_3x_ser_p2_loz_dirichletz, fem_parproj_src_stencil_weighted_3x_ser_p2_upz_dirichletz,}, + {fem_parproj_src_stencil_weighted_3x_ser_p1_inz_nondirichletz, fem_parproj_src_stencil_weighted_3x_ser_p1_loz_dirichlet_ghostz, fem_parproj_src_stencil_weighted_3x_ser_p1_upz_dirichlet_ghostz,}, + {fem_parproj_src_stencil_weighted_3x_ser_p2_inz_nondirichletz, fem_parproj_src_stencil_weighted_3x_ser_p2_loz_dirichlet_ghostz, fem_parproj_src_stencil_weighted_3x_ser_p2_upz_dirichlet_ghostz,}, + }, + }, + // dirichletz skin + {.list={ + {fem_parproj_src_stencil_weighted_3x_ser_p1_inz_nondirichletz, fem_parproj_src_stencil_weighted_3x_ser_p1_loz_dirichlet_skinz, fem_parproj_src_stencil_weighted_3x_ser_p1_upz_dirichlet_skinz,}, + {fem_parproj_src_stencil_weighted_3x_ser_p2_inz_nondirichletz, fem_parproj_src_stencil_weighted_3x_ser_p2_loz_dirichlet_skinz, fem_parproj_src_stencil_weighted_3x_ser_p2_upz_dirichlet_skinz,}, }, }, } @@ -348,6 +384,43 @@ static const solstencil_kern_list ser_solstencil_list[] = { { fem_parproj_sol_stencil_3x_ser_p1, fem_parproj_sol_stencil_3x_ser_p2 } }; +// Functions that return the value to impose as Dirichlet BC. +typedef const double *(*get_diri_val_t)(int par_dir, int par_num_cells, + const int *idx, const struct gkyl_range *solve_range, const struct gkyl_array *phibc); + +// No Dirichlet BC. +GKYL_CU_D +static const double *get_dirichlet_value_disabled(int par_dir, int par_num_cells, + const int *idx, const struct gkyl_range *solve_range, const struct gkyl_array *phibc) +{ + return 0; +} + +// Dirichlet BC using the ghost value. +GKYL_CU_D +static const double *get_dirichlet_value_enabled_ghost(int par_dir, int par_num_cells, + const int *idx, const struct gkyl_range *solve_range, const struct gkyl_array *phibc) +{ + int dirichlet_idx[GKYL_MAX_CDIM]; + for (size_t d=0; db_type) { case GKYL_BASIS_MODAL_SERENDIPITY: @@ -422,10 +516,14 @@ fem_parproj_choose_local2global_kernel(const struct gkyl_basis *basis, bool ispe GKYL_CU_D static void -fem_parproj_choose_lhs_kernel(const struct gkyl_basis *basis, bool isdirichlet, bool isweighted, lhsstencil_t *lhsout) +fem_parproj_choose_lhs_kernel(const struct gkyl_basis *basis, + enum gkyl_fem_parproj_bc_type bctype, bool isweighted, lhsstencil_t *lhsout) { int bckey[1] = {-1}; - bckey[0] = isdirichlet? 1 : 0; + if (bctype == GKYL_FEM_PARPROJ_DIRICHLET_GHOST || bctype == GKYL_FEM_PARPROJ_DIRICHLET_SKIN) + bckey[0] = 1; + else + bckey[0] = 0; switch (basis->b_type) { case GKYL_BASIS_MODAL_SERENDIPITY: @@ -441,10 +539,16 @@ fem_parproj_choose_lhs_kernel(const struct gkyl_basis *basis, bool isdirichlet, GKYL_CU_D static void -fem_parproj_choose_srcstencil_kernel(const struct gkyl_basis *basis, bool isdirichlet, bool isweighted, srcstencil_t *srcout) +fem_parproj_choose_srcstencil_kernel(const struct gkyl_basis *basis, + enum gkyl_fem_parproj_bc_type bctype, bool isweighted, srcstencil_t *srcout) { int bckey[1] = {-1}; - bckey[0] = isdirichlet? 1 : 0; + if (bctype == GKYL_FEM_PARPROJ_DIRICHLET_GHOST) + bckey[0] = 1; + else if (bctype == GKYL_FEM_PARPROJ_DIRICHLET_SKIN) + bckey[0] = 2; + else + bckey[0] = 0; switch (basis->b_type) { case GKYL_BASIS_MODAL_SERENDIPITY: @@ -472,6 +576,39 @@ fem_parproj_choose_solstencil_kernel(const struct gkyl_basis *basis) return 0; } +GKYL_CU_D +static void +fem_parproj_choose_kernels(const struct gkyl_basis* basis, bool has_weight_lhs, bool has_weight_rhs, + enum gkyl_fem_parproj_bc_type bctype, bool use_gpu, struct gkyl_fem_parproj_kernels *kers) +{ +#ifdef GKYL_HAVE_CUDA + if (use_gpu) { + fem_parproj_choose_kernels_cu(basis, has_weight_lhs, has_weight_rhs, bctype, kers); + return; + } +#endif + + // Select local-to-global mapping kernel: + fem_parproj_choose_local2global_kernel(basis, bctype, kers->l2g); + + // Select weighted LHS kernel (not always used): + fem_parproj_choose_lhs_kernel(basis, bctype, has_weight_lhs, kers->lhsker); + + // Select RHS source kernel: + fem_parproj_choose_srcstencil_kernel(basis, bctype, has_weight_rhs, kers->srcker); + + // Select kernel that fetches the solution: + kers->solker = fem_parproj_choose_solstencil_kernel(basis); + + // Select function that obtains the value to impose as Dirichlet BC. + if (bctype == GKYL_FEM_PARPROJ_DIRICHLET_GHOST) + kers->get_dirichlet_value = get_dirichlet_value_enabled_ghost; + else if (bctype == GKYL_FEM_PARPROJ_DIRICHLET_SKIN) + kers->get_dirichlet_value = get_dirichlet_value_enabled_skin; + else + kers->get_dirichlet_value = get_dirichlet_value_disabled; +} + GKYL_CU_DH static inline int idx_to_inloup_ker(int num_cells, int idx) { // Return the index of the kernel (in the array of kernels) needed given the grid index. @@ -484,23 +621,3 @@ static inline int idx_to_inloup_ker(int num_cells, int idx) { iout = 2; return iout; } - -#ifdef GKYL_HAVE_CUDA -/** - * Assign the right-side vector with the discontinuous (DG) source field - * on the NVIDIA GPU. - * - * @param up FEM project updater to run. - * @param rhsin DG field to set as RHS source. - * @param phibc Potential to use for Dirichlet BCs (only use ghost cells). - */ -void gkyl_fem_parproj_set_rhs_cu(struct gkyl_fem_parproj *up, const struct gkyl_array *rhsin, const struct gkyl_array *phibc); - -/** - * Solve the linear problem - * on the NVIDIA GPU. - * - * @param up FEM project updater to run. - */ -void gkyl_fem_parproj_solve_cu(struct gkyl_fem_parproj* up, struct gkyl_array *phiout); -#endif \ No newline at end of file diff --git a/gyrokinetic/zero/gkyl_fem_poisson_perp.h b/gyrokinetic/zero/gkyl_fem_poisson_perp.h index c5e7166836..d68db9e9f8 100644 --- a/gyrokinetic/zero/gkyl_fem_poisson_perp.h +++ b/gyrokinetic/zero/gkyl_fem_poisson_perp.h @@ -30,6 +30,7 @@ typedef struct gkyl_fem_poisson_perp gkyl_fem_poisson_perp; * @param grid Grid object * @param basis Basis functions of the DG field. * @param bcs Boundary conditions. + * @param bias_line_list List of points (2D) or lines (3D) to bias. * @param epsilon Spatially varying permittivity tensor. * @param kSq Squared wave number (factor multiplying phi in Helmholtz eq). * @param use_gpu boolean indicating whether to use the GPU. @@ -37,8 +38,8 @@ typedef struct gkyl_fem_poisson_perp gkyl_fem_poisson_perp; */ struct gkyl_fem_poisson_perp* gkyl_fem_poisson_perp_new( const struct gkyl_range *solve_range, const struct gkyl_rect_grid *grid, - const struct gkyl_basis basis, struct gkyl_poisson_bc *bcs, struct gkyl_array *epsilon, - struct gkyl_array *kSq, bool use_gpu); + const struct gkyl_basis basis, struct gkyl_poisson_bc *bcs, struct gkyl_poisson_bias_line_list* bias_line_list, + struct gkyl_array *epsilon, struct gkyl_array *kSq, bool use_gpu); /** * Assign the right-side vector with the discontinuous (DG) source field. @@ -55,6 +56,15 @@ void gkyl_fem_poisson_perp_set_rhs(gkyl_fem_poisson_perp* up, struct gkyl_array */ void gkyl_fem_poisson_perp_solve(gkyl_fem_poisson_perp* up, struct gkyl_array *phiout); +/** + * Assign the left-side matrix. + * + * @param up FEM poisson updater to run. + * @param epsilon Weight in Laplacian term. + * @param kSq Linear factor in Helmholtz term. + */ +void gkyl_fem_poisson_perp_update_lhs(gkyl_fem_poisson_perp* up, struct gkyl_array *epsilon, struct gkyl_array *kSq); + /** * Delete updater. * diff --git a/gyrokinetic/zero/gkyl_fem_poisson_perp_priv.h b/gyrokinetic/zero/gkyl_fem_poisson_perp_priv.h index 48d28084af..ef2c7dd19f 100644 --- a/gyrokinetic/zero/gkyl_fem_poisson_perp_priv.h +++ b/gyrokinetic/zero/gkyl_fem_poisson_perp_priv.h @@ -82,7 +82,7 @@ static const local2global_kern_bcx_list_3x ser_loc2glob_list_3x[] = { // Function pointer type for lhs kernels. typedef void (*lhsstencil_t)(const double *epsilon, const double *kSq, const double *dx, const double *bcVals, - const long *globalIdxs, gkyl_mat_triples *tri); + const long *globalIdxs, void *out); // For use in kernel tables. typedef struct { lhsstencil_t kernels[3]; } lhsstencil_kern_loc_list_2x; @@ -93,6 +93,7 @@ typedef struct { lhsstencil_kern_loc_list_3x list[3]; } lhsstencil_kern_bcy_list typedef struct { lhsstencil_kern_bcy_list_3x list[9]; } lhsstencil_kern_bcx_list_3x; // Serendipity lhs kernels. +GKYL_CU_D static const lhsstencil_kern_bcx_list_2x ser_lhsstencil_list_2x[] = { // periodicx { .list = @@ -128,6 +129,7 @@ static const lhsstencil_kern_bcx_list_2x ser_lhsstencil_list_2x[] = { }, }; +GKYL_CU_D static const lhsstencil_kern_bcx_list_3x ser_lhsstencil_list_3x[] = { // periodicx { .list = { @@ -424,6 +426,112 @@ static const solstencil_kern_list ser_solstencil_list[] = { { NULL, fem_poisson_perp_sol_stencil_3x_ser_p1, NULL }, // 2 }; +// Function pointer type for kernels that enforce biasing in LHS matrix. +typedef void (*bias_lhs_t)(const int *edge, const int *perp_dirs, const long *globalIdxs, gkyl_mat_triples *tri); + +// For use in kernel tables. +typedef struct { bias_lhs_t kernels[2]; } bias_lhs_kern_loc_list_2x; +typedef struct { bias_lhs_kern_loc_list_2x list[3]; } bias_lhs_kern_bcx_list_2x; + +typedef struct { bias_lhs_t kernels[4]; } bias_lhs_kern_loc_list_3x; +typedef struct { bias_lhs_kern_loc_list_3x list[3]; } bias_lhs_kern_bcy_list_3x; +typedef struct { bias_lhs_kern_bcy_list_3x list[2]; } bias_lhs_kern_bcx_list_3x; + +// Serendipity bias_lhs kernels. +static const bias_lhs_kern_bcx_list_2x ser_bias_lhs_list_2x[] = { + // periodicx + { .list = {{NULL, NULL}, + {fem_poisson_perp_bias_line_lhs_2x_ser_p1_inx, fem_poisson_perp_bias_line_lhs_2x_ser_p1_upx_periodicx}, + {NULL, NULL}}, }, + // nonperiodicx + { .list = {{NULL, NULL}, + {fem_poisson_perp_bias_line_lhs_2x_ser_p1_inx, fem_poisson_perp_bias_line_lhs_2x_ser_p1_upx_nonperiodicx}, + {NULL, NULL}}, } +}; + +static const bias_lhs_kern_bcx_list_3x ser_bias_lhs_list_3x[] = { + // periodicx + { .list = { + // periodicy + { .list = {{NULL, NULL, NULL, NULL}, + {fem_poisson_perp_bias_line_lhs_3x_ser_p1_inx_iny, fem_poisson_perp_bias_line_lhs_3x_ser_p1_upx_periodicx_iny, fem_poisson_perp_bias_line_lhs_3x_ser_p1_inx_upy_periodicy, fem_poisson_perp_bias_line_lhs_3x_ser_p1_upx_periodicx_upy_periodicy}, + {NULL, NULL, NULL, NULL}}, + }, + // nonperiodicy + { .list = {{NULL, NULL, NULL, NULL}, + {fem_poisson_perp_bias_line_lhs_3x_ser_p1_inx_iny, fem_poisson_perp_bias_line_lhs_3x_ser_p1_upx_periodicx_iny, fem_poisson_perp_bias_line_lhs_3x_ser_p1_inx_upy_nonperiodicy, fem_poisson_perp_bias_line_lhs_3x_ser_p1_upx_periodicx_upy_nonperiodicy}, + {NULL, NULL, NULL, NULL},} + }} + }, + // nonperiodicx + { .list = { + // periodicy + { .list = {{NULL, NULL, NULL, NULL}, + {fem_poisson_perp_bias_line_lhs_3x_ser_p1_inx_iny, fem_poisson_perp_bias_line_lhs_3x_ser_p1_upx_nonperiodicx_iny, fem_poisson_perp_bias_line_lhs_3x_ser_p1_inx_upy_periodicy, fem_poisson_perp_bias_line_lhs_3x_ser_p1_upx_nonperiodicx_upy_periodicy}, + {NULL, NULL, NULL, NULL}}, + }, + // nonperiodicy + { .list = {{NULL, NULL, NULL, NULL}, + {fem_poisson_perp_bias_line_lhs_3x_ser_p1_inx_iny, fem_poisson_perp_bias_line_lhs_3x_ser_p1_upx_nonperiodicx_iny, fem_poisson_perp_bias_line_lhs_3x_ser_p1_inx_upy_nonperiodicy, fem_poisson_perp_bias_line_lhs_3x_ser_p1_upx_nonperiodicx_upy_nonperiodicy}, + {NULL, NULL, NULL, NULL},} + }} + } +}; + +// Function pointer type for kernels that enforce biasing in RHS source. +typedef void (*bias_src_t)(const int *edge, const int *perp_dirs, double val, long perpOff, const long *globalIdxs, double *bsrc); + +// For use in kernel tables. +typedef struct { bias_src_t kernels[2]; } bias_src_kern_loc_list_2x; +typedef struct { bias_src_kern_loc_list_2x list[3]; } bias_src_kern_bcx_list_2x; + +typedef struct { bias_src_t kernels[4]; } bias_src_kern_loc_list_3x; +typedef struct { bias_src_kern_loc_list_3x list[3]; } bias_src_kern_bcy_list_3x; +typedef struct { bias_src_kern_bcy_list_3x list[2]; } bias_src_kern_bcx_list_3x; + +// Serendipity bias_src kernels. +GKYL_CU_D +static const bias_src_kern_bcx_list_2x ser_bias_src_list_2x[] = { + // periodicx + { .list = {{NULL, NULL}, + {fem_poisson_perp_bias_line_src_2x_ser_p1_inx, fem_poisson_perp_bias_line_src_2x_ser_p1_upx_periodicx}, + {NULL, NULL}}, }, + // nonperiodicx + { .list = {{NULL, NULL}, + {fem_poisson_perp_bias_line_src_2x_ser_p1_inx, fem_poisson_perp_bias_line_src_2x_ser_p1_upx_nonperiodicx}, + {NULL, NULL}}, } +}; + +GKYL_CU_D +static const bias_src_kern_bcx_list_3x ser_bias_src_list_3x[] = { + // periodicx + { .list = { + // periodicy + { .list = {{NULL, NULL, NULL, NULL}, + {fem_poisson_perp_bias_line_src_3x_ser_p1_inx_iny, fem_poisson_perp_bias_line_src_3x_ser_p1_upx_periodicx_iny, fem_poisson_perp_bias_line_src_3x_ser_p1_inx_upy_periodicy, fem_poisson_perp_bias_line_src_3x_ser_p1_upx_periodicx_upy_periodicy}, + {NULL, NULL, NULL, NULL}}, + }, + // nonperiodicy + { .list = {{NULL, NULL, NULL, NULL}, + {fem_poisson_perp_bias_line_src_3x_ser_p1_inx_iny, fem_poisson_perp_bias_line_src_3x_ser_p1_upx_periodicx_iny, fem_poisson_perp_bias_line_src_3x_ser_p1_inx_upy_nonperiodicy, fem_poisson_perp_bias_line_src_3x_ser_p1_upx_periodicx_upy_nonperiodicy}, + {NULL, NULL, NULL, NULL},} + }} + }, + // nonperiodicx + { .list = { + // periodicy + { .list = {{NULL, NULL, NULL, NULL}, + {fem_poisson_perp_bias_line_src_3x_ser_p1_inx_iny, fem_poisson_perp_bias_line_src_3x_ser_p1_upx_nonperiodicx_iny, fem_poisson_perp_bias_line_src_3x_ser_p1_inx_upy_periodicy, fem_poisson_perp_bias_line_src_3x_ser_p1_upx_nonperiodicx_upy_periodicy}, + {NULL, NULL, NULL, NULL}}, + }, + // nonperiodicy + { .list = {{NULL, NULL, NULL, NULL}, + {fem_poisson_perp_bias_line_src_3x_ser_p1_inx_iny, fem_poisson_perp_bias_line_src_3x_ser_p1_upx_nonperiodicx_iny, fem_poisson_perp_bias_line_src_3x_ser_p1_inx_upy_nonperiodicy, fem_poisson_perp_bias_line_src_3x_ser_p1_upx_nonperiodicx_upy_nonperiodicy}, + {NULL, NULL, NULL, NULL},} + }} + } +}; + // "Choose Kernel" based on polyorder, stencil location and BCs. #define CK2x(lst,poly_order,loc,bcx) lst[bcx].list[poly_order].kernels[loc] #define CK3x(lst,poly_order,loc,bcx,bcy) lst[bcx].list[bcy].list[poly_order].kernels[loc] @@ -440,8 +548,15 @@ struct gkyl_fem_poisson_perp_kernels { srcstencil_t srcker[27]; solstencil_t solker; + + // Pointer to kernels that enforce biasing (2^2, 2 (interior and upper) in each direction). + bias_lhs_t bias_lhs_ker[4]; + bias_src_t bias_src_ker[4]; }; +// Type of function used to enforce biasing in the RHS src. +typedef void (*bias_src_func_t)(gkyl_fem_poisson_perp* up, struct gkyl_array *rhsin); + // Updater type struct gkyl_fem_poisson_perp { void *ctx; // Evaluation context. @@ -458,7 +573,7 @@ struct gkyl_fem_poisson_perp { #ifdef GKYL_HAVE_CUDA double *dx_cu; #endif - bool isdirperiodic[GKYL_MAX_DIM]; // =true if direction is periodic. + bool isdirperiodic[GKYL_MAX_CDIM]; // =true if direction is periodic. struct gkyl_array *epsilon; // Permittivity. bool ishelmholtz; // If solving Helmholtz equation (kSq is not zero/NULL). @@ -482,12 +597,15 @@ struct gkyl_fem_poisson_perp { int numnodes_local; long numnodes_global; + struct gkyl_mat_triples **tri; // Matrix triples used to set LHS matrix. + struct gkyl_superlu_prob *prob; struct gkyl_array *brhs; #ifdef GKYL_HAVE_CUDA struct gkyl_culinsolver_prob *prob_cu; struct gkyl_array *brhs_cu; + struct gkyl_array *csr_val_idx; // Indices into the csr_val array in cudss_ops.cu, to reset the LHS matrix. #endif long *globalidx; @@ -495,6 +613,14 @@ struct gkyl_fem_poisson_perp { struct gkyl_fem_poisson_perp_kernels *kernels; struct gkyl_fem_poisson_perp_kernels *kernels_cu; bool use_gpu; + + // Objects introduced to allow updating the LHS matrix. + struct gkyl_array *kSq_null; // Permittivity. + + int bl_ndim_perp; // Number of perpendicular directions of bias lines. + int num_bias_line; // Number of biased lines. + struct gkyl_poisson_bias_line *bias_lines; // Biased lines. + bias_src_func_t bias_line_src; // Function to enforce biasing in RHS source. }; void @@ -637,7 +763,76 @@ fem_poisson_perp_choose_sol_kernels(const struct gkyl_basis* basis) return 0; } +GKYL_CU_D +static void +fem_poisson_perp_choose_bias_lhs_kernels(const struct gkyl_basis* basis, + const bool *isdirperiodic, bias_lhs_t *blhs_out) +{ + int poly_order = basis->poly_order; + int ndim = basis->ndim; + int ndim_perp = ndim-1; + + int bckey[GKYL_MAX_CDIM] = {-1}; + for (int d=0; db_type) { + case GKYL_BASIS_MODAL_SERENDIPITY: + for (int k=0; k<(int)(pow(2,ndim_perp)+0.5); k++) { + if (ndim == 2) { + blhs_out[k] = CK2x(ser_bias_lhs_list_2x, poly_order, k, bckey[0]); + } else if (ndim == 3) { + blhs_out[k] = CK3x(ser_bias_lhs_list_3x, poly_order, k, bckey[0], bckey[1]); + } + } + break; +// case GKYL_BASIS_MODAL_TENSOR: +// break; + default: + assert(false); + break; + } +} + +GKYL_CU_D +static void +fem_poisson_perp_choose_bias_src_kernels(const struct gkyl_basis* basis, + const bool *isdirperiodic, bias_src_t *bsrc_out) +{ + int poly_order = basis->poly_order; + int ndim = basis->ndim; + int ndim_perp = ndim-1; + + int bckey[GKYL_MAX_CDIM] = {-1}; + for (int d=0; db_type) { + case GKYL_BASIS_MODAL_SERENDIPITY: + for (int k=0; k<(int)(pow(2,ndim_perp)+0.5); k++) { + if (ndim == 2) { + bsrc_out[k] = CK2x(ser_bias_src_list_2x, poly_order, k, bckey[0]); + } else if (ndim == 3) { + bsrc_out[k] = CK3x(ser_bias_src_list_3x, poly_order, k, bckey[0], bckey[1]); + } + } + break; +// case GKYL_BASIS_MODAL_TENSOR: +// break; + default: + assert(false); + break; + } +} + #ifdef GKYL_HAVE_CUDA +/** + * Assign the left-side matrix. + * + * @param up FEM poisson updater to run. + * @param epsilon Laplacian term weight. + * @param kSq Linear Helmholtz term. + */ +void gkyl_fem_poisson_perp_update_lhs_cu(gkyl_fem_poisson_perp *up, struct gkyl_array *epsilon, struct gkyl_array *kSq); + /** * Assign the right-side vector on the device. * @@ -646,6 +841,15 @@ fem_poisson_perp_choose_sol_kernels(const struct gkyl_basis* basis) */ void gkyl_fem_poisson_perp_set_rhs_cu(gkyl_fem_poisson_perp* up, struct gkyl_array *rhsin); +/** + * Replace the entries in the RHS src vector with the biased potential values. + * + * @param up FEM poisson updater to run. + * @param rhsin DG field to set as RHS source. + */ +void +gkyl_fem_poisson_perp_bias_src_enabled_cu(gkyl_fem_poisson_perp *up, struct gkyl_array *rhsin); + /** * Solve the linear problemon the device. * diff --git a/gyrokinetic/zero/gkyl_gk_geometry.h b/gyrokinetic/zero/gkyl_gk_geometry.h index 73b413941e..711a52b66c 100644 --- a/gyrokinetic/zero/gkyl_gk_geometry.h +++ b/gyrokinetic/zero/gkyl_gk_geometry.h @@ -16,106 +16,95 @@ typedef struct gk_geometry gk_geometry; struct gk_geom_surf { - struct gkyl_array* jacobgeo; // 1 component. Configuration space jacobian J - struct gkyl_array* jacobgeo_ratio; // 1 component. Ratio of jacobgeo from neigboring blocks (valid only at the boundary, stored in ghost cell). - struct gkyl_array* bmag; // 1 component. B Magnitude of magnetic field - struct gkyl_array* b_i; // 3 components. Contravariant components of magnetic field vector b_1, b_2, b_3. - struct gkyl_array* cmag; // 1 component. C = JB/sqrt(g_33) - struct gkyl_array* jacobtot_inv; // 1 component. 1/(JB) - struct gkyl_array* B3; // 1 component n^3 \dot \vec{B} = 1/g_33 - struct gkyl_array* normcurlbhat; // 1 component, n^m \dot curl(bhat) - struct gkyl_array* normals; // 9 components Cartesian components of normal vectors in order n^1,, n^2, n^3 - struct gkyl_array* lenr; // 1 components Jc|n^i| + struct gkyl_array *jacobgeo; // 1 component. Configuration space jacobian J. + struct gkyl_array *jacobgeo_ratio; // 1 component. Ratio of jacobgeo from neigboring blocks (valid only at the boundary, stored in ghost cell). + struct gkyl_array *bmag; // 1 component. B Magnitude of magnetic field. + struct gkyl_array *b_i; // 3 components. Contravariant components of magnetic field vector b_1, b_2, b_3. + struct gkyl_array *cmag; // 1 component. C = JB/sqrt(g_33). + struct gkyl_array *jacobtot_inv; // 1 component. 1/(JB). + struct gkyl_array *B3; // 1 component n^3 \dot \vec{B} = 1/g_33. + struct gkyl_array *normcurlbhat; // 1 component, n^m \dot curl(bhat). + struct gkyl_array *normals; // 9 components Cartesian components of normal. vectors in order n^1, n^2, n^3. + struct gkyl_array *lenr; // 1 components Jc|n^i|. // Arrays below are just for computation of arrays above - struct gkyl_array* mc2p_nodal_fd; // 3 components. Cartesian X,Y, and Z at surf quad nodes and nodes epsilon away - struct gkyl_array* mc2p_nodal; // 3 components. Cartesian X,Y, and Z at surf quad nodes - struct gkyl_array* bmag_nodal; // 1 component. B Magnitude of magnetic field - struct gkyl_array* curlbhat_nodal; // Cartesian components of curl(bhat) - struct gkyl_array* normcurlbhat_nodal; // 1 component, n^m \dot curl(bhat) - struct gkyl_array* jacobgeo_nodal; // 1 component. Configuration space jacobian J - struct gkyl_array* b_i_nodal; // 3 components. Contravariant components of magnetic field vector b_1, b_2, b_3. - struct gkyl_array* b_i_nodal_fd; // 3 components. b_i at surf quad nodes and nodes epsilon away - struct gkyl_array* cmag_nodal; // 1 component. C = JB/sqrt(g_33) - struct gkyl_array* jacobtot_inv_nodal; // 1 component. 1/(JB) - struct gkyl_array* ddtheta_nodal; // dphi/dtheta, dR/dtheta, dz/dtheta at surf quad nodes - struct gkyl_array* ddpsi_nodal; // dPsi/dpsi at surf quad nodes - struct gkyl_array* g_ij_nodal; // g_{ij} - struct gkyl_array* dxdz_nodal; // 9 components. - // Cartesian components of tangent Vectors stored in order e_1, e_2, e_3 - struct gkyl_array* dzdx_nodal; // 9 components. - // Cartesian components of dual vectors stroed in order e^1, e^2, e^3 - struct gkyl_array* dualmag_nodal; // 3 components - // norms of the dual vectors : sqrt(e^i.e^i) - struct gkyl_array* normals_nodal; // 9 components - // Cartesian components of normal vectors in order n^1,, n^2, n^3 - struct gkyl_array* bcart_nodal; // 3 components. Cartesian components of magnetic field unit vector b_X, b_Y, b_Z. - - struct gkyl_array* B3_nodal; // 1 component n^3 \dot \vec{B} = 1/g_33 - struct gkyl_array* lenr_nodal; // 1 components Jc|n^i| + struct gkyl_array *mc2p_nodal_fd; // 3 components. Cartesian X,Y, and Z at surf quad nodes and nodes epsilon away. + struct gkyl_array *mc2p_nodal; // 3 components. Cartesian X,Y, and Z at surf quad nodes. + struct gkyl_array *bmag_nodal; // 1 component. B Magnitude of magnetic field. + struct gkyl_array *curlbhat_nodal; // Cartesian components of curl(bhat). + struct gkyl_array *normcurlbhat_nodal; // 1 component, n^m \dot curl(bhat). + struct gkyl_array *jacobgeo_nodal; // 1 component. Configuration space jacobian J. + struct gkyl_array *b_i_nodal; // 3 components. Contravariant components of magnetic field vector b_1, b_2, b_3. + struct gkyl_array *b_i_nodal_fd; // 3 components. b_i at surf quad nodes and nodes epsilon away. + struct gkyl_array *cmag_nodal; // 1 component. C = JB/sqrt(g_33). + struct gkyl_array *jacobtot_inv_nodal; // 1 component. 1/(JB). + struct gkyl_array *ddtheta_nodal; // dphi/dtheta, dR/dtheta, dz/dtheta at surf quad nodes. + struct gkyl_array *ddpsi_nodal; // dPsi/dpsi at surf quad nodes. + struct gkyl_array *g_ij_nodal; // g_{ij}. + struct gkyl_array *dxdz_nodal; // 9 components. Cartesian components of tangent Vectors stored in order e_1, e_2, e_3. + struct gkyl_array *dzdx_nodal; // 9 components. Cartesian components of dual vectors stroed in order e^1, e^2, e^3. + struct gkyl_array *dualmag_nodal; // 3 components norms of the dual vectors : sqrt(e^i.e^i). + struct gkyl_array *normals_nodal; // 9 components Cartesian components of normal vectors in order n^1,, n^2, n^3. + struct gkyl_array *bcart_nodal; // 3 components. Cartesian components of magnetic field unit vector b_X, b_Y, b_Z. + + struct gkyl_array *B3_nodal; // 1 component n^3 \dot \vec{B} = 1/g_33. + struct gkyl_array *lenr_nodal; // 1 components Jc|n^i|. }; struct gk_geom_corn { - struct gkyl_array* mc2p; // 3 components. Cartesian X,Y, and Z - struct gkyl_array* mc2p_deflated; // cdim components. Component removed (Z in 1x, R,Z in 2x, R,Z,phi in 3x) - struct gkyl_array* mc2nu_pos; // 3 components. Uniform computational space to non-uniform computational space mapping - struct gkyl_array* mc2nu_pos_deflated; // cdim components. Uniform computational space to non-uniform computational space mapping - struct gkyl_array* bmag; // 1 component. B Magnitude of magnetic field - - // Arrays below are just for computation of arrays above - struct gkyl_array* mc2p_nodal; // 3 components. Cartesian X,Y, and Z - struct gkyl_array* mc2nu_pos_nodal; // 3 components. Uniform computational space - // to non-uniform computational space mapping - struct gkyl_array* bmag_nodal; // 1 components. Magnitude of Magnetic Field + struct gkyl_array *mc2p; // 3 components. Cartesian X,Y, and Z. + struct gkyl_array *mc2p_deflated; // cdim components. Component removed (Z in 1x, R,Z in 2x, R,Z,phi in 3x). + struct gkyl_array *mc2nu_pos; // 3 components. Uniform computational space to non-uniform computational space mapping. + struct gkyl_array *mc2nu_pos_deflated; // cdim components. Uniform computational space to non-uniform computational space mapping. + struct gkyl_array *bmag; // 1 component. B Magnitude of magnetic field. + struct gkyl_array *bmag_inv; // 1 component. 1/bmag. + + // Arrays below are just for computation of arrays above. + struct gkyl_array *mc2p_nodal; // 3 components. Cartesian X,Y, and Z. + struct gkyl_array *mc2nu_pos_nodal; // 3 components. Uniform computational space to non-uniform computational space mapping + struct gkyl_array *bmag_nodal; // 1 components. Magnitude of Magnetic Field. }; struct gk_geom_int { - struct gkyl_array* mc2p; // 3 components. Cartesian X,Y, and Z - struct gkyl_array* bmag; // 1 component. B Magnitude of magnetic field - struct gkyl_array* g_ij; // 6 components. - // Metric coefficients g_{ij} Stored in order g_11, g12, g_13, g_22, g_23, g_33 - struct gkyl_array* g_ij_neut; // 6 components. - // Metric coefficients g_{ij} Stored in order g_11, g12, g_13, g_22, g_23, g_33 - // Calculated with coord definition alpha = phi for tokamak geometry - struct gkyl_array* dxdz; // 9 components. - // Cartesian components of tangent Vectors stored in order e_1, e_2, e_3 - struct gkyl_array* dzdx; // 9 components. - // Cartesian components of dual vectors stroed in order e^1, e^2, e^3 - struct gkyl_array* dualmag; // 3 components - // norms of the dual vectors : sqrt(e^i.e^i) - struct gkyl_array* normals; // 9 components - // Cartesian components of normal vectors in order n^1,, n^2, n^3 - struct gkyl_array* jacobgeo; // 1 component. Configuration space jacobian J - struct gkyl_array* jacobgeo_ghost; // 1 component. Configuration space jacobian J - struct gkyl_array* jacobgeo_inv; // 1 component. 1/J - struct gkyl_array* gij; // Metric coefficients g^{ij}. See g_ij for order. - struct gkyl_array* gij_neut; // Metric coefficients g^{ij}. See g_ij for order. - // Calculated with coord definition alpha = phi for tokamak geometry - struct gkyl_array* b_i; // 3 components. Covariant components of magnetic field unit vector b_1, b_2, b_3. - struct gkyl_array* bcart; // 3 components. Cartesian components of magnetic field unit vector b_X, b_Y, b_Z. - struct gkyl_array* cmag; // 1 component. C = JB/sqrt(g_33) - struct gkyl_array* jacobtot; // 1 component. Phase space Jacobian = JB - struct gkyl_array* jacobtot_inv; // 1 component. 1/(JB) - struct gkyl_array* bmag_inv; // 1 component. 1/B. - struct gkyl_array* bmag_inv_sq; // 1 component. 1/B^2. - struct gkyl_array* gxxj; // 1 component. g^{xx} * J. For poisson solve. - struct gkyl_array* gxyj; // 1 component. g^{xy} * J. For poisson solve. - struct gkyl_array* gyyj; // 1 component. g^{yy} * J. For poisson solve. - struct gkyl_array* gxzj; // 1 component. g^{xz} * J. For poisson solve if z derivatives are kept. - struct gkyl_array* eps2; // 1 component. eps2 = Jg^33 - J/g_33. For poisson if z derivatives are kept. - struct gkyl_array* dualcurlbhat; // 3 components, e^m \dot curl(bhat) - struct gkyl_array* dualcurlbhatoverB; // 3 components, e^m \dot curl(bhat)/|B| - struct gkyl_array* rtg33inv; // 1 component 1/sqrt(g_33) - struct gkyl_array* bioverJB; // 1 component b_i/J/|B| - struct gkyl_array* B3; // 1 component e^3 \dot \vec{B} = 1/g_33 + struct gkyl_array *mc2p; // 3 components. Cartesian X, Y and Z, + struct gkyl_array *bmag; // 1 component. B Magnitude of magnetic field. + struct gkyl_array *g_ij; // 6 components. Metric coefficients g_{ij} Stored in order g_11, g12, g_13, g_22, g_23, g_33. + struct gkyl_array *g_ij_neut; // 6 components. Metric coefficients g_{ij} Stored in order g_11, g12, g_13, g_22, g_23, g_33. + // Calculated with coord definition alpha = phi for tokamak geometry. + struct gkyl_array *dxdz; // 9 components. Cartesian components of tangent Vectors stored in order e_1, e_2, e_3. + struct gkyl_array *dzdx; // 9 components. Cartesian components of dual vectors stored in order e^1, e^2, e^3. + struct gkyl_array *dualmag; // 3 components. Norms of the dual vectors: sqrt(e^i.e^i). + struct gkyl_array *normals; // 9 components. Cartesian components of normal vectors in order n^1,, n^2, n^3. + struct gkyl_array *jacobgeo; // 1 component. Configuration space jacobian J. + struct gkyl_array *jacobgeo_ghost; // 1 component. Configuration space jacobian J. + struct gkyl_array *jacobgeo_inv; // 1 component. 1/J + struct gkyl_array *gij; // Metric coefficients g^{ij}. See g_ij for order. + struct gkyl_array *gij_neut; // Metric coefficients g^{ij}. See g_ij for order. + // Calculated with coord definition alpha = phi for tokamak geometry. + struct gkyl_array *b_i; // 3 components. Covariant components of magnetic field unit vector b_1, b_2, b_3. + struct gkyl_array *bcart; // 3 components. Cartesian components of magnetic field unit vector b_X, b_Y, b_Z. + struct gkyl_array *cmag; // 1 component. C = JB/sqrt(g_33). + struct gkyl_array *jacobtot; // 1 component. Phase space Jacobian = JB. + struct gkyl_array *jacobtot_inv; // 1 component. 1/(JB). + struct gkyl_array *gxxj; // 1 component. g^{xx} * J. For poisson solve. + struct gkyl_array *gxyj; // 1 component. g^{xy} * J. For poisson solve. + struct gkyl_array *gyyj; // 1 component. g^{yy} * J. For poisson solve. + struct gkyl_array *gxzj; // 1 component. g^{xz} * J. For poisson solve if z derivatives are kept. + struct gkyl_array *eps2; // 1 component. eps2 = Jg^33 - J/g_33. For poisson if z derivatives are kept. + struct gkyl_array *dualcurlbhat; // 3 components, e^m \dot curl(bhat). + struct gkyl_array *dualcurlbhatoverB; // 3 components, e^m \dot curl(bhat)/|B|. + struct gkyl_array *rtg33inv; // 1 component 1/sqrt(g_33). + struct gkyl_array *bioverJB; // 1 component b_i/J/|B|. + struct gkyl_array *B3; // 1 component e^3 \dot \vec{B} = 1/g_33. + struct gkyl_array *qprofile; // 1 component. Flux surface averaged q profle q(psi). // Arrays below are just for computation of arrays above struct gkyl_array *bmag_nodal; struct gkyl_array *ddtheta_nodal; struct gkyl_array *ddpsi_nodal;// dPsi/dpsi at interior quad nodes - struct gkyl_array* mc2p_nodal; // 3 components. Cartesian X,Y, and Z - struct gkyl_array* mc2p_nodal_fd; // 39 components. Cartesian X,Y, and Z at nodes and FD nodes. + struct gkyl_array *mc2p_nodal; // 3 components. Cartesian X,Y, and Z + struct gkyl_array *mc2p_nodal_fd; // 39 components. Cartesian X,Y, and Z at nodes and FD nodes. /* Array containing cartesian coordinates at nodes and nearby nodes (epsilon and 2 epsilon away) used for FD * At each array location 39 values are stored. * The arrangement is as follows: X_c, Y_c, Z_c, @@ -129,30 +118,30 @@ struct gk_geom_int { * and LL#/RR# indicates a node shifted to the left/right by 2 epsilon in coordinate # */ struct gkyl_array *curlbhat_nodal; // Cartesian components of curl(bhat) - struct gkyl_array* dualcurlbhat_nodal; // 3 components, e^m \dot curl(bhat) + struct gkyl_array *dualcurlbhat_nodal; // 3 components, e^m \dot curl(bhat) struct gkyl_array *jacobgeo_nodal; // jacobian - struct gkyl_array* g_ij_nodal; // 6 components. + struct gkyl_array *g_ij_nodal; // 6 components. // Metric coefficients g_{ij} Stored in order g_11, g12, g_13, g_22, g_23, g_33 - struct gkyl_array* g_ij_neut_nodal; // 6 components. + struct gkyl_array *g_ij_neut_nodal; // 6 components. // Metric coefficients g_{ij} Stored in order g_11, g12, g_13, g_22, g_23, g_33 // Calculated with coord definition alpha = phi for tokamak geometry - struct gkyl_array* dxdz_nodal; // 9 components. + struct gkyl_array *dxdz_nodal; // 9 components. // Cartesian components of tangent Vectors stored in order e_1, e_2, e_3 - struct gkyl_array* dzdx_nodal; // 9 components. + struct gkyl_array *dzdx_nodal; // 9 components. // Cartesian components of dual vectors stroed in order e^1, e^2, e^3 - struct gkyl_array* dualmag_nodal; // 3 components + struct gkyl_array *dualmag_nodal; // 3 components // norms of the dual vectors : sqrt(e^i.e^i) - struct gkyl_array* normals_nodal; // 9 components + struct gkyl_array *normals_nodal; // 9 components // Cartesian components of normal vectors in order n^1,, n^2, n^3 - struct gkyl_array* gij_neut_nodal; // Metric coefficients g^{ij}. See g_ij for order. + struct gkyl_array *gij_neut_nodal; // Metric coefficients g^{ij}. See g_ij for order. // Calculated with coord definition alpha = phi for tokamak geometry - struct gkyl_array* b_i_nodal; // 3 components. Covariant components of magnetic field unit vector b_1, b_2, b_3. - struct gkyl_array* b_i_nodal_fd; // 3 components. b_i at interior quad nodes and nodes epsilon away - struct gkyl_array* bcart_nodal; // 3 components. Cartesian components of magnetic field unit vector b_X, b_Y, b_Z. - struct gkyl_array* B3_nodal; // 1 component e^3 \dot \vec{B} = 1/g_33 - struct gkyl_array* dualcurlbhatoverB_nodal; // 3 components, e^m \dot curl(bhat)/|B| - struct gkyl_array* rtg33inv_nodal; // 1 component 1/sqrt(g_33) - struct gkyl_array* bioverJB_nodal; // 3 components b_i/J/|B| + struct gkyl_array *b_i_nodal; // 3 components. Covariant components of magnetic field unit vector b_1, b_2, b_3. + struct gkyl_array *b_i_nodal_fd; // 3 components. b_i at interior quad nodes and nodes epsilon away + struct gkyl_array *bcart_nodal; // 3 components. Cartesian components of magnetic field unit vector b_X, b_Y, b_Z. + struct gkyl_array *B3_nodal; // 1 component e^3 \dot \vec{B} = 1/g_33 + struct gkyl_array *dualcurlbhatoverB_nodal; // 3 components, e^m \dot curl(bhat)/|B| + struct gkyl_array *rtg33inv_nodal; // 1 component 1/sqrt(g_33) + struct gkyl_array *bioverJB_nodal; // 3 components b_i/J/|B| }; diff --git a/gyrokinetic/zero/gkyl_gk_geometry_priv.h b/gyrokinetic/zero/gkyl_gk_geometry_priv.h index 07c07e2b43..0c22dda319 100644 --- a/gyrokinetic/zero/gkyl_gk_geometry_priv.h +++ b/gyrokinetic/zero/gkyl_gk_geometry_priv.h @@ -170,8 +170,6 @@ gk_geometry_int_alloc_expansions(struct gk_geometry* up) up->geo_int.cmag = gkyl_array_new(GKYL_DOUBLE, up->basis.num_basis, up->local_ext.volume); up->geo_int.jacobtot = gkyl_array_new(GKYL_DOUBLE, up->basis.num_basis, up->local_ext.volume); up->geo_int.jacobtot_inv = gkyl_array_new(GKYL_DOUBLE, up->basis.num_basis, up->local_ext.volume); - up->geo_int.bmag_inv = gkyl_array_new(GKYL_DOUBLE, up->basis.num_basis, up->local_ext.volume); - up->geo_int.bmag_inv_sq = gkyl_array_new(GKYL_DOUBLE, up->basis.num_basis, up->local_ext.volume); up->geo_int.gxxj= gkyl_array_new(GKYL_DOUBLE, up->basis.num_basis, up->local_ext.volume); up->geo_int.gxyj= gkyl_array_new(GKYL_DOUBLE, up->basis.num_basis, up->local_ext.volume); up->geo_int.gyyj= gkyl_array_new(GKYL_DOUBLE, up->basis.num_basis, up->local_ext.volume); @@ -182,6 +180,7 @@ gk_geometry_int_alloc_expansions(struct gk_geometry* up) up->geo_int.rtg33inv = gkyl_array_new(GKYL_DOUBLE, 1*up->basis.num_basis, up->local_ext.volume); up->geo_int.bioverJB = gkyl_array_new(GKYL_DOUBLE, 3*up->basis.num_basis, up->local_ext.volume); up->geo_int.B3 = gkyl_array_new(GKYL_DOUBLE, up->basis.num_basis, up->local_ext.volume); + up->geo_int.qprofile = gkyl_array_new(GKYL_DOUBLE, up->basis.num_basis, up->local_ext.volume); } static void @@ -228,6 +227,7 @@ gk_geometry_corn_alloc_expansions(struct gk_geometry* up) up->geo_corn.mc2nu_pos = gkyl_array_new(GKYL_DOUBLE, 3*up->basis.num_basis, up->local_ext.volume); // bmag up->geo_corn.bmag = gkyl_array_new(GKYL_DOUBLE, up->basis.num_basis, up->local_ext.volume); + up->geo_corn.bmag_inv = gkyl_array_new(GKYL_DOUBLE, up->basis.num_basis, up->local_ext.volume); // deflated quantities for plotting up->geo_corn.mc2p_deflated = gkyl_array_new(GKYL_DOUBLE, up->grid.ndim*up->basis.num_basis, up->local_ext.volume); up->geo_corn.mc2nu_pos_deflated = gkyl_array_new(GKYL_DOUBLE, up->grid.ndim*up->basis.num_basis, up->local_ext.volume); @@ -251,7 +251,7 @@ gk_geometry_surf_calc_expansions(struct gk_geometry* gk_geom, int dir, struct gkyl_range local_ext_in_dir; int lower[3] = {gk_geom->local.lower[0], gk_geom->local.lower[1], gk_geom->local.lower[2]}; int upper[3] = {gk_geom->local.upper[0], gk_geom->local.upper[1], gk_geom->local.upper[2]}; - upper[dir]+=1; + upper[dir] += 1; gkyl_sub_range_init(&local_ext_in_dir, &gk_geom->local_ext, lower, upper); gkyl_nodal_ops_n2m_surface(n2m, &gk_geom->surf_basis, &gk_geom->grid, &nrange_quad_surf, &local_ext_in_dir, 1, up_surf.bmag_nodal, up_surf.bmag, dir); diff --git a/gyrokinetic/zero/gkyl_rz_calc_derived_geo.h b/gyrokinetic/zero/gkyl_rz_calc_derived_geo.h index ad29d92035..a36fb6075e 100644 --- a/gyrokinetic/zero/gkyl_rz_calc_derived_geo.h +++ b/gyrokinetic/zero/gkyl_rz_calc_derived_geo.h @@ -31,16 +31,16 @@ gkyl_rz_calc_derived_geo* gkyl_rz_calc_derived_geo_new(const struct gkyl_basis * * @param jacobgeo_inv output field with DG rep of 1/J * @param gij output field with DG rep of g^ij * @param jacobtot output field with DG rep of JB - * @param bmag_inv output field with DG rep of 1/B - * @param bmag_inv_sq output field with DG rep of 1/B^2 * @param gxxj output field with DG rep of Jg^xx * @param gxyj output field with DG rep of Jg^xy * @param gyyj output field with DG rep of Jg^yy * @param gxzj output field with DG rep of Jg^xz * @param eps2 output field with DG rep of eps2 = Jg^33 - J/g_33 */ - -void gkyl_rz_calc_derived_geo_advance(const gkyl_rz_calc_derived_geo *up, const struct gkyl_range *crange, struct gkyl_array *g_ij, struct gkyl_array *bmag, struct gkyl_array *jacobgeo, struct gkyl_array *jacobgeo_inv, struct gkyl_array *gij, struct gkyl_array *b_i, struct gkyl_array *cmag, struct gkyl_array *jacobtot, struct gkyl_array *jacobtot_inv, struct gkyl_array *bmag_inv, struct gkyl_array *bmag_inv_sq, struct gkyl_array *gxxj, struct gkyl_array *gxyj, struct gkyl_array *gyyj, struct gkyl_array *gxzj, struct gkyl_array *eps2); +void gkyl_rz_calc_derived_geo_advance(const gkyl_rz_calc_derived_geo *up, const struct gkyl_range *crange, + struct gkyl_array *g_ij, struct gkyl_array *bmag, struct gkyl_array *jacobgeo, struct gkyl_array *jacobgeo_inv, + struct gkyl_array *gij, struct gkyl_array *b_i, struct gkyl_array *cmag, struct gkyl_array *jacobtot, struct gkyl_array *jacobtot_inv, + struct gkyl_array *gxxj, struct gkyl_array *gxyj, struct gkyl_array *gyyj, struct gkyl_array *gxzj, struct gkyl_array *eps2); /** * Delete updater. diff --git a/gyrokinetic/zero/gkyl_rz_calc_derived_geo_priv.h b/gyrokinetic/zero/gkyl_rz_calc_derived_geo_priv.h index b47d50e54b..c4b89d5661 100644 --- a/gyrokinetic/zero/gkyl_rz_calc_derived_geo_priv.h +++ b/gyrokinetic/zero/gkyl_rz_calc_derived_geo_priv.h @@ -3,7 +3,9 @@ #include #include -typedef void (*rz_derived_geo_kernel)(const double *gij, const double *bmag, const double *J, double *Jinv, double *grij, double *bi, double *cmag, double *Jtot, double *Jtotinv, double *gxxJ, double *gxyJ, double *gyyJ, double *gxzJ, double *eps2); +typedef void (*rz_derived_geo_kernel)(const double *gij, const double *bmag, const double *J, double *Jinv, + double *grij, double *bi, double *cmag, double *Jtot, double *Jtotinv, double *gxxJ, double *gxyJ, double *gyyJ, + double *gxzJ, double *eps2); typedef struct { rz_derived_geo_kernel kernels[3]; } rz_derived_geo_kernel_list; // For use in kernel tables. typedef struct { rz_derived_geo_kernel_list list[4]; } rz_derived_geo_node_list; // For use in kernel tables. diff --git a/gyrokinetic/zero/rz_calc_derived_geo.c b/gyrokinetic/zero/rz_calc_derived_geo.c index 6212178de8..cb0ab31f07 100644 --- a/gyrokinetic/zero/rz_calc_derived_geo.c +++ b/gyrokinetic/zero/rz_calc_derived_geo.c @@ -22,7 +22,10 @@ gkyl_rz_calc_derived_geo_new(const struct gkyl_basis *cbasis, const struct gkyl_ void -gkyl_rz_calc_derived_geo_advance(const gkyl_rz_calc_derived_geo *up, const struct gkyl_range *crange, struct gkyl_array *g_ij, struct gkyl_array *bmag, struct gkyl_array *jacobgeo, struct gkyl_array *jacobgeo_inv, struct gkyl_array *gij, struct gkyl_array *b_i, struct gkyl_array *cmag, struct gkyl_array *jacobtot, struct gkyl_array *jacobtot_inv, struct gkyl_array *bmag_inv, struct gkyl_array *bmag_inv_sq, struct gkyl_array *gxxj, struct gkyl_array *gxyj, struct gkyl_array *gyyj, struct gkyl_array *gxzj, struct gkyl_array *eps2) +gkyl_rz_calc_derived_geo_advance(const gkyl_rz_calc_derived_geo *up, const struct gkyl_range *crange, + struct gkyl_array *g_ij, struct gkyl_array *bmag, struct gkyl_array *jacobgeo, struct gkyl_array *jacobgeo_inv, + struct gkyl_array *gij, struct gkyl_array *b_i, struct gkyl_array *cmag, struct gkyl_array *jacobtot, struct gkyl_array *jacobtot_inv, + struct gkyl_array *gxxj, struct gkyl_array *gxyj, struct gkyl_array *gyyj, struct gkyl_array *gxzj, struct gkyl_array *eps2) { struct gkyl_range_iter iter; gkyl_range_iter_init(&iter, crange); @@ -42,10 +45,9 @@ gkyl_rz_calc_derived_geo_advance(const gkyl_rz_calc_derived_geo *up, const struc double *gyyj_i= gkyl_array_fetch(gyyj, loc); double *gxzj_i= gkyl_array_fetch(gxzj, loc); double *eps2_i= gkyl_array_fetch(eps2, loc); - up->kernel(g_ij_i, bmag_i, jacobgeo_i, jacobgeo_inv_i, gij_i, bi_i, cmag_i, jacobtot_i, jacobtot_inv_i, gxxj_i, gxyj_i, gyyj_i, gxzj_i, eps2_i); + up->kernel(g_ij_i, bmag_i, jacobgeo_i, jacobgeo_inv_i, gij_i, bi_i, cmag_i, jacobtot_i, jacobtot_inv_i, + gxxj_i, gxyj_i, gyyj_i, gxzj_i, eps2_i); } - gkyl_dg_inv_op_range(up->cbasis, 0, bmag_inv, 0, bmag, crange); - gkyl_dg_mul_op_range(up->cbasis, 0, bmag_inv_sq, 0, bmag_inv, 0, bmag_inv, crange); } void diff --git a/gyrokinetic/zero/tok_geo.c b/gyrokinetic/zero/tok_geo.c index 2f81090b7a..b28352f8c0 100644 --- a/gyrokinetic/zero/tok_geo.c +++ b/gyrokinetic/zero/tok_geo.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -292,6 +293,69 @@ phi_func(double alpha_curr, double Z, void *ctx) return alpha_curr + ival + phi_ref; } +double +qprofile_func(void *ctx) +{ + // Function to calculate the flux surface averaged q profile. + + struct arc_length_ctx *actx = ctx; + double *arc_memo = actx->arc_memo; + double psi = actx->psi, rclose = actx->rclose, zmin = actx->zmin, arcL = actx->arcL, zmax = actx->zmax; + double rleft = actx->rleft, rright = actx->rright; + + // Calculate q(psi) = -F(psi)/2pi * integral_zmin^zmax 1/Rgrad(psi). + + double ival = 0; + double phi_ref = 0.0; + if (actx->ftype == GKYL_GEOMETRY_TOKAMAK_CORE) { + double ival1 = integrate_phi_along_psi_contour_memo(actx->geo, psi, actx->zmin, actx->zmax, rright, false, false, arc_memo); + double ival2 = -integrate_phi_along_psi_contour_memo(actx->geo, psi, actx->zmin, actx->zmax, rleft, false, false, arc_memo); + ival = ival1 + ival2; + } + + if (actx->ftype == GKYL_GEOMETRY_TOKAMAK_IWL) { + double ival1 = integrate_phi_along_psi_contour_memo(actx->geo, psi, actx->zmin, actx->zmax, rright, false, false, arc_memo); + double ival2 = -integrate_phi_along_psi_contour_memo(actx->geo, psi, actx->zmin, actx->zmax, rleft, false, false, arc_memo); + ival = ival1 + ival2; + } + + if (actx->ftype == GKYL_GEOMETRY_TOKAMAK_LSN_SOL) { + double ival1 = integrate_phi_along_psi_contour_memo(actx->geo, psi, actx->zmin_right, actx->zmax, rright, false, false, arc_memo); + double ival2 = -integrate_phi_along_psi_contour_memo(actx->geo, psi, actx->zmin_left, actx->zmax, rleft, false, false, arc_memo); + ival = ival1 + ival2; + } + + if (actx->ftype == GKYL_GEOMETRY_TOKAMAK_DN_SOL_OUT || actx->ftype == GKYL_GEOMETRY_TOKAMAK_DN_SOL_OUT_MID || actx->ftype == GKYL_GEOMETRY_TOKAMAK_DN_SOL_OUT_LO || actx->ftype == GKYL_GEOMETRY_TOKAMAK_DN_SOL_OUT_UP){ + ival = integrate_phi_along_psi_contour_memo(actx->geo, psi, actx->zmin, actx->zmax, rclose, false, false, arc_memo); + } + + if (actx->ftype == GKYL_GEOMETRY_TOKAMAK_DN_SOL_IN || actx->ftype == GKYL_GEOMETRY_TOKAMAK_DN_SOL_IN_MID || actx->ftype == GKYL_GEOMETRY_TOKAMAK_DN_SOL_IN_LO || actx->ftype == GKYL_GEOMETRY_TOKAMAK_DN_SOL_IN_UP) { + ival = -integrate_phi_along_psi_contour_memo(actx->geo, psi, actx->zmin, actx->zmax, rclose, false, false, arc_memo); + } + + // Now multiply by fpol/2pi. + double R[4] = {0}; + double dR[4] = {0}; + double psi_fpol = psi; + if ( (psi_fpol < actx->geo->fgrid.lower[0]) || (psi_fpol > actx->geo->fgrid.upper[0]) ) // F = F(psi_sep) in the SOL. + psi_fpol = actx->geo->sibry; + int idx = fmin(actx->geo->frange.lower[0] + (int) floor((psi_fpol - actx->geo->fgrid.lower[0])/actx->geo->fgrid.dx[0]), actx->geo->frange.upper[0]); + long loc = gkyl_range_idx(&actx->geo->frange, &idx); + const double *coeffs = gkyl_array_cfetch(actx->geo->fpoldg,loc); + double fxc; + gkyl_rect_grid_cell_center(&actx->geo->fgrid, &idx, &fxc); + double fx = (psi_fpol-fxc)/(actx->geo->fgrid.dx[0]*0.5); + double fpol = actx->geo->fbasis.eval_expand(&fx, coeffs); + double qout = -ival*fpol/M_PI; + + // AS 1/15/25: The 3 lines below are a useful check to compare against q from efit. + //coeffs = gkyl_array_cfetch(actx->geo->qdg,loc); + //double q_efit = actx->geo->fbasis.eval_expand(&fx, coeffs); + // printf("psi_curr = %g, my q = %g, efit q = %g\n", psi_fpol, qout, q_efit); + + return qout; +} + static double dphidtheta_func(double Z, void *ctx) { @@ -611,7 +675,6 @@ void gkyl_tok_geo_calc(struct gk_geometry* up, struct gkyl_range *nrange, struct double rright = inp->rright; double rleft = inp->rleft; - int nzcells; if(geo->use_cubics) nzcells = geo->rzgrid_cubic.cells[1]; @@ -646,7 +709,6 @@ void gkyl_tok_geo_calc(struct gk_geometry* up, struct gkyl_range *nrange, struct // Non-uniform psi. Finite differences are calculated in calc_metric.c position_map->maps[0](0.0, &psi_curr, &psi_curr, position_map->ctxs[0]); - double darcL, arcL_curr, arcL_lo; // For double null blocks this should set arc_ctx : @@ -657,13 +719,14 @@ void gkyl_tok_geo_calc(struct gk_geometry* up, struct gkyl_range *nrange, struct // also set zmin_left and zmin_right tok_find_endpoints(inp, geo, &arc_ctx, &pctx, psi_curr, alpha_curr, arc_memo, arc_memo_left, arc_memo_right); - darcL = arc_ctx.arcL_tot/(up->basis.poly_order*inp->cgrid.cells[TH_IDX]) * (inp->cgrid.upper[TH_IDX] - inp->cgrid.lower[TH_IDX])/2/M_PI; - // at the beginning of each theta loop we need to reset things + darcL = arc_ctx.arcL_tot/(up->basis.poly_order*inp->cgrid.cells[TH_IDX]) + * (inp->cgrid.upper[TH_IDX] - inp->cgrid.lower[TH_IDX])/2/M_PI; + // At the beginning of each theta loop we need to reset things. cidx[PSI_IDX] = ip; arcL_curr = 0.0; arcL_lo = (theta_lo + M_PI)/2/M_PI*arc_ctx.arcL_tot; double ridders_min, ridders_max; - // set node coordinates + // Set node coordinates. for (int it=nrange->lower[TH_IDX]; it<=nrange->upper[TH_IDX]; ++it) { int it_delta = 0; arcL_curr = arcL_lo + it*darcL; @@ -764,7 +827,6 @@ void gkyl_tok_geo_calc(struct gk_geometry* up, struct gkyl_range *nrange, struct double *mc2nu_n = gkyl_array_fetch(up->geo_corn.mc2nu_pos_nodal, gkyl_range_idx(nrange, cidx)); double *bmag_n = gkyl_array_fetch(up->geo_corn.bmag_nodal, gkyl_range_idx(nrange, cidx)); - mc2p_n[X_IDX] = r_curr; mc2p_n[Y_IDX] = z_curr; mc2p_n[Z_IDX] = phi_curr; @@ -819,6 +881,9 @@ void gkyl_tok_geo_calc(struct gk_geometry* up, struct gkyl_range *nrange, struct gkyl_nodal_ops_n2m(n2m, &inp->cbasis, &inp->cgrid, nrange, &up->local, 1, up->geo_corn.bmag_nodal, up->geo_corn.bmag, false); gkyl_nodal_ops_release(n2m); + // Need 1/B for LBO collisions, computed weakly. + gkyl_dg_inv_op_range(inp->cbasis, 0, up->geo_corn.bmag_inv, 0, up->geo_corn.bmag, &up->local); + gkyl_free(arc_memo); gkyl_free(arc_memo_left); gkyl_free(arc_memo_right); @@ -851,7 +916,6 @@ void gkyl_tok_geo_calc_interior(struct gk_geometry* up, struct gkyl_range *nrang theta_lo = theta_lo + dels[1]*dtheta/2.0; psi_lo = psi_lo + dels[1]*dpsi/2.0; alpha_lo = alpha_lo + dels[1]*dalpha/2.0; - double dx_fact = up->basis.poly_order == 1.0/up->basis.poly_order; dtheta *= dx_fact; dpsi *= dx_fact; dalpha *= dx_fact; @@ -869,7 +933,6 @@ void gkyl_tok_geo_calc_interior(struct gk_geometry* up, struct gkyl_range *nrang double rright = inp->rright; double rleft = inp->rleft; - int nzcells; if(geo->use_cubics) nzcells = geo->rzgrid_cubic.cells[1]; @@ -891,6 +954,9 @@ void gkyl_tok_geo_calc_interior(struct gk_geometry* up, struct gkyl_range *nrang .geo = geo }; + // Temporary array to store nodal q profile. + struct gkyl_array *qprofile_nodal = gkyl_array_new(GKYL_DOUBLE, up->geo_int.bmag_nodal->ncomp, up->geo_int.bmag_nodal->size); + int cidx[3] = { 0 }; for(int ia=nrange->lower[AL_IDX]; ialower[AL_IDX]+1; ++ia){ cidx[AL_IDX] = ia; @@ -900,7 +966,7 @@ void gkyl_tok_geo_calc_interior(struct gk_geometry* up, struct gkyl_range *nrang for (int ip=nrange->lower[PSI_IDX]; ip<=nrange->upper[PSI_IDX]; ++ip) { int ip_delta_max = 3; - for(int ip_delta = 0; ip_delta < ip_delta_max; ip_delta++){ + for (int ip_delta = 0; ip_delta < ip_delta_max; ip_delta++) { double psi_curr = calc_running_coord(psi_lo, ip-nrange->lower[PSI_IDX], dpsi) + modifiers[ip_delta]*delta_psi; @@ -920,7 +986,15 @@ void gkyl_tok_geo_calc_interior(struct gk_geometry* up, struct gkyl_range *nrang // also set zmin_left and zmin_right tok_find_endpoints(inp, geo, &arc_ctx, &pctx, psi_curr, alpha_curr, arc_memo, arc_memo_left, arc_memo_right); - darcL = arc_ctx.arcL_tot/(up->basis.poly_order*inp->cgrid.cells[TH_IDX]) * (inp->cgrid.upper[TH_IDX] - inp->cgrid.lower[TH_IDX])/2/M_PI; + // Calculate the q profile + // qhat = - F(psi) * s(psi) / (R * grad(psi)) + // q = integral_0^2pi qhat dtheta + // = F(psi)*s(psi) * integral 1/(R*grad(psi)) dl + // = 1/s(psi) * integral (dphidtheta) ; dphidtheta = F(psi)/(R*grad(psi)) + double qprofile = qprofile_func(&arc_ctx); + + darcL = arc_ctx.arcL_tot/(up->basis.poly_order*inp->cgrid.cells[TH_IDX]) + * (inp->cgrid.upper[TH_IDX] - inp->cgrid.lower[TH_IDX])/2/M_PI; // at the beginning of each theta loop we need to reset things cidx[PSI_IDX] = ip; arcL_curr = 0.0; @@ -967,7 +1041,7 @@ void gkyl_tok_geo_calc_interior(struct gk_geometry* up, struct gkyl_range *nrang } } - if(nr==0){ + if (nr==0) { printf("ip = %d, it = %d, ia = %d, ip_delta = %d\n", ip, it, ia, ip_delta); printf("Block Type = %d | Failed to find a root at psi = %g, Z = %1.16f\n", inp->ftype, psi_curr, z_curr); assert(false); @@ -985,6 +1059,7 @@ void gkyl_tok_geo_calc_interior(struct gk_geometry* up, struct gkyl_range *nrang double *mc2p_n = gkyl_array_fetch(up->geo_int.mc2p_nodal, gkyl_range_idx(nrange, cidx)); double *bmag_n = gkyl_array_fetch(up->geo_int.bmag_nodal, gkyl_range_idx(nrange, cidx)); double *curlbhat_n = gkyl_array_fetch(up->geo_int.curlbhat_nodal, gkyl_range_idx(nrange, cidx)); + double *qprofile_n = gkyl_array_fetch(qprofile_nodal, gkyl_range_idx(nrange, cidx)); mc2p_fd_n[lidx+X_IDX] = r_curr; mc2p_fd_n[lidx+Y_IDX] = z_curr; @@ -999,6 +1074,7 @@ void gkyl_tok_geo_calc_interior(struct gk_geometry* up, struct gkyl_range *nrang mc2p_n[lidx+Y_IDX] = z_curr; mc2p_n[lidx+Z_IDX] = phi_curr; bmag_n[0] = bmag_func(r_curr, z_curr, &arc_ctx); + qprofile_n[0] = qprofile; curlbhat_func(psi_curr, r_curr, z_curr, phi_curr, curlbhat_n, &arc_ctx); } } @@ -1066,7 +1142,9 @@ void gkyl_tok_geo_calc_interior(struct gk_geometry* up, struct gkyl_range *nrang struct gkyl_nodal_ops *n2m = gkyl_nodal_ops_new(&inp->cbasis, &inp->cgrid, false); gkyl_nodal_ops_n2m(n2m, &inp->cbasis, &inp->cgrid, nrange, &up->local, 3, up->geo_int.mc2p_nodal, up->geo_int.mc2p, true); gkyl_nodal_ops_n2m(n2m, &inp->cbasis, &inp->cgrid, nrange, &up->local, 1, up->geo_int.bmag_nodal, up->geo_int.bmag, true); + gkyl_nodal_ops_n2m(n2m, &inp->cbasis, &inp->cgrid, nrange, &up->local, 1, qprofile_nodal, up->geo_int.qprofile, true); gkyl_nodal_ops_release(n2m); + gkyl_array_release(qprofile_nodal); gkyl_free(arc_memo); gkyl_free(arc_memo_left); @@ -1085,8 +1163,8 @@ void gkyl_tok_geo_calc_surface(struct gk_geometry* up, int dir, struct gkyl_rang geo->rmax = inp->rmax; geo->rmin = inp->rmin; - enum { PSI_IDX, AL_IDX, TH_IDX }; // arrangement of computational coordinates - enum { X_IDX, Y_IDX, Z_IDX }; // arrangement of cartesian coordinates + enum { PSI_IDX, AL_IDX, TH_IDX }; // Arrangement of computational coordinates. + enum { X_IDX, Y_IDX, Z_IDX }; // Arrangement of cartesian coordinates. double dtheta = inp->cgrid.dx[TH_IDX], dpsi = inp->cgrid.dx[PSI_IDX], @@ -1105,7 +1183,7 @@ void gkyl_tok_geo_calc_surface(struct gk_geometry* up, int dir, struct gkyl_rang double dx_fact = up->basis.poly_order == 1.0/up->basis.poly_order; dtheta *= dx_fact; dpsi *= dx_fact; dalpha *= dx_fact; - // used for finite differences + // Used for finite differences. double delta_alpha = dalpha*1e-2; double delta_psi = dpsi*1e-2; double delta_theta = dtheta*1e-2; @@ -1120,7 +1198,7 @@ void gkyl_tok_geo_calc_surface(struct gk_geometry* up, int dir, struct gkyl_rang int nzcells; - if(geo->use_cubics) + if (geo->use_cubics) nzcells = geo->rzgrid_cubic.cells[1]; else nzcells = geo->rzgrid.cells[1]; diff --git a/moments/zero/fem_poisson.c b/moments/zero/fem_poisson.c index 3e30c8efb3..7d4512b0f1 100644 --- a/moments/zero/fem_poisson.c +++ b/moments/zero/fem_poisson.c @@ -2,19 +2,19 @@ #include #include -void -fem_poisson_bias_src_none(gkyl_fem_poisson* up, struct gkyl_array *rhsin) +static void +fem_poisson_bias_src_disabled(gkyl_fem_poisson* up, struct gkyl_array *rhsin) { } -void -fem_poisson_bias_src(gkyl_fem_poisson* up, struct gkyl_array *rhsin) +static void +fem_poisson_bias_src_enabled(gkyl_fem_poisson* up, struct gkyl_array *rhsin) { #ifdef GKYL_HAVE_CUDA if (up->use_gpu) { assert(gkyl_array_is_cu_dev(rhsin)); - gkyl_fem_poisson_bias_src_cu(up, rhsin); + gkyl_fem_poisson_bias_src_enabled_cu(up, rhsin); return; } #endif @@ -262,7 +262,7 @@ gkyl_fem_poisson_new(const struct gkyl_range *solve_range, const struct gkyl_rec up->kernels->lhsker[keri](eps_p, kSq_p, up->dx, up->bcvals, up->globalidx, tri[0]); } - if (up->num_bias_plane > 0) { + if (up->num_bias_plane > 0) { // If biased planes are specified, replace the corresponding equation in the // linear system so it only has a 1. gkyl_range_iter_init(&up->solve_iter, up->solve_range); @@ -286,10 +286,10 @@ gkyl_fem_poisson_new(const struct gkyl_range *solve_range, const struct gkyl_rec } } - up->bias_plane_src = fem_poisson_bias_src; + up->bias_plane_src = fem_poisson_bias_src_enabled; } else { - up->bias_plane_src = fem_poisson_bias_src_none; + up->bias_plane_src = fem_poisson_bias_src_disabled; } #ifdef GKYL_HAVE_CUDA diff --git a/moments/zero/fem_poisson_cu.cu b/moments/zero/fem_poisson_cu.cu index fcc84bf07e..41f69050c7 100644 --- a/moments/zero/fem_poisson_cu.cu +++ b/moments/zero/fem_poisson_cu.cu @@ -267,16 +267,11 @@ gkyl_fem_poisson_bias_src_kernel(double *rhs_global, struct gkyl_rect_grid grid, // since update_range is a subrange gkyl_sub_range_inv_idx(&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 start = gkyl_range_idx(&range, idx); - int keri = idx_to_inup_ker(range.ndim, num_cells, idx); for (size_t d=0; dl2g[keri](num_cells, idx0, globalidx); - // Apply the RHS source stencil. It's mostly the mass matrix times a - // modal-to-nodal operator times the source, modified by BCs in skin cells. + // Modify the RHS source to enforce biasing of the solution. for (int i=0; iprob_cu, 0); gkyl_fem_poisson_bias_src_kernel<<nblocks, rhsin->nthreads>>>(rhs_cu, up->grid, diff --git a/moments/zero/gkyl_fem_poisson.h b/moments/zero/gkyl_fem_poisson.h index fb84b948a0..99c4847f60 100644 --- a/moments/zero/gkyl_fem_poisson.h +++ b/moments/zero/gkyl_fem_poisson.h @@ -29,7 +29,7 @@ typedef struct gkyl_fem_poisson gkyl_fem_poisson; * @param grid Grid object * @param basis Basis functions of the DG field. * @param bcs Boundary conditions. - * @param bias List of points (1D), lines (2D), planes (3D) to bias. + * @param bias_plane_list List of points (1D), lines (2D), planes (3D) to bias. * @param epsilon_var Permittivity tensor. Defined over the extended range. * @param kSq Squared wave number (factor multiplying phi in Helmholtz eq). * @param is_epsilon_const =true if permittivity is constant in space. diff --git a/moments/zero/gkyl_fem_poisson_bctype.h b/moments/zero/gkyl_fem_poisson_bctype.h index 2f47bb3370..614224063d 100644 --- a/moments/zero/gkyl_fem_poisson_bctype.h +++ b/moments/zero/gkyl_fem_poisson_bctype.h @@ -6,10 +6,10 @@ // Boundary condition types. enum gkyl_poisson_bc_type { GKYL_POISSON_PERIODIC = 0, - GKYL_POISSON_DIRICHLET, // sets the value. - GKYL_POISSON_NEUMANN, // sets the slope normal to the boundary. - GKYL_POISSON_ROBIN, // a combination of dirichlet and neumann. - GKYL_POISSON_DIRICHLET_VARYING, // sets the value, spatially varying. + GKYL_POISSON_DIRICHLET, // Sets the value. + GKYL_POISSON_NEUMANN, // Sets the slope normal to the boundary. + GKYL_POISSON_ROBIN, // A combination of dirichlet and neumann. + GKYL_POISSON_DIRICHLET_VARYING, // Sets the value, spatially varying. }; // Boundary condition values. Dirichlet and Neumann use only one value, @@ -27,6 +27,19 @@ struct gkyl_poisson_bias_plane_list { struct gkyl_poisson_bias_plane *bp; }; +struct gkyl_poisson_bias_line { + // Directions perpendicular to the line and coordinates in those directions + // (in 3D space; for 2x sims value in 3rd direction is ignored). + int perp_dirs[GKYL_MAX_CDIM-1]; + double perp_coords[GKYL_MAX_CDIM-1]; + double val; // Biasing value. +}; + +struct gkyl_poisson_bias_line_list { + int num_bias_line; // Number of bias planes. + struct gkyl_poisson_bias_line *bl; +}; + struct gkyl_poisson_bc { enum gkyl_poisson_bc_type lo_type[GKYL_MAX_CDIM], up_type[GKYL_MAX_CDIM]; struct gkyl_poisson_bc_value lo_value[GKYL_MAX_CDIM], up_value[GKYL_MAX_CDIM]; diff --git a/moments/zero/gkyl_fem_poisson_priv.h b/moments/zero/gkyl_fem_poisson_priv.h index 70fe57a416..7380a20cd8 100644 --- a/moments/zero/gkyl_fem_poisson_priv.h +++ b/moments/zero/gkyl_fem_poisson_priv.h @@ -2244,7 +2244,7 @@ void gkyl_fem_poisson_set_rhs_cu(gkyl_fem_poisson* up, struct gkyl_array *rhsin, * @param rhsin DG field to set as RHS source. */ void -gkyl_fem_poisson_bias_src_cu(gkyl_fem_poisson *up, struct gkyl_array *rhsin); +gkyl_fem_poisson_bias_src_enabled_cu(gkyl_fem_poisson *up, struct gkyl_array *rhsin); /** * Solve the linear problem on the device.