<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<font face="Times New Roman, serif" size="3">
<div style="margin-top: 5pt; margin-bottom: 5pt; ">Hello</div>
<div style="margin-top: 5pt; margin-bottom: 5pt; ">I tried to implement line integrals in the solutions and I didn't get correct answers compared to other FE-Programs. I reduced the problem and tracked it down to the line integral behavior in Y-direction.</div>
<div style="margin-top: 5pt; margin-bottom: 5pt; ">Attached a modified to the Post-Integral example:</div>
<div style="margin-top: 5pt; margin-bottom: 5pt; ">I try to integrate 1 over the line length s/2 in two cases: A line in X and Y direction.<br>
The expected result should be in both cases s/2. Only in X direction I can observe the the result ;in Y direction the result is zero.<br>
Integration of areas works as expected</div>
<div style="margin-top: 5pt; margin-bottom: 5pt; ">Post_integral.geo:</div>
<div><font face="Courier New, monospace" size="2">s=1;</font></div>
<div><font face="Courier New, monospace" size="2">Point(1) = {0,0,0,s/10};</font></div>
<div><font face="Courier New, monospace" size="2">Point(2) = {s,0,0,s/10};</font></div>
<div><font face="Courier New, monospace" size="2">Point(3) = {2*s,0,0,s/10};</font></div>
<div><font face="Courier New, monospace" size="2">Point(4) = {0,s,0,s/10};</font></div>
<div><font face="Courier New, monospace" size="2">Point(5) = {s,s,0,s/10};</font></div>
<div><font face="Courier New, monospace" size="2">Point(6) = {2*s,s,0,s/10};</font></div>
<div><font face="Courier New, monospace" size="2">Point(7) = {s/4,s/2,0,s/10};</font></div>
<div><font face="Courier New, monospace" size="2">Point(8) = {s*3/4,s/2,0,s/10};</font></div>
<div><font face="Courier New, monospace" size="2">Point(9) = {s/2,s/4,0,s/10};</font></div>
<div><font face="Courier New, monospace" size="2">Point(10)= {s/2,s*3/4,0,s/10};</font></div>
<div><font face="Courier New, monospace" size="2">Point(11)= {s/2,s/2,0,s/10};</font></div>
<div><font face="Courier New, monospace" size="2">Line(1) = {1,2};</font></div>
<div><font face="Courier New, monospace" size="2">Line(2) = {2,3};</font></div>
<div><font face="Courier New, monospace" size="2">Line(3) = {3,6};</font></div>
<div><font face="Courier New, monospace" size="2">Line(4) = {6,5};</font></div>
<div><font face="Courier New, monospace" size="2">Line(5) = {5,4};</font></div>
<div><font face="Courier New, monospace" size="2">Line(6) = {4,1};</font></div>
<div><font face="Courier New, monospace" size="2">Line(7) = {2,5};</font></div>
<div><font face="Courier New, monospace" size="2">Line Loop(8) = {1,7,5,6};</font></div>
<div><font face="Courier New, monospace" size="2">Plane Surface(9) = {8};</font></div>
<div><font face="Courier New, monospace" size="2">Line Loop(10) = {2,3,4,-7};</font></div>
<div><font face="Courier New, monospace" size="2">Plane Surface(11) = {10};</font></div>
<div><font face="Courier New, monospace" size="2">Line(12) = {7,8};</font></div>
<div><font face="Courier New, monospace" size="2">Line(13) = {9,10};</font></div>
<div><font face="Courier New, monospace" size="2">Circle(14) = {7,11,10};</font></div>
<div><font face="Courier New, monospace" size="2">Circle(15) = {10,11,8};</font></div>
<div><font face="Courier New, monospace" size="2">Circle(16) = {8,11,9};</font></div>
<div><font face="Courier New, monospace" size="2">Circle(17) = {9,11,7};</font></div>
<div><font face="Courier New, monospace" size="2"> </font></div>
<div><font face="Courier New, monospace" size="2">Physical Surface(1) = 9; </font></div>
<div><font face="Courier New, monospace" size="2">Physical Surface(2) = 11;</font></div>
<div><font face="Courier New, monospace" size="2">Physical Line(10) = 6; // left</font></div>
<div><font face="Courier New, monospace" size="2">Physical Line(11) = 3; // right</font></div>
<div><font face="Courier New, monospace" size="2">Physical Line(12) = 12; // Line x-direction</font></div>
<div><font face="Courier New, monospace" size="2">Physical Line(13) = 13; // Line y-direction</font></div>
<div><font face="Courier New, monospace" size="2">Physical Line(14) = {14,15,16,17}; // Circle </font></div>
<div><font face="Courier New, monospace" size="2"> </font></div>
<div><font face="Courier New, monospace" size="2"> </font></div>
<div style="margin-top: 5pt; margin-bottom: 5pt; ">Post_integral.pro:</div>
<div><font face="Courier New, monospace" size="2">Group {</font></div>
<div><font face="Courier New, monospace" size="2"> // Domain [0,2]x[0,1]</font></div>
<div><font face="Courier New, monospace" size="2"> // Left half of Omega</font></div>
<div><font face="Courier New, monospace" size="2"> Omega1 = Region[ {1} ];</font></div>
<div><font face="Courier New, monospace" size="2"> // Right half of Omega</font></div>
<div><font face="Courier New, monospace" size="2"> Omega2 = Region[ {2} ];</font></div>
<div><font face="Courier New, monospace" size="2"> </font></div>
<div><font face="Courier New, monospace" size="2"> Omega = Region[ {Omega1,Omega2} ];</font></div>
<div><font face="Courier New, monospace" size="2"> </font></div>
<div><font face="Courier New, monospace" size="2"> // Left and right boundaries</font></div>
<div><font face="Courier New, monospace" size="2"> Gamma1 = Region[ {10} ];</font></div>
<div><font face="Courier New, monospace" size="2"> Gamma2 = Region[ {11} ];</font></div>
<div><font face="Courier New, monospace" size="2"> Gamma3 = Region[ {12} ];</font></div>
<div><font face="Courier New, monospace" size="2"> Gamma4 = Region[ {13} ];</font></div>
<div><font face="Courier New, monospace" size="2"> Gamma5 = Region[ {14} ];</font></div>
<div><font face="Courier New, monospace" size="2"> </font></div>
<div><font face="Courier New, monospace" size="2"> Gamma_All = Region [ {Gamma3,Gamma4,Gamma5} ];</font></div>
<div><font face="Courier New, monospace" size="2">}</font></div>
<div><font face="Courier New, monospace" size="2"> </font></div>
<div><font face="Courier New, monospace" size="2">Jacobian {</font></div>
<div><font face="Courier New, monospace" size="2"> { Name Vol ; Case { { Region All ; Jacobian Vol ; } } }</font></div>
<div><font face="Courier New, monospace" size="2">}</font></div>
<div><font face="Courier New, monospace" size="2"> </font></div>
<div><font face="Courier New, monospace" size="2">Integration {</font></div>
<div><font face="Courier New, monospace" size="2"> { Name Int ; Case { { Type Gauss ; </font></div>
<div><font face="Courier New, monospace" size="2"> Case { { GeoElement Triangle ; NumberOfPoints 3 ; } } } } }</font></div>
<div><font face="Courier New, monospace" size="2"> { Name IntLine ; Case { { Type Gauss ; </font></div>
<div><font face="Courier New, monospace" size="2"> Case { { GeoElement Line ; NumberOfPoints 2 ; } } } } }</font></div>
<div><font face="Courier New, monospace" size="2">}</font></div>
<div><font face="Courier New, monospace" size="2"> </font></div>
<div><font face="Courier New, monospace" size="2">Constraint {</font></div>
<div><font face="Courier New, monospace" size="2"> { Name Dirichlet ;</font></div>
<div><font face="Courier New, monospace" size="2"> Case {</font></div>
<div><font face="Courier New, monospace" size="2"> { Region Gamma1 ; Value -1. ; }</font></div>
<div><font face="Courier New, monospace" size="2"> { Region Gamma2 ; Value 1. ; }</font></div>
<div><font face="Courier New, monospace" size="2"> }</font></div>
<div><font face="Courier New, monospace" size="2"> }</font></div>
<div><font face="Courier New, monospace" size="2">}</font></div>
<div><font face="Courier New, monospace" size="2"> </font></div>
<div><font face="Courier New, monospace" size="2">FunctionSpace {</font></div>
<div><font face="Courier New, monospace" size="2"> { Name H1 ; Type Form0 ; </font></div>
<div><font face="Courier New, monospace" size="2"> BasisFunction {</font></div>
<div><font face="Courier New, monospace" size="2"> { Name sn ; NameOfCoef vn ; Function BF_Node ;</font></div>
<div><font face="Courier New, monospace" size="2"> Support Omega ; Entity NodesOf[ All ] ; }</font></div>
<div><font face="Courier New, monospace" size="2"> }</font></div>
<div><font face="Courier New, monospace" size="2"> Constraint {</font></div>
<div><font face="Courier New, monospace" size="2"> { NameOfCoef vn; EntityType NodesOf ; NameOfConstraint Dirichlet; }</font></div>
<div><font face="Courier New, monospace" size="2"> }</font></div>
<div><font face="Courier New, monospace" size="2"> }</font></div>
<div><font face="Courier New, monospace" size="2">}</font></div>
<div><font face="Courier New, monospace" size="2"> </font></div>
<div><font face="Courier New, monospace" size="2">Formulation {</font></div>
<div><font face="Courier New, monospace" size="2"> { Name Laplace ; Type FemEquation ;</font></div>
<div><font face="Courier New, monospace" size="2"> Quantity { </font></div>
<div><font face="Courier New, monospace" size="2"> { Name v ; Type Local ; NameOfSpace H1 ; }</font></div>
<div><font face="Courier New, monospace" size="2"> }</font></div>
<div><font face="Courier New, monospace" size="2"> Equation {</font></div>
<div><font face="Courier New, monospace" size="2"> Galerkin { [ Dof{d v} , {d v} ] ; In Omega ; Jacobian Vol ; Integration Int ; }</font></div>
<div><font face="Courier New, monospace" size="2"> }</font></div>
<div><font face="Courier New, monospace" size="2"> }</font></div>
<div><font face="Courier New, monospace" size="2">}</font></div>
<div><font face="Courier New, monospace" size="2"> </font></div>
<div><font face="Courier New, monospace" size="2">Resolution {</font></div>
<div><font face="Courier New, monospace" size="2"> { Name Laplace ;</font></div>
<div><font face="Courier New, monospace" size="2"> System {</font></div>
<div><font face="Courier New, monospace" size="2"> { Name A ; NameOfFormulation Laplace ; }</font></div>
<div><font face="Courier New, monospace" size="2"> }</font></div>
<div><font face="Courier New, monospace" size="2"> Operation { </font></div>
<div><font face="Courier New, monospace" size="2"> Generate[A] ; Solve[A] ; SaveSolution[A] ;</font></div>
<div><font face="Courier New, monospace" size="2"> }</font></div>
<div><font face="Courier New, monospace" size="2"> }</font></div>
<div><font face="Courier New, monospace" size="2">}</font></div>
<div><font face="Courier New, monospace" size="2"> </font></div>
<div><font face="Courier New, monospace" size="2">PostProcessing {</font></div>
<div><font face="Courier New, monospace" size="2"> { Name Laplace ; NameOfFormulation Laplace ;</font></div>
<div><font face="Courier New, monospace" size="2"> Quantity {</font></div>
<div><font face="Courier New, monospace" size="2"> { Name v ; Value { Term { [ {v} ] ; In Omega ; Jacobian Vol; } } }</font></div>
<div><font face="Courier New, monospace" size="2"> // defines the integral of v in a generic way, over the whole domain Omega</font></div>
<div><font face="Courier New, monospace" size="2"> { Name intv ; Value { Integral { [ {v} ] ; In Omega ; Jacobian Vol; Integration Int; } } }</font></div>
<div><font face="Courier New, monospace" size="2"> </font></div>
<div><font face="Courier New, monospace" size="2"> // Area</font></div>
<div><font face="Courier New, monospace" size="2"> { Name Area ; Value { Integral { [ 1 ] ; In Omega ; Jacobian Vol; Integration Int; } } }</font></div>
<div><font face="Courier New, monospace" size="2"> // LineLength</font></div>
<div><font face="Courier New, monospace" size="2"> { Name LineLength; Value { Integral { [ 1 ]; In Gamma_All; Jacobian Vol; Integration IntLine; } } }</font></div>
<div><font face="Courier New, monospace" size="2"> }</font></div>
<div><font face="Courier New, monospace" size="2"> }</font></div>
<div><font face="Courier New, monospace" size="2">}</font></div>
<div><font face="Courier New, monospace" size="2"> </font></div>
<div><font face="Courier New, monospace" size="2">PostOperation{</font></div>
<div><font face="Courier New, monospace" size="2"> { Name v ; NameOfPostProcessing Laplace; </font></div>
<div><font face="Courier New, monospace" size="2"> Operation {</font></div>
<div><font face="Courier New, monospace" size="2"> Print[ v , OnElementsOf Omega , File "v.pos" ] ;</font></div>
<div><font face="Courier New, monospace" size="2"> // Integral of v over Omega (should be 0)</font></div>
<div><font face="Courier New, monospace" size="2"> Print[ intv[Omega] , OnGlobal, Format Table, File "Result.txt" ] ;</font></div>
<div><font face="Courier New, monospace" size="2"> // Integral of v over Omega1 (should be -0.5)</font></div>
<div><font face="Courier New, monospace" size="2"> Print[ intv[Omega1] , OnGlobal, Format Table, File > "Result.txt" ] ;</font></div>
<div><font face="Courier New, monospace" size="2"> // Integral of v over Omega2 (should be 0.5)</font></div>
<div><font face="Courier New, monospace" size="2"> Print[ intv[Omega2] , OnGlobal, Format Table, File >"Result.txt" ] ;</font></div>
<div><font face="Courier New, monospace" size="2"> // Area Integral of 1 over Omega1 (should be s^2=1)</font></div>
<div><font face="Courier New, monospace" size="2"> Print[ Area[Omega1] , OnGlobal, Format Table, File >"Result.txt" ] ;</font></div>
<div><font face="Courier New, monospace" size="2"> // Area Integral of 1 over Omega2 (should be s^2=1)</font></div>
<div><font face="Courier New, monospace" size="2"> Print[ Area[Omega2] , OnGlobal, Format Table, File >"Result.txt" ] ;</font></div>
<div><font face="Courier New, monospace" size="2"> // Line Integral of 1 over Gamma3 (should be s/2=0.5)</font></div>
<div><font face="Courier New, monospace" size="2"> Print[ LineLength[Gamma3] , OnGlobal, Format Table, File >"Result.txt" ] ;</font></div>
<div><font face="Courier New, monospace" size="2"> // Line Integral of 1 over Gamma4 (should be s/2=0.5)</font></div>
<div><font face="Courier New, monospace" size="2"> Print[ LineLength[Gamma4] , OnGlobal, Format Table, File >"Result.txt" ] ;</font></div>
<div><font face="Courier New, monospace" size="2"> // Line Integral of 1 over Gamma5 (should be 2*pi*(s/4) = pi/2)</font></div>
<div><font face="Courier New, monospace" size="2"> Print[ LineLength[Gamma5] , OnGlobal, Format Table, File >"Result.txt" ] ; </font></div>
<div><font face="Courier New, monospace" size="2"> }</font></div>
<div><font face="Courier New, monospace" size="2"> }</font></div>
<div><font face="Courier New, monospace" size="2">}</font></div>
<div><font face="Courier New, monospace" size="2"> </font></div>
<div><font face="Arial, sans-serif" size="2">Best</font></div>
<div><font face="Arial, sans-serif" size="2"> </font></div>
<div><font face="Arial, sans-serif" size="2">Oliver</font></div>
<div><font face="Calibri, sans-serif" size="2"> </font></div>
</font>
</body>
</html>