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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user