HyTeG form generator
Let's collect requirements and issues regarding the new HFG forms and their integration.
I think it is worthwhile to have a standard set of kernels for all forms that might be used regularly. That means we must somehow decide on a default quadrature rule for each of those default kernels.
Feel free to complete and extend this table. Each line represents a generated file/class. All forms are always generated for 2D and 3D (let's see how we get a consistent naming scheme for cases like the epsilon operator). Note that exact integration tends to significantly increase the generator's run time. So especially for 3D we might want to choose a quadrature rule for now (let's hope to get it sped up via pypy)
name | trial, test | form | blending | quadrature degree (or exact) for (2D, 3D) | implemented in HFG (yes, no, or ?) |
---|---|---|---|---|---|
P1DiffusionAffine | p1, p1 | diffusion (cc) | no | exact, 2 | yes |
P2DiffusionAffine | p2, p2 | diffusion (cc) | no | exact, 2 | yes |
P1DiffusionBlending | p1, p1 | diffusion (cc) | yes | 3, 3 | yes |
P2DiffusionBlending | p2, p2 | diffusion (cc) | yes | 3, 3 | yes |
P1MassAffine | p1, p1 | mass | no | exact, exact | yes |
P2MassAffine | p2, p2 | mass | no | exact, exact | yes |
P1MassBlending | p1, p1 | mass | yes | 4, 4 | yes |
P2MassBlending | p2, p2 | mass | yes | 4, 4 | yes |
P1DivKGradAffine | p1, p1 | \text{div}\left(k\ \text{grad}(u)\right),\quad k \in \mathbb{R} |
no | 3, 3 | yes |
P2DivKGradAffine | p2, p2 | \text{div}\left(k\ \text{grad}(u)\right),\quad k \in \mathbb{R} |
no | 4, 4 | yes |
Epsilon | (p1, p1), (p2, p2) | \text{div}\left[\mu\left(\text{grad}(u) + \text{grad}(u)^\top \right)\right] |
yes | 2,2 (for both p1 and p2) and also 3 (for p2 in 3D with blending and \mu ) |
yes |
FullStokes | (p1, p1), (p2, p2) | \text{div}\left[\mu\left(\text{grad}(u) + \text{grad}(u)^\top \right)\right] - \frac{2}{3}\text{grad}\left[\mu\,\text{div}(u)\right] |
yes | 1,1 for p1 and 3,3 for p2 | yes |
Divergence | (p1, p1), (p2, p2), (p2, p1) | \text{div}(u) |
yes | 1,1 for p1-to-p1 and 2,2 for p2-to-p1 | yes (but not for p2-to-p2) |
Gradient | (p1, p1), (p2, p2), (p1, p2) | \text{grad}(p) |
yes | 1,1 for p1-to-p1 and 2,2 for p1-to-p2 | yes (but not for p2-to-p2) |
PSPG | (p1, p1) | -\int_\Omega\tau(\text{grad}(p), \text{grad}(q))\,dx |
no | 2,2 | yes |
Proposed file/naming scheme:
forms/p2/FormP2DiffusionAffine_2dq2_3dq4.hpp
?
forms/p2top1/FormP2P1DivBlending_x_q5.hpp