#ifndef QUADRATURE_2D_CC #define QUADRATURE_2D_CC //#include "2d_FE.h" typedef struct { int size; Point* points; double* weights; } Quadrature; Quadrature MIDPOINTS_RULE; void Create_Quadratures() { // 3 point - 2 degree (midpoints) MIDPOINTS_RULE.size = 3; MIDPOINTS_RULE.points = new Point[3]; MIDPOINTS_RULE.weights = new double[3]; MIDPOINTS_RULE.points[0].x = 0.5; MIDPOINTS_RULE.points[0].y = 0; MIDPOINTS_RULE.weights[0] = 1.0/6; MIDPOINTS_RULE.points[1].x = 0.5; MIDPOINTS_RULE.points[1].y = 0.5; MIDPOINTS_RULE.weights[1] = 1.0/6; MIDPOINTS_RULE.points[2].x = 0; MIDPOINTS_RULE.points[2].y = 0.5; MIDPOINTS_RULE.weights[2] = 1.0/6; } void Destroy_Quadratures() { delete MIDPOINTS_RULE.points; delete MIDPOINTS_RULE.weights; } #endif