Skip to content

Commit

Permalink
Fixed a bug for the extrapolation in line, quad or hex element
Browse files Browse the repository at this point in the history
  • Loading branch information
wenqing committed Jun 24, 2016
1 parent 7f61caa commit b1b0c8c
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions FEM/fem_ele.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1396,17 +1396,19 @@ void CElement::SetExtropoGaussPoints(const int i)
double CElement::CalcXi_p()
{
MshElemType::type ElementType = MeshElement->GetElementType();
if (ElementType == MshElemType::LINE || ElementType == MshElemType::QUAD || ElementType == MshElemType::HEXAHEDRON)
Xi_p = 0.0;
if ( ElementType == MshElemType::LINE
|| ElementType == MshElemType::QUAD
|| ElementType == MshElemType::QUAD8
|| ElementType == MshElemType::HEXAHEDRON)
{
double r = .0;
for (gp = 0; gp < nGauss; gp++)
{
r = MXPGaussPkt(nGauss, gp);
if (fabs(r) > Xi_p)
Xi_p = fabs(r);
const double r = fabs(MXPGaussPkt(nGauss, gp));
if (r > Xi_p)
Xi_p = r;
}
r = 1.0 / Xi_p;
Xi_p = r;
Xi_p = 1.0 / Xi_p;
return Xi_p;
}
else
Expand Down

0 comments on commit b1b0c8c

Please sign in to comment.