mirror of
https://github.com/OPM/opm-simulators.git
synced 2026-10-31 09:44:07 -05:00
fixing compilation warnings.
This commit is contained in:
1 parent
40f51d06c9
commit
2ca8496510
9 files changed
+23
-36
No files matched your search
@@ -97,20 +97,17 @@ public:
|
||||
|
||||
// TODO: control should be passed in later
|
||||
void assembleWellEq(const Simulator& simulator,
|
||||
const double dt,
|
||||
const SingleCompWellState<Scalar>& well_state);
|
||||
const double dt);
|
||||
|
||||
bool iterateWellEq(const Simulator& simulator,
|
||||
const Scalar dt,
|
||||
SingleCompWellState<Scalar>& well_state);
|
||||
|
||||
void solveEqAndUpdateWellState(const Simulator& simulator,
|
||||
SingleCompWellState<Scalar>& well_state);
|
||||
void solveEqAndUpdateWellState(SingleCompWellState<Scalar>& well_state);
|
||||
|
||||
void apply(BVector& r) const override;
|
||||
|
||||
void recoverWellSolutionAndUpdateWellState(const Simulator& simulator,
|
||||
const BVector& x,
|
||||
void recoverWellSolutionAndUpdateWellState(const BVector& x,
|
||||
SingleCompWellState<Scalar>& well_state);
|
||||
|
||||
bool getConvergence() const override;
|
||||
@@ -159,8 +156,7 @@ private:
|
||||
// with passing in the SurfaceCondition, we should be able to do this in the primary variable class
|
||||
void updateWellState(SingleCompWellState<Scalar>& well_state) const;
|
||||
|
||||
void updateWellState(const Simulator& simulator,
|
||||
const BVectorWell& dwells,
|
||||
void updateWellState(const BVectorWell& dwells,
|
||||
SingleCompWellState<Scalar>& well_state);
|
||||
};
|
||||
|
||||
|
||||
@@ -76,8 +76,7 @@ public:
|
||||
|
||||
/// using the solution x to recover the solution xw for wells and applying
|
||||
/// xw to update Well State
|
||||
virtual void recoverWellSolutionAndUpdateWellState(const Simulator& simulator,
|
||||
const BVector& x,
|
||||
virtual void recoverWellSolutionAndUpdateWellState(const BVector& x,
|
||||
SingleCompWellState<Scalar>& well_state) = 0;
|
||||
virtual bool getConvergence() const = 0;
|
||||
|
||||
|
||||
@@ -42,8 +42,7 @@ public:
|
||||
explicit CompWellState(const PhaseUsage& phase_usage,
|
||||
const CompositionalConfig& comp_config);
|
||||
|
||||
void init(const Schedule& schedule,
|
||||
const std::vector<Well>& wells_ecl,
|
||||
void init(const std::vector<Well>& wells_ecl,
|
||||
const std::vector<Scalar>& cell_pressures,
|
||||
const std::vector<std::vector<Scalar>>& cell_mole_fractions,
|
||||
const std::vector<std::vector<CompConnectionData<Scalar> > >& well_connection_data,
|
||||
|
||||
@@ -32,13 +32,12 @@ CompWellState(const PhaseUsage& phase_usage,
|
||||
|
||||
template <typename Scalar>
|
||||
void CompWellState<Scalar>::
|
||||
init(const Schedule& schedule,
|
||||
const std::vector<Well>& wells_ecl,
|
||||
init(const std::vector<Well>& wells_ecl,
|
||||
const std::vector<Scalar>& cell_pressures,
|
||||
const std::vector<std::vector<Scalar>>& cell_mole_fractions,
|
||||
const std::vector<std::vector<CompConnectionData<Scalar> > >& well_connection_data,
|
||||
const SummaryState& summary_state,
|
||||
const CompWellState* prev_well_state)
|
||||
const CompWellState* /*prev_well_state*/)
|
||||
{
|
||||
this->base_init(wells_ecl, cell_pressures, cell_mole_fractions, well_connection_data, summary_state);
|
||||
|
||||
|
||||
@@ -418,8 +418,7 @@ template <typename TypeTag>
|
||||
void
|
||||
CompWell<TypeTag>::
|
||||
assembleWellEq(const Simulator& simulator,
|
||||
const double dt,
|
||||
const SingleCompWellState<Scalar>& well_state)
|
||||
const double dt)
|
||||
{
|
||||
this->well_equations_.clear();
|
||||
|
||||
@@ -435,7 +434,6 @@ assembleWellEq(const Simulator& simulator,
|
||||
con_rates[comp_idx] = PrimaryVariables::restrictEval(connection_rates[comp_idx]);
|
||||
}
|
||||
|
||||
const unsigned cell_idx = this->well_cells_[0];
|
||||
// here we use perf index, need to check how the things are done in the StandardWellAssemble
|
||||
// assebmle the well equations related to the produciton/injection mass rates for each component
|
||||
for (unsigned comp_idx = 0; comp_idx < FluidSystem::numComponents; ++comp_idx) {
|
||||
@@ -484,7 +482,6 @@ assembleSourceTerm(const Scalar dt)
|
||||
const EvalWell total_mass_rate = total_surface_rate * density;
|
||||
std::array<EvalWell, FluidSystem::numComponents> component_mass_rates;
|
||||
for (unsigned comp_idx = 0; comp_idx < FluidSystem::numComponents; ++comp_idx) {
|
||||
const auto& val = this->surface_conditions_.massFraction(comp_idx);
|
||||
component_mass_rates[comp_idx] = total_mass_rate * this->surface_conditions_.massFraction(comp_idx);
|
||||
}
|
||||
|
||||
@@ -511,7 +508,7 @@ iterateWellEq(const Simulator& simulator,
|
||||
bool converged = false;
|
||||
|
||||
do {
|
||||
assembleWellEq(simulator, dt, well_state);
|
||||
assembleWellEq(simulator, dt);
|
||||
|
||||
std::cout << std::endl << " residuals ";
|
||||
for (const auto& val : this->well_equations_.residual()[0]) {
|
||||
@@ -532,7 +529,7 @@ iterateWellEq(const Simulator& simulator,
|
||||
|
||||
++it;
|
||||
|
||||
solveEqAndUpdateWellState(simulator, well_state);
|
||||
solveEqAndUpdateWellState(well_state);
|
||||
} while (it < max_iter);
|
||||
std::cout << "converged " << converged << " after " << it << " iterations" << std::endl;
|
||||
return converged;
|
||||
@@ -541,8 +538,7 @@ iterateWellEq(const Simulator& simulator,
|
||||
template <typename TypeTag>
|
||||
void
|
||||
CompWell<TypeTag>::
|
||||
solveEqAndUpdateWellState(const Simulator& simulator,
|
||||
SingleCompWellState<Scalar>& well_state)
|
||||
solveEqAndUpdateWellState(SingleCompWellState<Scalar>& well_state)
|
||||
{
|
||||
BVectorWell dx_well(1);
|
||||
|
||||
@@ -564,14 +560,13 @@ apply(BVector& r) const
|
||||
template <typename TypeTag>
|
||||
void
|
||||
CompWell<TypeTag>::
|
||||
recoverWellSolutionAndUpdateWellState(const Simulator& simulator,
|
||||
const BVector& x,
|
||||
recoverWellSolutionAndUpdateWellState(const BVector& x,
|
||||
SingleCompWellState<Scalar>& well_state)
|
||||
{
|
||||
BVectorWell xw(1);
|
||||
|
||||
this->well_equations_.recoverSolutionWell(x, xw);
|
||||
updateWellState(simulator, xw, well_state);
|
||||
updateWellState(xw, well_state);
|
||||
}
|
||||
|
||||
template <typename TypeTag>
|
||||
@@ -585,8 +580,7 @@ updatePrimaryVariablesNewton(const BVectorWell& dwells)
|
||||
template <typename TypeTag>
|
||||
void
|
||||
CompWell<TypeTag>::
|
||||
updateWellState(const Simulator& simulator,
|
||||
const BVectorWell& xw,
|
||||
updateWellState(const CompWell::BVectorWell& xw,
|
||||
SingleCompWellState<Scalar>& well_state)
|
||||
{
|
||||
this->primary_variables_.updateNewton(xw);
|
||||
|
||||
@@ -161,7 +161,7 @@ private:
|
||||
void initWellContainer();
|
||||
|
||||
void initWellConnectionData();
|
||||
void initWellState(std::size_t report_step);
|
||||
void initWellState();
|
||||
|
||||
void assemble(const int iterationIdx,
|
||||
const double dt);
|
||||
|
||||
@@ -31,7 +31,7 @@ beginReportStep(unsigned report_step)
|
||||
// TODO: not considering the parallel running yet
|
||||
wells_ecl_ = schedule_.getWells(report_step);
|
||||
initWellConnectionData();
|
||||
initWellState(report_step);
|
||||
initWellState();
|
||||
}
|
||||
|
||||
template <typename TypeTag>
|
||||
@@ -116,7 +116,7 @@ initWellConnectionData()
|
||||
|
||||
template <typename TypeTag>
|
||||
void CompositionalWellModel<TypeTag>::
|
||||
initWellState(const std::size_t report_step)
|
||||
initWellState()
|
||||
{
|
||||
// TODO: not sure the following is correct
|
||||
const auto pressIx = [this]()
|
||||
@@ -155,7 +155,7 @@ initWellState(const std::size_t report_step)
|
||||
this->simulator_.vanguard().grid().comm());
|
||||
|
||||
/* TODO: no prev well state for now */
|
||||
this->comp_well_states_.init(this->schedule_, this->wells_ecl_,
|
||||
this->comp_well_states_.init(this->wells_ecl_,
|
||||
cell_pressure, cell_mole_fractions, this->well_connection_data_,
|
||||
this->summary_state_);
|
||||
}
|
||||
@@ -260,7 +260,7 @@ recoverWellSolutionAndUpdateWellState(const BVector& x)
|
||||
x_local_[i] = x[cells[i]];
|
||||
}
|
||||
auto& ws = this->comp_well_states_[well->name()];
|
||||
well->recoverWellSolutionAndUpdateWellState(simulator_, x_local_, ws);
|
||||
well->recoverWellSolutionAndUpdateWellState(x_local_, ws);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ class SingleCompWellState {
|
||||
public:
|
||||
SingleCompWellState(const std::string& name,
|
||||
const CompositionalConfig& comp_config,
|
||||
const PhaseUsage& phase_usage,
|
||||
const PhaseUsage& phase_usage_input,
|
||||
const std::vector<CompConnectionData<Scalar> >& connections,
|
||||
bool is_producer);
|
||||
|
||||
|
||||
@@ -54,11 +54,11 @@ template <class Scalar>
|
||||
SingleCompWellState<Scalar>::
|
||||
SingleCompWellState(const std::string& well_name,
|
||||
const CompositionalConfig& comp_config,
|
||||
const PhaseUsage& phase_usage,
|
||||
const PhaseUsage& phase_usage_input,
|
||||
const std::vector<CompConnectionData<Scalar>>& connections,
|
||||
bool is_producer)
|
||||
: name(well_name)
|
||||
, phase_usage(phase_usage)
|
||||
, phase_usage(phase_usage_input)
|
||||
, producer(is_producer)
|
||||
, surface_phase_rates(phase_usage.num_phases)
|
||||
, phase_fractions(phase_usage.num_phases)
|
||||
|
||||
Reference in new issue
Block a user