Description
In Code/Source/solver/nn_elem_props.h, the flag mshType::lshpF is set to indicate whether shape functions are linear (including wedge elements). This flag is then used in several places throughout the code to decide whether the derivative of the shape functions is constant across the element or needs to be computed per Gauss point. This is true for LIN1, TRI3, and TET4 elements but not for WDG elements.
for (int g = 0; g < lM.nG; g++) {
if (g == 0 || !lM.lShpF) {
nn::gnn(eNoN, nsd, nsd, Nx_g, xl, Nx, Jac, ksix); // Nx and Jac
}
double w = lM.w(g) * Jac;
...
}
This bug appears 35 times in the codebase, and there are currently no wedge element test cases to catch it.
| file |
line number |
post.cpp |
263, 433, 581, 678, 762, 921, 1775, 2060 |
fluid.cpp |
634, 642, 706, 715 |
fsi.cpp |
181, 189, 281, 290 |
all_fun.cpp |
390, 589, 656 |
stokes.cpp |
137, 169, 178 |
ustruct.cpp |
330, 363, 371 |
cep.cpp |
490 |
cmm.cpp |
876 |
eq_assem.cpp |
248 |
heatf.cpp |
112 |
heats.cpp |
89 |
Integrator.cpp |
1171 |
l_elas.cpp |
112 |
mesh.cpp |
114 |
set_bc.cpp |
1416 |
sv_struct.cpp |
297 |
Reproduction
There are no wedge element test cases to reproduce this bug.
Expected behavior
Either a new flag should be added to indicate that an element has a constant shape function gradient or these locations in the code should be gated on element type rather than lshpF
Additional context
No response
Code of Conduct
Description
In
Code/Source/solver/nn_elem_props.h, the flagmshType::lshpFis set to indicate whether shape functions are linear (including wedge elements). This flag is then used in several places throughout the code to decide whether the derivative of the shape functions is constant across the element or needs to be computed per Gauss point. This is true forLIN1,TRI3, andTET4elements but not forWDGelements.This bug appears 35 times in the codebase, and there are currently no wedge element test cases to catch it.
post.cppfluid.cppfsi.cppall_fun.cppstokes.cppustruct.cppcep.cppcmm.cppeq_assem.cppheatf.cppheats.cppIntegrator.cppl_elas.cppmesh.cppset_bc.cppsv_struct.cppReproduction
There are no wedge element test cases to reproduce this bug.
Expected behavior
Either a new flag should be added to indicate that an element has a constant shape function gradient or these locations in the code should be gated on element type rather than
lshpFAdditional context
No response
Code of Conduct