Fixed namespacing issue

This commit is contained in:
Kjetil Olsen Lye 2012-04-10 14:47:29 +02:00
parent b959de1ba0
commit a9dfab1b37
2 changed files with 15 additions and 6 deletions

View File

@ -38,14 +38,18 @@ namespace Opm
/// and N == g.number_of_cells. /// and N == g.number_of_cells.
/// \param[in] gravity Gravity vector. If nonzero, the array should /// \param[in] gravity Gravity vector. If nonzero, the array should
/// have D elements. /// have D elements.
/// \param[in] wells The wells argument. Will be used in solution,
/// is ignored if NULL
IncompTpfa::IncompTpfa(const UnstructuredGrid& g, IncompTpfa::IncompTpfa(const UnstructuredGrid& g,
const double* permeability, const double* permeability,
const double* gravity, const double* gravity,
const LinearSolverInterface& linsolver) const LinearSolverInterface& linsolver,
const struct Wells* wells)
: grid_(g), : grid_(g),
linsolver_(linsolver), linsolver_(linsolver),
htrans_(g.cell_facepos[ g.number_of_cells ]), htrans_(g.cell_facepos[ g.number_of_cells ]),
trans_ (g.number_of_faces) trans_ (g.number_of_faces),
wells_(wells)
{ {
UnstructuredGrid* gg = const_cast<UnstructuredGrid*>(&grid_); UnstructuredGrid* gg = const_cast<UnstructuredGrid*>(&grid_);
tpfa_htrans_compute(gg, permeability, &htrans_[0]); tpfa_htrans_compute(gg, permeability, &htrans_[0]);
@ -110,7 +114,7 @@ namespace Opm
} }
} }
ifs_tpfa_forces F = { NULL, NULL, NULL, NULL, NULL }; ifs_tpfa_forces F = { NULL, NULL, wells_, NULL, NULL };
if (! src.empty()) { F.src = &src[0]; } if (! src.empty()) { F.src = &src[0]; }
F.bc = bcs; F.bc = bcs;
@ -172,7 +176,7 @@ namespace Opm
} }
} }
ifs_tpfa_forces F = { NULL, NULL, NULL, NULL, NULL }; ifs_tpfa_forces F = { NULL, NULL, wells_, NULL, NULL };
if (! src.empty()) { F.src = &src[0]; } if (! src.empty()) { F.src = &src[0]; }
F.bc = bcs; F.bc = bcs;

View File

@ -25,6 +25,7 @@
struct UnstructuredGrid; struct UnstructuredGrid;
struct ifs_tpfa_data; struct ifs_tpfa_data;
struct Wells;
struct FlowBoundaryConditions; struct FlowBoundaryConditions;
namespace Opm namespace Opm
@ -47,10 +48,13 @@ namespace Opm
/// and N == g.number_of_cells. /// and N == g.number_of_cells.
/// \param[in] gravity Gravity vector. If nonzero, the array should /// \param[in] gravity Gravity vector. If nonzero, the array should
/// have D elements. /// have D elements.
/// \param[in] wells The wells argument. Will be used in solution,
/// is ignored if NULL
IncompTpfa(const UnstructuredGrid& g, IncompTpfa(const UnstructuredGrid& g,
const double* permeability, const double* permeability,
const double* gravity, const double* gravity,
const LinearSolverInterface& linsolver); const LinearSolverInterface& linsolver,
const struct Wells* wells = 0);
/// Destructor. /// Destructor.
~IncompTpfa(); ~IncompTpfa();
@ -113,7 +117,8 @@ namespace Opm
::std::vector<double> trans_ ; ::std::vector<double> trans_ ;
::std::vector<double> gpress_; ::std::vector<double> gpress_;
::std::vector<double> gpress_omegaweighted_; ::std::vector<double> gpress_omegaweighted_;
const struct Wells* wells_;
struct ifs_tpfa_data* h_; struct ifs_tpfa_data* h_;
}; };