Skip to content

Integrand function inputs - #4

Merged
mrhardman merged 5 commits into
mainfrom
integrand_function_inputs
Jan 7, 2026
Merged

Integrand function inputs#4
mrhardman merged 5 commits into
mainfrom
integrand_function_inputs

Conversation

@mrhardman

@mrhardman mrhardman commented Jan 5, 2026

Copy link
Copy Markdown
Collaborator

Permit non-polynomial kernel functions in the construction of the finite element matrices.

This PR permits the calculation of matrices of the form

$$A_{ij} = \int^1_{-1} l_i(z) l_j(z) \rho(s z + c) s d z$$ $$B_{ij} = \frac{1}{s}\int^1_{-1} l_i(z) \frac{d l_j(z)}{d z} \rho(s z + c) s d z$$

(and the transpose $B_{ji}$) and

$$C_{ij} = \frac{1}{s^2}\int^1_{-1} \frac{d l_i(z)}{d z} \frac{d l_j(z)}{d z} \rho(s z + c) s d z.$$

The additional feature is the kernel function $\rho(x)$ with $x = s z + c$, and $z$ the reference coordinate in $[-1,1]$, and $s$ and $c$ the scale and shift factors, respectively. We specify the kernel function as an optional argument, e.g.,

coordinate = ElementCoordinates(x,scale,shift)
M = finite_element_matrix(lagrange_x,lagrange_x,coordinate,
            kernel_function=(v -> rho(v)),additional_quadrature_points=n)

where the integer parameter additional_quadrature_points permits the user to increase the number of Gauss-Legendre quadrature points to compensate for the increased complexity of the integrand due to rho(v).

…ix()`. The functions passed in must be expressed in the physical coordinate `v = s z + c` rather than the reference coordinate `z` on the element which has a range [-1,1].
@mrhardman
mrhardman merged commit 20c8d07 into main Jan 7, 2026
2 checks passed
@mrhardman
mrhardman deleted the integrand_function_inputs branch January 7, 2026 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant