Fixed Eigen 3.3 compatibility

This commit is contained in:
babrodtk 2015-08-31 14:45:03 +02:00
parent 395c12a2d5
commit 466f1947a3
2 changed files with 6 additions and 3 deletions

View File

@ -228,7 +228,8 @@ try
return EXIT_FAILURE;
}
// const Eigen::VectorXd dp = solver.solve(residual.value().matrix());
const V dp = solver.solve(residual.value().matrix()).array();
ADB::V residual_v = residual.value();
const V dp = solver.solve(residual_v.matrix()).array();
if (solver.info() != Eigen::Success) {
std::cerr << "Pressure/flow solve failure\n";
return EXIT_FAILURE;
@ -285,7 +286,8 @@ try
std::cerr << "Transport Jacobian decomposition error\n";
return EXIT_FAILURE;
}
const V ds = solver.solve(transport_residual.value().matrix()).array();
ADB::V transport_residual_v = transport_residual.value();
const V ds = solver.solve(transport_residual_v.matrix()).array();
if (solver.info() != Eigen::Success) {
std::cerr << "Transport solve failure\n";
return EXIT_FAILURE;

View File

@ -1445,7 +1445,8 @@ namespace detail {
Sp Jn0;
Jn[0].toSparse(Jn0);
const Eigen::SparseLU< Sp > solver(Jn0);
const Eigen::VectorXd& dx = solver.solve(total_residual.value().matrix());
ADB::V total_residual_v = total_residual.value();
const Eigen::VectorXd& dx = solver.solve(total_residual_v.matrix());
assert(dx.size() == (well_state.numWells() * (well_state.numPhases()+1)));
updateWellState(dx.array(), well_state);
updateWellControls(well_state);