Bugfix: set ScaleIntegrated before calling Eval with IntegratedGLL basis

Because the Poly_1D::Basis1D are cached and shared between finite element
spaces/collections, the *same* Basis object can be used in finite elements with
different map types (e.g. VALUE, INTEGRAL, H_CURL, or H_DIV). This means that
setting ScaleIntegrated when the map type is set will not always give correct
results. To fix this, we need to make sure that ScaleIntegrated is set correctly
before every call to EvalIntegrated.
This commit is contained in:
Will Pazner
2022-04-15 11:33:31 -07:00
parent 5967224259
commit af02170c00
3 changed files with 14 additions and 0 deletions
+4
View File
@@ -322,6 +322,7 @@ void ND_HexahedronElement::CalcVShape(const IntegrationPoint &ip,
cbasis1d.Eval(ip.x, shape_cx, dshape_cx);
cbasis1d.Eval(ip.y, shape_cy, dshape_cy);
cbasis1d.Eval(ip.z, shape_cz, dshape_cz);
obasis1d.ScaleIntegrated(false);
obasis1d.EvalIntegrated(dshape_cx, shape_ox);
obasis1d.EvalIntegrated(dshape_cy, shape_oy);
obasis1d.EvalIntegrated(dshape_cz, shape_oz);
@@ -409,6 +410,7 @@ void ND_HexahedronElement::CalcCurlShape(const IntegrationPoint &ip,
cbasis1d.Eval(ip.z, shape_cz, dshape_cz);
if (obasis1d.IsIntegratedType())
{
obasis1d.ScaleIntegrated(false);
obasis1d.EvalIntegrated(dshape_cx, shape_ox);
obasis1d.EvalIntegrated(dshape_cy, shape_oy);
obasis1d.EvalIntegrated(dshape_cz, shape_oz);
@@ -661,6 +663,7 @@ void ND_QuadrilateralElement::CalcVShape(const IntegrationPoint &ip,
{
cbasis1d.Eval(ip.x, shape_cx, dshape_cx);
cbasis1d.Eval(ip.y, shape_cy, dshape_cy);
obasis1d.ScaleIntegrated(false);
obasis1d.EvalIntegrated(dshape_cx, shape_ox);
obasis1d.EvalIntegrated(dshape_cy, shape_oy);
}
@@ -721,6 +724,7 @@ void ND_QuadrilateralElement::CalcCurlShape(const IntegrationPoint &ip,
cbasis1d.Eval(ip.y, shape_cy, dshape_cy);
if (obasis1d.IsIntegratedType())
{
obasis1d.ScaleIntegrated(false);
obasis1d.EvalIntegrated(dshape_cx, shape_ox);
obasis1d.EvalIntegrated(dshape_cy, shape_oy);
}