From 88c7b84f4ec093523464eb116a96eb0353745d6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Atgeirr=20Fl=C3=B8=20Rasmussen?= Date: Tue, 12 Jun 2012 11:16:43 +0200 Subject: [PATCH] Removed unused code. --- opm/core/pressure/IncompTpfa.cpp | 120 +------------------------------ 1 file changed, 1 insertion(+), 119 deletions(-) diff --git a/opm/core/pressure/IncompTpfa.cpp b/opm/core/pressure/IncompTpfa.cpp index 2448b8b1c..6f10e44bd 100644 --- a/opm/core/pressure/IncompTpfa.cpp +++ b/opm/core/pressure/IncompTpfa.cpp @@ -427,126 +427,8 @@ namespace Opm soln.well_flux = &well_state.perfRates()[0]; soln.well_press = &well_state.bhp()[0]; } - ifs_tpfa_press_flux(gg, &forces_, &trans_[0], h_, &soln); - - } - -#if 0 - void IncompTpfa::solveIncrement(const std::vector& totmob, - const std::vector& omega, - const std::vector& src, - const std::vector& wdp, - const FlowBoundaryConditions* bcs, - const std::vector& porevol, - const std::vector& rock_comp, - const std::vector& prev_pressure, - const std::vector& initial_porevol, - const double dt, - std::vector& pressure_increment) - - { - UnstructuredGrid* gg = const_cast(&grid_); - tpfa_eff_trans_compute(gg, &totmob[0], &htrans_[0], &trans_[0]); - - if (!omega.empty()) { - if (gpress_.empty()) { - THROW("Nozero omega argument given, but gravity was null in constructor."); - } - mim_ip_density_update(gg->number_of_cells, gg->cell_facepos, - &omega[0], - &gpress_[0], &gpress_omegaweighted_[0]); - } else { - if (!gpress_.empty()) { - THROW("Empty omega argument given, but gravity was non-null in constructor."); - } - } - - ifs_tpfa_forces F = { NULL, NULL, wells_, NULL, NULL }; - if (! src.empty()) { F.src = &src[0]; } - F.bc = bcs; - F.totmob = &totmob[0]; - if (! wdp.empty()) { F.wdp = &wdp[0]; } - - bool ok = true; - if (rock_comp.empty()) { - ok = ifs_tpfa_assemble(gg, &F, &trans_[0], &gpress_omegaweighted_[0], h_); - } else { - ok = ifs_tpfa_assemble_comprock_increment(gg, &F, &trans_[0], &gpress_omegaweighted_[0], - &porevol[0], &rock_comp[0], dt, &prev_pressure[0], - &initial_porevol[0], h_); - } - if (!ok) { - THROW("Failed assembling pressure system."); - } - - - linsolver_.solve(h_->A, h_->b, &pressure_increment[0]); - - } - - void IncompTpfa::setTolerance(const double tol) - { - linsolver_.setTolerance(tol); - } - - double IncompTpfa::getTolerance() const { - return linsolver_.getTolerance(); + ifs_tpfa_press_flux(gg, &forces_, &trans_[0], h_, &soln); // TODO: Check what parts of h_ are used here. } - void IncompTpfa::computeFaceFlux(const std::vector& totmob, - const std::vector& omega, - const std::vector& src, - const std::vector& wdp, - const FlowBoundaryConditions* bcs, - std::vector& pressure, - std::vector& faceflux, - std::vector& well_bhp, - std::vector& well_rate) { - - UnstructuredGrid* gg = const_cast(&grid_); - tpfa_eff_trans_compute(gg, &totmob[0], &htrans_[0], &trans_[0]); - - if (!omega.empty()) { - if (gpress_.empty()) { - THROW("Nozero omega argument given, but gravity was null in constructor."); - } - mim_ip_density_update(gg->number_of_cells, gg->cell_facepos, - &omega[0], - &gpress_[0], &gpress_omegaweighted_[0]); - } else { - if (!gpress_.empty()) { - THROW("Empty omega argument given, but gravity was non-null in constructor."); - } - } - - ifs_tpfa_forces F = { NULL, NULL, wells_, NULL, NULL }; - if (! src.empty()) { F.src = &src[0]; } - F.bc = bcs; - F.totmob = &totmob[0]; - if (! wdp.empty()) { F.wdp = &wdp[0]; } - - ifs_tpfa_assemble(gg, &F, &trans_[0], &gpress_omegaweighted_[0], h_); - - faceflux.resize(grid_.number_of_faces); - - ifs_tpfa_solution soln = { NULL, NULL, NULL, NULL }; - soln.cell_press = &pressure[0]; - soln.face_flux = &faceflux[0]; - - if (wells_ != NULL) { - well_bhp.resize(wells_->number_of_wells); - well_rate.resize(wells_->well_connpos[ wells_->number_of_wells ]); - soln.well_flux = &well_rate[0]; - soln.well_press = &well_bhp[0]; - } - - // memcpy(h_->x, &pressure[0], grid_.number_of_cells * sizeof *(h_->x)); - ASSERT(int(pressure.size()) == grid_.number_of_cells); - std::copy(pressure.begin(), pressure.end(), h_->x); - std::copy(well_bhp.begin(), well_bhp.end(), h_->x + grid_.number_of_cells); - - ifs_tpfa_press_flux(gg, &F, &trans_[0], h_, &soln); - } -#endif } // namespace Opm