Added parameters for controlling use of multidim upwinding.

For now, you will simply get SPU even with use_multidim_upwind=true.
This commit is contained in:
Atgeirr Flø Rasmussen 2012-10-29 17:23:17 +01:00
parent 17ffcc77aa
commit bd013a7d4d
2 changed files with 19 additions and 5 deletions

View File

@ -30,8 +30,9 @@ namespace Opm
/// Construct solver.
/// \param[in] grid A 2d or 3d grid.
TransportModelTracerTof::TransportModelTracerTof(const UnstructuredGrid& grid)
: grid_(grid)
TransportModelTracerTof::TransportModelTracerTof(const UnstructuredGrid& grid,
const bool use_multidim_upwind)
: grid_(grid), use_multidim_upwind_(use_multidim_upwind)
{
}
@ -94,7 +95,11 @@ namespace Opm
// Add flux to upwind_term or downwind_flux, if interior.
if (other != -1) {
if (flux < 0.0) {
upwind_term += flux*tof_[other];
if (use_multidim_upwind_) {
upwind_term += flux*multidimUpwindTof(f, other);
} else {
upwind_term += flux*tof_[other];
}
} else {
downwind_flux += flux;
}
@ -117,6 +122,10 @@ namespace Opm
}
double TransportModelTracerTof::multidimUpwindTof(const int face, const int upwind_cell) const
{
// Just SPU for now...
return tof_[upwind_cell];
}
} // namespace Opm

View File

@ -43,7 +43,9 @@ namespace Opm
public:
/// Construct solver.
/// \param[in] grid A 2d or 3d grid.
TransportModelTracerTof(const UnstructuredGrid& grid);
/// \param[in] use_multidim_upwind If true, use multidimensional tof upwinding.
TransportModelTracerTof(const UnstructuredGrid& grid,
const bool use_multidim_upwind = false);
/// Solve for time-of-flight.
/// \param[in] darcyflux Array of signed face fluxes.
@ -61,12 +63,15 @@ namespace Opm
virtual void solveSingleCell(const int cell);
virtual void solveMultiCell(const int num_cells, const int* cells);
double multidimUpwindTof(const int face, const int upwind_cell) const;
private:
const UnstructuredGrid& grid_;
const double* darcyflux_; // one flux per grid face
const double* porevolume_; // one volume per cell
const double* source_; // one volumetric source term per cell
double* tof_;
bool use_multidim_upwind_;
};
} // namespace Opm