Skip to content
Snippets Groups Projects
Commit c24c6073 authored by Ian Bell's avatar Ian Bell
Browse files

Another return attempt

parent c6a3c581
No related branches found
No related tags found
No related merge requests found
...@@ -79,7 +79,7 @@ public: ...@@ -79,7 +79,7 @@ public:
}; };
template<typename Residual, typename Scalar> template<typename Residual, typename Scalar>
auto do_pure_VLE_T(Residual &resid, Scalar rhoL, Scalar rhoV, int maxiter) { Eigen::ArrayXd do_pure_VLE_T(Residual &resid, Scalar rhoL, Scalar rhoV, int maxiter) {
auto rhovec = (Eigen::ArrayXd(2) << rhoL, rhoV).finished(); auto rhovec = (Eigen::ArrayXd(2) << rhoL, rhoV).finished();
auto r0 = resid.call(rhovec); auto r0 = resid.call(rhovec);
auto J = resid.Jacobian(rhovec); auto J = resid.Jacobian(rhovec);
...@@ -99,12 +99,11 @@ auto do_pure_VLE_T(Residual &resid, Scalar rhoL, Scalar rhoV, int maxiter) { ...@@ -99,12 +99,11 @@ auto do_pure_VLE_T(Residual &resid, Scalar rhoL, Scalar rhoV, int maxiter) {
} }
rhovec = rhovecnew; rhovec = rhovecnew;
} }
Eigen::ArrayXd r = (Eigen::ArrayXd(2) << rhovec[0], rhovec[1]).finished(); return (Eigen::ArrayXd(2) << rhovec[0], rhovec[1]).finished();
return r;
} }
template<typename Model, typename Scalar> template<typename Model, typename Scalar>
auto pure_VLE_T(const Model& model, Scalar T, Scalar rhoL, Scalar rhoV, int maxiter) { Eigen::ArrayXd pure_VLE_T(const Model& model, Scalar T, Scalar rhoL, Scalar rhoV, int maxiter) {
auto res = IsothermPureVLEResiduals(model, T); auto res = IsothermPureVLEResiduals(model, T);
return do_pure_VLE_T(res, rhoL, rhoV, maxiter); return do_pure_VLE_T(res, rhoL, rhoV, maxiter);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment