gridap / gridap/Gridap.jl

need a way to loop over quadrature points

Open
#907 11 comments 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
879
Forks
119
Avg merge
6d 3h
Merged PRs (30d)
4

Description

@hammy4815 and I were looking for a lower-level abstraction that gives us access to the quadrature points used when assembling a matrix. (This is for topology optimization where the degrees of freedom are specified on some external grid, not on the FE mesh.)

I think all we need is a API like the following, given a quadratic form `a` and two FEFunctions `u,v` on some mesh `Ω`:
```jl
a(u, v) = ...some quadratic form...
quadratureloop(a, u, v, Ω) do aₓ, x, wₓ
... do something with aₓ(u, v) at the quadrature point x with quadrature weight wₓ ...
end
```
so that, for example, `∫a(u,v)dΩ` could be computed with:
```
integral = 0.0
quadratureloop(a, u, v, Ω) do aₓ, x, wₓ
integral += aₓ * wₓ
end
```
(In our case we want to do something different with the quadrature points and weights, not just an integral)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.