From: Peter Schaefer Date: Wed, 20 Mar 2013 17:14:35 +0000 (+0100) Subject: [src] angefangen Templates einzubetten X-Git-Url: https://git.leopard-lacewing.eu/?a=commitdiff_plain;h=76df542eff49c9b77fe71fa6a5308b3f07934acb;p=bacc.git [src] angefangen Templates einzubetten --- diff --git a/src/slpRectangle.cpp b/src/slpRectangle.cpp index 962762b..20c206c 100644 --- a/src/slpRectangle.cpp +++ b/src/slpRectangle.cpp @@ -275,6 +275,45 @@ double inline G_AY1Y2(double p, double y1, double y2, double x1, double x2, double inline Gs_AX2Y1Y2(double p, double y1, double y2, double x1, double x2, double l) { double sol = 0; + mexPrintf("warning: Gs_AX2Y1Y2 nicht implementiert!"); + return sol; +} + +template +double Q2(double a, double b) { + double sol = 0; + + for (int i = 0; i < GAUSS_SIZE[quad]; ++i) { + for (int j = 0; j < GAUSS_SIZE[quad]; ++j) { + sol += f(a * GAUSS_NODES[quad][i].n, b * GAUSS_NODES[quad][j].n) * a + * b * GAUSS_NODES[quad][i].w * GAUSS_NODES[quad][j].w; + } + } + + return sol; +} + +template +double Q4(double a, double b, double c, double d) { + //Fall 0 + + double sol = 0; + int i, j, k, l; + + for (i = 0; i < GAUSS_SIZE[quad]; ++i) { + for (j = 0; j < GAUSS_SIZE[quad]; ++j) { + for (k = 0; k < GAUSS_SIZE[quad]; ++k) { + for (l = 0; l < GAUSS_SIZE[quad]; ++l) { + sol += f(a * GAUSS_NODES[quad][i].n, + b * GAUSS_NODES[quad][j].n, + c * GAUSS_NODES[quad][k].n, + d * GAUSS_NODES[quad][l].n) * a * b * c * d + * GAUSS_NODES[quad][i].w * GAUSS_NODES[quad][j].w + * GAUSS_NODES[quad][k].w * GAUSS_NODES[quad][l].w; + } + } + } + } return sol; } @@ -350,8 +389,8 @@ double inline F_ort(double x1, double x2, double y2, double y3, double d1, }*/ +template double inline apply0Int4( - double (*f)(double, double, double, double, double, double, double), double b, double d, double t, double v, double d1, double d2, double d3) { @@ -365,9 +404,8 @@ double inline apply0Int4( - f(0, 0, 0, v, d1, d2, d3) + f(0, 0, 0, 0, d1, d2, d3); } - +template double inline apply0Int2( - double (*f)(double, double, double, double, double, double, double), double b, double d, double t, double v, double d1, double d2, double d3) { @@ -379,7 +417,7 @@ double inline apply0Int2( // Berechnet das eigentliche Integral fuer parallele Elemente voll Analytisch double calcParIntA(double b, double d, double t, double v, double d1, double d2, double d3) { - return apply0Int4(F_par, b, d, t, v, d1, d2, d3); + return apply0Int4(b, d, t, v, d1, d2, d3); } @@ -406,6 +444,7 @@ sol += G_AY1Y2(-0.5, t + d1, v + d2, b * GAUSS_NODES[quad][i].n, } return sol; +// return Q2<>(b,d); } @@ -481,7 +520,7 @@ double calcParIntQY1(double b, double d, double t, double v, double d1, //Fall 4 double sol = 0; - + mexPrintf("warning: calcParIntQY1 nicht implementiert!"); return 0; ///ACHTUNG noch Falsch } @@ -515,7 +554,7 @@ sol += f_A(b * GAUSS_NODES[quad][i].n, double calcOrtIntA(double b, double d, double t, double v, double d1, double d2, double d3) { - return apply0Int4(F_ort, b, d, t, v, d1, d2, d3); + return apply0Int4(b, d, t, v, d1, d2, d3); }