Minor code cleanup in TransportModelTwophase.

This commit is contained in:
Atgeirr Flø Rasmussen
2012-08-24 13:31:23 +02:00
parent 3dfb2eb29b
commit 46fb488410
2 changed files with 14 additions and 9 deletions

View File

@@ -52,8 +52,8 @@ namespace Opm
source_(0),
dt_(0.0),
saturation_(grid.number_of_cells, -1.0),
reorder_iterations_(grid.number_of_cells, 0),
fractionalflow_(grid.number_of_cells, -1.0),
reorder_iterations_(grid.number_of_cells, 0),
mob_(2*grid.number_of_cells, -1.0)
#ifdef EXPERIMENT_GAUSS_SEIDEL
, ia_upw_(grid.number_of_cells + 1, -1),
@@ -107,6 +107,13 @@ namespace Opm
toBothSat(saturation_, saturation);
}
const std::vector<int>& TransportModelTwophase::getReorderIterations() const
{
return reorder_iterations_;
}
// Residual function r(s) for a single-cell implicit Euler transport
//
// r(s) = s - s0 + dt/pv*( influx + outflux*f(s) )
@@ -645,10 +652,7 @@ namespace Opm
toBothSat(saturation_, saturation);
}
void TransportModelTwophase::getReorderIterations()
{
return reorder_iterations_;
};
} // namespace Opm

View File

@@ -74,10 +74,11 @@ namespace Opm
const double* porevolume,
const double dt,
std::vector<double>& saturation);
//// Return reorder iterations
////
//// Return the number of iterations used by the reordering solver.
//// \param[out] vector of iteration per cell
const std::vector<int>& getReorderIterations(){return reorder_iterations_;};
const std::vector<int>& getReorderIterations() const;
private:
virtual void solveSingleCell(const int cell);
virtual void solveMultiCell(const int num_cells, const int* cells);
@@ -86,7 +87,7 @@ namespace Opm
const int pos,
const double* gravflux);
int solveGravityColumn(const std::vector<int>& cells);
private:
private:
const UnstructuredGrid& grid_;
const IncompPropertiesInterface& props_;
const double* visc_;