diff --git a/src/SIM/SIMbase.C b/src/SIM/SIMbase.C index 140020eb..599687fc 100644 --- a/src/SIM/SIMbase.C +++ b/src/SIM/SIMbase.C @@ -2354,7 +2354,9 @@ bool SIMbase::project (Matrix& ssol, const Vector& psol, if (myModel[i]->empty()) continue; // skip empty patches // Extract the primary solution control point values for this patch - extractPatchSolution(myProblem,Vectors(1,psol),i); + myProblem->initResultPoints(time.t); + if (!this->extractPatchSolution(myProblem,Vectors(1,psol),i)) + return false; // Initialize material properties for this patch in case of multiple regions const_cast(this)->setPatchMaterial(i+1); diff --git a/src/SIM/SIMgeneric.C b/src/SIM/SIMgeneric.C index 90fb98b6..ad46015e 100644 --- a/src/SIM/SIMgeneric.C +++ b/src/SIM/SIMgeneric.C @@ -47,13 +47,14 @@ Vector SIMgeneric::getSolution (const Vector& psol, const double* par, return tmpVal.getColumn(1); } -int SIMgeneric::evalPoint(const double* xi, Vec3& X, double* param, int patch) const -{ - ASMbase *pch = getPatch(patch-1); - double dummy[2]; - if(param == nullptr) - return pch->evalPoint(xi, dummy, X); - else - return pch->evalPoint(xi, param, X); +int SIMgeneric::evalPoint (const double* xi, Vec3& X, double* param, + int patch) const +{ + patch = this->getLocalPatchIndex(patch); + if (patch < 1 || (size_t)patch > myModel.size()) + return -1; + + double dummy[3]; + return myModel[patch-1]->evalPoint(xi, param ? param : dummy, X); } diff --git a/src/SIM/SIMgeneric.h b/src/SIM/SIMgeneric.h index ad32b662..f3fbcec4 100644 --- a/src/SIM/SIMgeneric.h +++ b/src/SIM/SIMgeneric.h @@ -50,10 +50,10 @@ public: //! \param[in] xi Dimensionless parameters in range [0,1] of the point //! \param[out] X The Cartesian coordinates of the point //! \param[out] param The parameters of the point in the knot-span domain - //! \param[in] patch The patch to evaluate - //! \return 0 if the evaluation went good - int evalPoint(const double* xi, Vec3& X, - double* param=nullptr, int patch = 1) const; + //! \param[in] patch 1-based patch index contining the evaluation point + //! \return Local node number within the patch that matches the point + int evalPoint(const double* xi, Vec3& X, + double* param = nullptr, int patch = 1) const; }; #endif