#include #include #include #include static inline void form00_cell_integral_otherwise (double A[2][2] , const double *restrict coords[2] ) { double t0 = fabs((-1 * coords[0][0]) + (1 * coords[1][0])); ; static const double t1[2] = {0.5, 0.5}; static const double t2[2][2] = {{0.788675134594813, 0.211324865405187}, {0.211324865405187, 0.788675134594813}}; for (int ip = 0; ip < 2; ip += 1) { double t3 = (t1[ip] * t0); for (int j = 0; j < 2; j += 1) { for (int k = 0; k < 2; k += 1) { A[j][k] += t3 * t2[ip][j] * t2[ip][k]; } } } } void wrap_form00_cell_integral_otherwise(int start, int end, Mat arg0_0_, int *arg0_0_map0_0, int *arg0_0_map1_0, double *arg1_0, int *arg1_0_map0_0 ) { Mat arg0_0_0 = arg0_0_; double *arg1_0_vec[2]; for ( int n = start; n < end; n++ ) { int i = n; arg1_0_vec[0] = arg1_0 + (arg1_0_map0_0[i * 2 + 0])* 1; arg1_0_vec[1] = arg1_0 + (arg1_0_map0_0[i * 2 + 1])* 1; double buffer_arg0_0[2][2] __attribute__((aligned(16))) = {{0.0}}; form00_cell_integral_otherwise(buffer_arg0_0, arg1_0_vec); MatSetValuesLocal(arg0_0_0, 2, arg0_0_map0_0 + i * 2, 2, arg0_0_map1_0 + i * 2, (const PetscScalar *)buffer_arg0_0, ADD_VALUES);; } }