/* 領域での積分点数 */ void WH_Fem__NumInt__Gauss2D__Quad__nPoints (int order, int *OUT__nPoints) /* 入力引数: order は整数で、ガウス積分の次数 出力引数: OUT__nPoints は整数で、積分点数 */ { int nLinePoints; WH_Fem__NumInt__Gauss1D__nPoints (order, &nLinePoints); *OUT__nPoints = nLinePoints * nLinePoints; } /* 領域での積分点の自然座標 */ void WH_Fem__NumInt__Gauss2D__Quad__whV_xi_Ip (int order, int Ip, double OUT__whV_xi_Ip[2]) /* 入力引数: order は整数で、ガウス積分の次数 Ip は整数で、積分点ID 出力引数: OUT__whV_xi_Ip はベクトルで、自然座標 */ { int nLinePoints; int Ip_xi, Ip_eta; double xi, eta; WH_Fem__NumInt__Gauss1D__nPoints (order, &nLinePoints); Ip_xi = Ip % nLinePoints; Ip_eta = Ip / nLinePoints; WH_Fem__NumInt__Gauss1D__xi_Ip (order, Ip_xi, &xi); WH_Fem__NumInt__Gauss1D__xi_Ip (order, Ip_eta, &eta); OUT__whV_xi_Ip[0] = xi; OUT__whV_xi_Ip[1] = eta; } /* 領域での積分点の重み係数 */ void WH_Fem__NumInt__Gauss2D__Quad__w_Ip (int order, int Ip, double *OUT__w_Ip) /* 入力引数: order は整数で、ガウス積分の次数 Ip は整数で、積分点ID 出力引数: OUT__w_Ip はスカラーで、重み係数 */ { int nLinePoints; int Ip_xi, Ip_eta; double w_xi, w_eta; WH_Fem__NumInt__Gauss1D__nPoints (order, &nLinePoints); Ip_xi = Ip % nLinePoints; Ip_eta = Ip / nLinePoints; WH_Fem__NumInt__Gauss1D__w_Ip (order, Ip_xi, &w_xi); WH_Fem__NumInt__Gauss1D__w_Ip (order, Ip_eta, &w_eta); *OUT__w_Ip = w_xi * w_eta; } /* 境界稜線上での積分点数 */ void WH_Fem__NumInt__Gauss2D__Quad__nPoints_Iedge (int order, int Iedge, int *OUT__nPoints) /* 入力引数: order は整数で、ガウス積分の次数 Iedge は整数で、要素辺ID 出力引数: OUT__nPoints は整数で、積分点数 */ { WH_Fem__NumInt__Gauss1D__nPoints (order, OUT__nPoints); } /* 境界稜線上での積分点の自然座標 */ void WH_Fem__NumInt__Gauss2D__Quad__whV_xi_IedgeIp (int order, int Iedge, int Ip, double OUT__whV_xi_Ip[2]) /* 入力引数: order は整数で、ガウス積分の次数 Iedge は整数で、要素辺ID Ip は整数で、積分点ID 出力引数: OUT__whV_xi_Ip はベクトルで、自然座標 */ { double xi_line; WH_Fem__NumInt__Gauss1D__xi_Ip (order, Ip, &xi_line); switch (Iedge) { case 3: /* -xi */ OUT__whV_xi_Ip[0] = -1.0; OUT__whV_xi_Ip[1] = xi_line; break; case 1: /* +xi */ OUT__whV_xi_Ip[0] = 1.0; OUT__whV_xi_Ip[1] = xi_line; break; case 0: /* -eta */ OUT__whV_xi_Ip[0] = xi_line; OUT__whV_xi_Ip[1] = -1.0; break; case 2: /* +eta */ OUT__whV_xi_Ip[0] = xi_line; OUT__whV_xi_Ip[1] = 1.0; break; default: assert(0); break; } } /* 境界稜線上での積分点の重み係数 */ void WH_Fem__NumInt__Gauss2D__Quad__w_IedgeIp (int order, int Iedge, int Ip, double *OUT__w_Ip) /* 入力引数: order は整数で、ガウス積分の次数 Iedge は整数で、要素辺ID Ip は整数で、積分点ID 出力引数: OUT__w_Ip はスカラーで、重み係数 */ { WH_Fem__NumInt__Gauss1D__w_Ip (order, Ip, OUT__w_Ip); }