Hi all,(adsbygoogle = window.adsbygoogle || []).push({});

The context of this problem is as follows: I'm trying to implement a discontinuous finite element method and the formulation calls for the computation of line integrals over the edges of the mesh.

Anyway, more generally, I need to evaluate [itex]\int_{e}f(x,y)ds[/itex], where [itex]e[/itex] is a line segment (corresponding to the edge of a 2D-mesh element). I'm trying to compute this integral numerically using a 1D-quadrature rule on the interval [itex][-1,1][/itex], but I think perhaps my mapping is incorrect.

To begin, let [itex]\mathbf{\hat{x}}_{g}[/itex] be a quadrature point on the interval [itex][-1,1][/itex] (i.e. [itex]\mathbf{\hat{x}}_{g} = (\hat{x}_{g},0)[/itex]) with corresponding quadrature weight [itex]w_{g}[/itex]. Now there exists an affine mapping [itex]\zeta: [-1,1] \to e[/itex]. Thus, [itex]\mathbf{x}_{g} = \zeta(\mathbf{\hat{x}}_{g})[/itex] is on the line segment [itex]e[/itex].

But I'm confused how the integral should look now:

[tex]

\int_{e}f(x,y)ds \approx \sum_{k=1}^{n_{g}}w_{k}f(\mathbf{x}_{g})?

[/tex]

I know if I was trying to actually map the line of integration from [itex]e[/itex] to [itex][-1,1][/itex] then I would need to multiply the integrand by [itex]\zeta'[/itex], the derivative of the transformation, but that's not exactly what I'm trying to do here.

The problem: Using the quadrature rule as given above is actually not correct since my implementation in my code produces the wrong results using this quadrature rule.I'm assuming I'm missing some transformation factor, but am at a loss as to what it should be.

Also, if there is a section of this message board that is more tailored to finite elements and has experience users that can answer specific questions about FEM, I would be extremely grateful to be pointed in the right direction!

**Physics Forums | Science Articles, Homework Help, Discussion**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Coordinate transformation for line integrals; quadrature rules

**Physics Forums | Science Articles, Homework Help, Discussion**