add some missing pointer checks
This commit is contained in:
@@ -851,7 +851,7 @@ int ASMs3DLag::evalPoint (const double* xi, double* param, Vec3& X) const
|
||||
param[d] = (1.0-xi[d])*svol->startparam(d) + xi[d]*svol->endparam(d);
|
||||
else
|
||||
param[d] = xi[d];
|
||||
if (!this->getGridParameters(u[d],d,svol->order(d)-1)) return -3;
|
||||
if (svol && !this->getGridParameters(u[d],d,svol->order(d)-1)) return -3;
|
||||
}
|
||||
|
||||
// Search for the closest node
|
||||
|
||||
@@ -1125,7 +1125,7 @@ bool SIMinput::refine (const LR::RefineData& prm,
|
||||
}
|
||||
|
||||
// Single patch models only pass refinement call to the ASM level
|
||||
if (myModel.size() == 1)
|
||||
if (myModel.size() == 1 && pch)
|
||||
return (isRefined = pch->refine(prm,sol,fName));
|
||||
|
||||
if (!prm.errors.empty()) // refinement by true_beta
|
||||
|
||||
@@ -67,7 +67,10 @@ Real SineFunc::deriv (Real x) const
|
||||
Real ConstTimeFunc::evaluate (const Vec3& X) const
|
||||
{
|
||||
const Vec4* Xt = dynamic_cast<const Vec4*>(&X);
|
||||
return (*tfunc)(Xt ? Xt->t : Real(0));
|
||||
if (Xt)
|
||||
return (*tfunc)(Xt->t);
|
||||
else
|
||||
return (*tfunc)(Real(0));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user