mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Modified for added files and changed class names.
This commit is contained in:
parent
e99e023980
commit
87c8d0dc28
@ -42,8 +42,8 @@
|
||||
#include <opm/core/simulator/TwophaseState.hpp>
|
||||
#include <opm/core/simulator/WellState.hpp>
|
||||
#include <opm/core/pressure/IncompTpfa.hpp>
|
||||
#include <opm/core/transport/reorder/TransportModelTracerTof.hpp>
|
||||
#include <opm/core/transport/reorder/TransportModelTracerTofDiscGal.hpp>
|
||||
#include <opm/core/transport/reorder/TofReorder.hpp>
|
||||
#include <opm/core/transport/reorder/TofDiscGalReorder.hpp>
|
||||
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
#include <boost/filesystem.hpp>
|
||||
@ -124,9 +124,9 @@ main(int argc, char** argv)
|
||||
bool use_dg = param.getDefault("use_dg", false);
|
||||
bool use_multidim_upwind = false;
|
||||
// Need to initialize dg solver here, since it uses parameters now.
|
||||
boost::scoped_ptr<Opm::TransportModelTracerTofDiscGal> dg_solver;
|
||||
boost::scoped_ptr<Opm::TofDiscGalReorder> dg_solver;
|
||||
if (use_dg) {
|
||||
dg_solver.reset(new Opm::TransportModelTracerTofDiscGal(grid, param));
|
||||
dg_solver.reset(new Opm::TofDiscGalReorder(grid, param));
|
||||
} else {
|
||||
use_multidim_upwind = param.getDefault("use_multidim_upwind", false);
|
||||
}
|
||||
@ -163,7 +163,7 @@ main(int argc, char** argv)
|
||||
if (use_dg) {
|
||||
dg_solver->solveTof(&flux[0], &porevol[0], &src[0], tof);
|
||||
} else {
|
||||
Opm::TransportModelTracerTof tofsolver(grid, use_multidim_upwind);
|
||||
Opm::TofReorder tofsolver(grid, use_multidim_upwind);
|
||||
if (compute_tracer) {
|
||||
tofsolver.solveTofTracer(&flux[0], &porevol[0], &src[0], tof, tracer);
|
||||
} else {
|
||||
|
@ -63,13 +63,13 @@ void Opm::ReorderSolverInterface::reorderAndTransport(const UnstructuredGrid& gr
|
||||
}
|
||||
|
||||
|
||||
const std::vector<int>& Opm::TransportModelInterface::sequence() const
|
||||
const std::vector<int>& Opm::ReorderSolverInterface::sequence() const
|
||||
{
|
||||
return sequence_;
|
||||
}
|
||||
|
||||
|
||||
const std::vector<int>& Opm::TransportModelInterface::components() const
|
||||
const std::vector<int>& Opm::ReorderSolverInterface::components() const
|
||||
{
|
||||
return components_;
|
||||
}
|
||||
|
@ -403,7 +403,7 @@ namespace Opm
|
||||
|
||||
|
||||
|
||||
void TransportModelTracerTofDiscGal::applyLimiter(const int cell, double* tof)
|
||||
void TofDiscGalReorder::applyLimiter(const int cell, double* tof)
|
||||
{
|
||||
switch (limiter_method_) {
|
||||
case MinUpwindFace:
|
||||
@ -420,7 +420,7 @@ namespace Opm
|
||||
|
||||
|
||||
|
||||
void TransportModelTracerTofDiscGal::applyMinUpwindLimiter(const int cell, const bool face_min, double* tof)
|
||||
void TofDiscGalReorder::applyMinUpwindLimiter(const int cell, const bool face_min, double* tof)
|
||||
{
|
||||
if (basis_func_->degree() != 1) {
|
||||
THROW("This limiter only makes sense for our DG1 implementation.");
|
||||
@ -509,12 +509,12 @@ namespace Opm
|
||||
|
||||
|
||||
|
||||
void TransportModelTracerTofDiscGal::applyLimiterAsPostProcess()
|
||||
void TofDiscGalReorder::applyLimiterAsPostProcess()
|
||||
{
|
||||
// Apply the limiter sequentially to all cells.
|
||||
// This means that a cell's limiting behaviour may be affected by
|
||||
// any limiting applied to its upstream cells.
|
||||
const std::vector<int>& seq = TransportModelInterface::sequence();
|
||||
const std::vector<int>& seq = ReorderSolverInterface::sequence();
|
||||
const int nc = seq.size();
|
||||
ASSERT(nc == grid_.number_of_cells);
|
||||
for (int i = 0; i < nc; ++i) {
|
||||
@ -526,7 +526,7 @@ namespace Opm
|
||||
|
||||
|
||||
|
||||
void TransportModelTracerTofDiscGal::applyLimiterAsSimultaneousPostProcess()
|
||||
void TofDiscGalReorder::applyLimiterAsSimultaneousPostProcess()
|
||||
{
|
||||
// Apply the limiter simultaneously to all cells.
|
||||
// This means that each cell is limited independently from all other cells,
|
||||
@ -543,7 +543,7 @@ namespace Opm
|
||||
|
||||
|
||||
|
||||
double TransportModelTracerTofDiscGal::totalFlux(const int cell) const
|
||||
double TofDiscGalReorder::totalFlux(const int cell) const
|
||||
{
|
||||
// Find total upstream/downstream fluxes.
|
||||
double upstream_flux = 0.0;
|
||||
@ -571,7 +571,7 @@ namespace Opm
|
||||
|
||||
|
||||
|
||||
double TransportModelTracerTofDiscGal::minCornerVal(const int cell, const int face) const
|
||||
double TofDiscGalReorder::minCornerVal(const int cell, const int face) const
|
||||
{
|
||||
// Evaluate the solution in all corners.
|
||||
const int dim = grid_.dimensions;
|
||||
|
@ -93,11 +93,11 @@ namespace Opm
|
||||
/// \param[out] tof Array of time-of-flight values (1 per cell).
|
||||
/// \param[out] tracer Array of tracer values (N per cell, where N is
|
||||
/// the number of cells c for which source[c] > 0.0).
|
||||
void TransportModelTracerTof::solveTofTracer(const double* darcyflux,
|
||||
const double* porevolume,
|
||||
const double* source,
|
||||
std::vector<double>& tof,
|
||||
std::vector<double>& tracer)
|
||||
void TofReorder::solveTofTracer(const double* darcyflux,
|
||||
const double* porevolume,
|
||||
const double* source,
|
||||
std::vector<double>& tof,
|
||||
std::vector<double>& tracer)
|
||||
{
|
||||
darcyflux_ = darcyflux;
|
||||
porevolume_ = porevolume;
|
||||
@ -194,7 +194,7 @@ namespace Opm
|
||||
|
||||
|
||||
|
||||
void TransportModelTracerTof::solveSingleCellMultidimUpwind(const int cell)
|
||||
void TofReorder::solveSingleCellMultidimUpwind(const int cell)
|
||||
{
|
||||
// Compute flux terms.
|
||||
// Sources have zero tof, and therefore do not contribute
|
||||
@ -260,10 +260,10 @@ namespace Opm
|
||||
// tof(face) = face_term + cell_term_factor*tof(upwind_cell).
|
||||
// It is not computed here, since these factors are needed to
|
||||
// compute the tof(upwind_cell) itself.
|
||||
void TransportModelTracerTof::multidimUpwindTerms(const int face,
|
||||
const int upwind_cell,
|
||||
double& face_term,
|
||||
double& cell_term_factor) const
|
||||
void TofReorder::multidimUpwindTerms(const int face,
|
||||
const int upwind_cell,
|
||||
double& face_term,
|
||||
double& cell_term_factor) const
|
||||
{
|
||||
// Implements multidim upwind according to
|
||||
// "Multidimensional upstream weighting for multiphase transport on general grids"
|
||||
|
Loading…
Reference in New Issue
Block a user