changed: ignore singular points in evalSolution
instead of setting gradient to 0
This commit is contained in:
parent
e9ef9039bb
commit
1f43156434
@ -1171,15 +1171,11 @@ bool ASMs2Dmx::evalSolution (Matrix& sField, const IntegrandBase& integrand,
|
||||
// Compute Jacobian inverse of the coordinate mapping and
|
||||
// basis function derivatives w.r.t. Cartesian coordinates
|
||||
fe.detJxW = utl::Jacobian(Jac,fe.grad(geoBasis),Xtmp,dNxdu[geoBasis-1]);
|
||||
if (fe.detJxW == 0.0) continue; // skip singular points
|
||||
|
||||
for (size_t b = 1; b <= m_basis.size(); b++)
|
||||
if (b != (size_t)geoBasis)
|
||||
{
|
||||
if (fe.detJxW == 0.0)
|
||||
fe.grad(b).clear();
|
||||
else
|
||||
fe.grad(b).multiply(dNxdu[b-1],Jac);
|
||||
}
|
||||
fe.grad(b).multiply(dNxdu[b-1],Jac);
|
||||
|
||||
// Cartesian coordinates of current integration point
|
||||
utl::Point X4(Xtmp*fe.basis(geoBasis),{fe.u,fe.v});
|
||||
|
@ -526,15 +526,11 @@ bool ASMs2DmxLag::evalSolution (Matrix& sField, const IntegrandBase& integrand,
|
||||
|
||||
// Compute the Jacobian inverse
|
||||
fe.detJxW = utl::Jacobian(Jac,fe.grad(geoBasis),Xnod,dNxdu[geoBasis-1]);
|
||||
if (fe.detJxW == 0.0) continue; // skip singular points
|
||||
|
||||
for (size_t b = 1; b <= nxx.size(); b++)
|
||||
if (b != (size_t)geoBasis)
|
||||
{
|
||||
if (fe.detJxW == 0.0)
|
||||
fe.grad(b).clear();
|
||||
else
|
||||
fe.grad(b).multiply(dNxdu[b-1],Jac);
|
||||
}
|
||||
fe.grad(b).multiply(dNxdu[b-1],Jac);
|
||||
|
||||
// Now evaluate the solution field
|
||||
if (!integrand.evalSol(solPt,fe,Xnod*fe.basis(geoBasis),MNPC[iel-1],elem_size,nb))
|
||||
|
@ -1213,15 +1213,11 @@ bool ASMs3Dmx::evalSolution (Matrix& sField, const IntegrandBase& integrand,
|
||||
// Compute Jacobian inverse of the coordinate mapping and
|
||||
// basis function derivatives w.r.t. Cartesian coordinates
|
||||
fe.detJxW = utl::Jacobian(Jac,fe.grad(geoBasis),Xtmp,dNxdu[geoBasis-1]);
|
||||
if (fe.detJxW == 0.0) continue; // skip singular points
|
||||
|
||||
for (size_t b = 1; b <= m_basis.size(); b++)
|
||||
if (b != (size_t)geoBasis)
|
||||
{
|
||||
if (fe.detJxW == 0.0)
|
||||
fe.grad(b).clear();
|
||||
else
|
||||
fe.grad(b).multiply(dNxdu[b-1],Jac);
|
||||
}
|
||||
fe.grad(b).multiply(dNxdu[b-1],Jac);
|
||||
|
||||
// Cartesian coordinates of current integration point
|
||||
utl::Point X4(Xtmp * fe.basis(geoBasis),{fe.u,fe.v,fe.w});
|
||||
|
@ -594,15 +594,11 @@ bool ASMs3DmxLag::evalSolution (Matrix& sField, const IntegrandBase& integrand,
|
||||
|
||||
// Compute the Jacobian inverse
|
||||
fe.detJxW = utl::Jacobian(Jac,fe.grad(geoBasis),Xnod,dNxdu[geoBasis-1]);
|
||||
if (fe.detJxW == 0.0) continue; // skip singular points
|
||||
|
||||
for (size_t b = 1; b <= nxx.size(); b++)
|
||||
if (b != (size_t)geoBasis)
|
||||
{
|
||||
if (fe.detJxW == 0.0)
|
||||
fe.grad(b).clear();
|
||||
else
|
||||
fe.grad(b).multiply(dNxdu[b-1],Jac);
|
||||
}
|
||||
fe.grad(b).multiply(dNxdu[b-1],Jac);
|
||||
|
||||
// Now evaluate the solution field
|
||||
if (!integrand.evalSol(solPt,fe,Xnod*fe.basis(geoBasis),MNPC[iel-1],elem_size,nb))
|
||||
|
Loading…
Reference in New Issue
Block a user