mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #3198 from akva2/janitoring
Remove some unused members and quell some warnings
This commit is contained in:
commit
f273e06c66
@ -850,7 +850,7 @@ protected:
|
||||
cellThickness_[elemIdx] = asImp_().computeCellThickness(element);
|
||||
}
|
||||
}
|
||||
Scalar computeCellThickness(const Element& element) const {
|
||||
Scalar computeCellThickness(const Element&) const {
|
||||
OPM_THROW(std::runtime_error, "cellThickness not implemented for this grid!");
|
||||
}
|
||||
|
||||
|
@ -1428,7 +1428,7 @@ protected:
|
||||
throw std::logic_error("commitWellState() method not implemented for class eclpeacemanwell");
|
||||
}
|
||||
|
||||
void commitWGState(WGState wgstate)
|
||||
void commitWGState(WGState)
|
||||
{
|
||||
throw std::logic_error("commitWellState() method not implemented for class eclpeacemanwell");
|
||||
}
|
||||
|
@ -30,19 +30,16 @@ namespace Opm
|
||||
{
|
||||
|
||||
MultisegmentWellContribution::MultisegmentWellContribution(unsigned int dim_, unsigned int dim_wells_,
|
||||
unsigned int Nb_, unsigned int Mb_,
|
||||
unsigned int BnumBlocks_, std::vector<double> &Bvalues, std::vector<unsigned int> &BcolIndices, std::vector<unsigned int> &BrowPointers,
|
||||
unsigned int Mb_,
|
||||
std::vector<double> &Bvalues, std::vector<unsigned int> &BcolIndices, std::vector<unsigned int> &BrowPointers,
|
||||
unsigned int DnumBlocks_, double *Dvalues, UMFPackIndex *DcolPointers, UMFPackIndex *DrowIndices,
|
||||
std::vector<double> &Cvalues)
|
||||
:
|
||||
dim(dim_), // size of blockvectors in vectors x and y, equal to MultisegmentWell::numEq
|
||||
dim_wells(dim_wells_), // size of blocks in C, B and D, equal to MultisegmentWell::numWellEq
|
||||
N(Nb_ * dim), // number of rows in vectors x and y, N == dim*Nb
|
||||
Nb(Nb_), // number of blockrows in x and y
|
||||
M(Mb_ * dim_wells), // number of rows, M == dim_wells*Mb
|
||||
Mb(Mb_), // number of blockrows in C, D and B
|
||||
DnumBlocks(DnumBlocks_), // number of blocks in D
|
||||
BnumBlocks(BnumBlocks_), // number of blocks in C and B
|
||||
// copy data for matrix D into vectors to prevent it going out of scope
|
||||
Dvals(Dvalues, Dvalues + DnumBlocks * dim_wells * dim_wells),
|
||||
Dcols(DcolPointers, DcolPointers + M + 1),
|
||||
|
@ -47,8 +47,6 @@ class MultisegmentWellContribution
|
||||
private:
|
||||
unsigned int dim; // size of blockvectors in vectors x and y, equal to MultisegmentWell::numEq
|
||||
unsigned int dim_wells; // size of blocks in C, B and D, equal to MultisegmentWell::numWellEq
|
||||
unsigned int N; // number of rows in vectors x and y, N == dim*Nb
|
||||
unsigned int Nb; // number of blockrows in x and y
|
||||
unsigned int M; // number of rows, M == dim_wells*Mb
|
||||
unsigned int Mb; // number of blockrows in C, D and B
|
||||
|
||||
@ -59,7 +57,6 @@ private:
|
||||
// C and B are stored in BCRS format, D is stored in CSC format (Dune::UMFPack)
|
||||
// Sparsity pattern for C is not stored, since it is the same as B
|
||||
unsigned int DnumBlocks; // number of blocks in D
|
||||
unsigned int BnumBlocks; // number of blocks in C and B
|
||||
std::vector<double> Cvals;
|
||||
std::vector<double> Dvals;
|
||||
std::vector<double> Bvals;
|
||||
@ -97,9 +94,7 @@ public:
|
||||
/// The variables representing C, B and D will go out of scope when MultisegmentWell::addWellContribution() ends
|
||||
/// \param[in] dim size of blocks in blockvectors x and y, equal to MultisegmentWell::numEq
|
||||
/// \param[in] dim_wells size of blocks of C, B and D, equal to MultisegmentWell::numWellEq
|
||||
/// \param[in] Nb number of blocks in vectors x and y
|
||||
/// \param[in] Mb number of blockrows in C, B and D
|
||||
/// \param[in] BnumBlocks number of blocks in C and B
|
||||
/// \param[in] Bvalues nonzero values of matrix B
|
||||
/// \param[in] BcolIndices columnindices of blocks of matrix B
|
||||
/// \param[in] BrowPointers rowpointers of matrix B
|
||||
@ -109,8 +104,8 @@ public:
|
||||
/// \param[in] DrowIndices rowindices of matrix D
|
||||
/// \param[in] Cvalues nonzero values of matrix C
|
||||
MultisegmentWellContribution(unsigned int dim, unsigned int dim_wells,
|
||||
unsigned int Nb, unsigned int Mb,
|
||||
unsigned int BnumBlocks, std::vector<double> &Bvalues, std::vector<unsigned int> &BcolIndices, std::vector<unsigned int> &BrowPointers,
|
||||
unsigned int Mb,
|
||||
std::vector<double> &Bvalues, std::vector<unsigned int> &BcolIndices, std::vector<unsigned int> &BrowPointers,
|
||||
unsigned int DnumBlocks, double *Dvalues, UMFPackIndex *DcolPointers,
|
||||
UMFPackIndex *DrowIndices, std::vector<double> &Cvalues);
|
||||
|
||||
|
@ -253,15 +253,13 @@ void WellContributions::alloc()
|
||||
}
|
||||
|
||||
void WellContributions::addMultisegmentWellContribution(unsigned int dim_, unsigned int dim_wells_,
|
||||
unsigned int Nb_, unsigned int Mb,
|
||||
unsigned int BnumBlocks, std::vector<double> &Bvalues, std::vector<unsigned int> &BcolIndices, std::vector<unsigned int> &BrowPointers,
|
||||
unsigned int Mb,
|
||||
std::vector<double> &Bvalues, std::vector<unsigned int> &BcolIndices, std::vector<unsigned int> &BrowPointers,
|
||||
unsigned int DnumBlocks, double *Dvalues, UMFPackIndex *DcolPointers, UMFPackIndex *DrowIndices,
|
||||
std::vector<double> &Cvalues)
|
||||
{
|
||||
assert(dim==dim_);
|
||||
this->Nb = Nb_;
|
||||
this->N = Nb * dim_;
|
||||
MultisegmentWellContribution *well = new MultisegmentWellContribution(dim_, dim_wells_, Nb, Mb, BnumBlocks, Bvalues, BcolIndices, BrowPointers, DnumBlocks, Dvalues, DcolPointers, DrowIndices, Cvalues);
|
||||
MultisegmentWellContribution *well = new MultisegmentWellContribution(dim_, dim_wells_, Mb, Bvalues, BcolIndices, BrowPointers, DnumBlocks, Dvalues, DcolPointers, DrowIndices, Cvalues);
|
||||
multisegments.emplace_back(well);
|
||||
++num_ms_wells;
|
||||
}
|
||||
|
@ -81,7 +81,6 @@ private:
|
||||
bool allocated = false;
|
||||
|
||||
unsigned int N; // number of rows (not blockrows) in vectors x and y
|
||||
unsigned int Nb; // number of blockrows in vectors x and y
|
||||
unsigned int dim; // number of columns in blocks in B and C, equal to StandardWell::numEq
|
||||
unsigned int dim_wells; // number of rows in blocks in B and C, equal to StandardWell::numStaticWellEq
|
||||
unsigned int num_blocks = 0; // total number of blocks in all wells
|
||||
@ -197,9 +196,7 @@ public:
|
||||
/// Matrices C and B are passed in Blocked CSR, matrix D in CSC
|
||||
/// \param[in] dim size of blocks in vectors x and y, equal to MultisegmentWell::numEq
|
||||
/// \param[in] dim_wells size of blocks of C, B and D, equal to MultisegmentWell::numWellEq
|
||||
/// \param[in] Nb number of blocks in vectors x and y
|
||||
/// \param[in] Mb number of blockrows in C, B and D
|
||||
/// \param[in] BnumBlocks number of blocks in C and B
|
||||
/// \param[in] Bvalues nonzero values of matrix B
|
||||
/// \param[in] BcolIndices columnindices of blocks of matrix B
|
||||
/// \param[in] BrowPointers rowpointers of matrix B
|
||||
@ -209,8 +206,8 @@ public:
|
||||
/// \param[in] DrowIndices rowindices of matrix D
|
||||
/// \param[in] Cvalues nonzero values of matrix C
|
||||
void addMultisegmentWellContribution(unsigned int dim, unsigned int dim_wells,
|
||||
unsigned int Nb, unsigned int Mb,
|
||||
unsigned int BnumBlocks, std::vector<double> &Bvalues, std::vector<unsigned int> &BcolIndices, std::vector<unsigned int> &BrowPointers,
|
||||
unsigned int Mb,
|
||||
std::vector<double> &Bvalues, std::vector<unsigned int> &BcolIndices, std::vector<unsigned int> &BrowPointers,
|
||||
unsigned int DnumBlocks, double *Dvalues,
|
||||
UMFPackIndex *DcolPointers, UMFPackIndex *DrowIndices,
|
||||
std::vector<double> &Cvalues);
|
||||
|
@ -482,7 +482,6 @@ namespace Opm
|
||||
MultisegmentWell<TypeTag>::
|
||||
addWellContribution(WellContributions& wellContribs) const
|
||||
{
|
||||
unsigned int Nb = duneB_.M(); // number of blockrows in matrix A
|
||||
unsigned int Mb = duneB_.N(); // number of blockrows in duneB_, duneC_ and duneD_
|
||||
unsigned int BnumBlocks = duneB_.nonzeroes();
|
||||
unsigned int DnumBlocks = duneD_.nonzeroes();
|
||||
@ -533,7 +532,7 @@ namespace Opm
|
||||
Brows.emplace_back(sumBlocks);
|
||||
}
|
||||
|
||||
wellContribs.addMultisegmentWellContribution(numEq, numWellEq, Nb, Mb, BnumBlocks, Bvals, Bcols, Brows, DnumBlocks, Dvals, Dcols, Drows, Cvals);
|
||||
wellContribs.addMultisegmentWellContribution(numEq, numWellEq, Mb, Bvals, Bcols, Brows, DnumBlocks, Dvals, Dcols, Drows, Cvals);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -174,7 +174,6 @@ namespace WellGroupHelpers
|
||||
const std::vector<double>& resv_coeff,
|
||||
const std::string& group_name,
|
||||
const double sales_target,
|
||||
const WellStateFullyImplicitBlackoil& well_state,
|
||||
const GroupState& group_state,
|
||||
const Phase& injection_phase,
|
||||
DeferredLogger& deferred_logger)
|
||||
@ -183,7 +182,6 @@ namespace WellGroupHelpers
|
||||
, resv_coeff_(resv_coeff)
|
||||
, group_name_(group_name)
|
||||
, sales_target_(sales_target)
|
||||
, well_state_(well_state)
|
||||
, group_state_(group_state)
|
||||
{
|
||||
// initialize to avoid warning
|
||||
@ -282,7 +280,6 @@ namespace WellGroupHelpers
|
||||
const std::vector<double>& resv_coeff_;
|
||||
const std::string& group_name_;
|
||||
double sales_target_;
|
||||
const WellStateFullyImplicitBlackoil& well_state_;
|
||||
const GroupState& group_state_;
|
||||
int pos_;
|
||||
GuideRateModel::Target target_;
|
||||
|
@ -29,7 +29,7 @@ namespace Opm {
|
||||
Microscopic class to handle a pair of well and group state.
|
||||
*/
|
||||
|
||||
class PhaseUsage;
|
||||
struct PhaseUsage;
|
||||
|
||||
struct WGState {
|
||||
WGState(const PhaseUsage& pu);
|
||||
|
@ -819,7 +819,6 @@ namespace WellGroupHelpers
|
||||
}
|
||||
|
||||
FractionCalculator::FractionCalculator(const Schedule& schedule,
|
||||
const SummaryState& summary_state,
|
||||
const WellStateFullyImplicitBlackoil& well_state,
|
||||
const GroupState& group_state,
|
||||
const int report_step,
|
||||
@ -829,7 +828,6 @@ namespace WellGroupHelpers
|
||||
const bool is_producer,
|
||||
const Phase injection_phase)
|
||||
: schedule_(schedule)
|
||||
, summary_state_(summary_state)
|
||||
, well_state_(well_state)
|
||||
, group_state_(group_state)
|
||||
, report_step_(report_step)
|
||||
@ -1028,7 +1026,7 @@ namespace WellGroupHelpers
|
||||
gratTargetFromSales = group_state.grat_sales_target(group.name());
|
||||
|
||||
TargetCalculator tcalc(currentGroupControl, pu, resv_coeff, gratTargetFromSales);
|
||||
FractionCalculator fcalc(schedule, summaryState, wellState, group_state, reportStepIdx, guideRate, tcalc.guideTargetMode(), pu, true, Phase::OIL);
|
||||
FractionCalculator fcalc(schedule, wellState, group_state, reportStepIdx, guideRate, tcalc.guideTargetMode(), pu, true, Phase::OIL);
|
||||
|
||||
auto localFraction = [&](const std::string& child) { return fcalc.localFraction(child, name); };
|
||||
|
||||
@ -1151,8 +1149,8 @@ namespace WellGroupHelpers
|
||||
const auto& gconsale = schedule[reportStepIdx].gconsale().get(group.name(), summaryState);
|
||||
sales_target = gconsale.sales_target;
|
||||
}
|
||||
InjectionTargetCalculator tcalc(currentGroupControl, pu, resv_coeff, group.name(), sales_target, wellState, group_state, injectionPhase, deferred_logger);
|
||||
FractionCalculator fcalc(schedule, summaryState, wellState, group_state, reportStepIdx, guideRate, tcalc.guideTargetMode(), pu, false, injectionPhase);
|
||||
InjectionTargetCalculator tcalc(currentGroupControl, pu, resv_coeff, group.name(), sales_target, group_state, injectionPhase, deferred_logger);
|
||||
FractionCalculator fcalc(schedule, wellState, group_state, reportStepIdx, guideRate, tcalc.guideTargetMode(), pu, false, injectionPhase);
|
||||
|
||||
auto localFraction = [&](const std::string& child) { return fcalc.localFraction(child, name); };
|
||||
|
||||
|
@ -314,7 +314,6 @@ namespace WellGroupHelpers
|
||||
{
|
||||
public:
|
||||
FractionCalculator(const Schedule& schedule,
|
||||
const SummaryState& summary_state,
|
||||
const WellStateFullyImplicitBlackoil& well_state,
|
||||
const GroupState& group_state,
|
||||
const int report_step,
|
||||
@ -333,7 +332,6 @@ namespace WellGroupHelpers
|
||||
int groupControlledWells(const std::string& group_name, const std::string& always_included_child);
|
||||
GuideRate::RateVector getGroupRateVector(const std::string& group_name);
|
||||
const Schedule& schedule_;
|
||||
const SummaryState& summary_state_;
|
||||
const WellStateFullyImplicitBlackoil& well_state_;
|
||||
const GroupState& group_state_;
|
||||
int report_step_;
|
||||
|
@ -2518,8 +2518,8 @@ namespace Opm
|
||||
const auto& gconsale = schedule[current_step_].gconsale().get(group.name(), summaryState);
|
||||
sales_target = gconsale.sales_target;
|
||||
}
|
||||
WellGroupHelpers::InjectionTargetCalculator tcalc(currentGroupControl, pu, resv_coeff, group.name(), sales_target, well_state, group_state, injectionPhase, deferred_logger);
|
||||
WellGroupHelpers::FractionCalculator fcalc(schedule, summaryState, well_state, group_state, current_step_, guide_rate_, tcalc.guideTargetMode(), pu, false, injectionPhase);
|
||||
WellGroupHelpers::InjectionTargetCalculator tcalc(currentGroupControl, pu, resv_coeff, group.name(), sales_target, group_state, injectionPhase, deferred_logger);
|
||||
WellGroupHelpers::FractionCalculator fcalc(schedule, well_state, group_state, current_step_, guide_rate_, tcalc.guideTargetMode(), pu, false, injectionPhase);
|
||||
|
||||
auto localFraction = [&](const std::string& child) {
|
||||
return fcalc.localFraction(child, "");
|
||||
@ -2614,7 +2614,7 @@ namespace Opm
|
||||
gratTargetFromSales = group_state.grat_sales_target(group.name());
|
||||
|
||||
WellGroupHelpers::TargetCalculator tcalc(currentGroupControl, pu, resv_coeff, gratTargetFromSales);
|
||||
WellGroupHelpers::FractionCalculator fcalc(schedule, summaryState, well_state, group_state, current_step_, guide_rate_, tcalc.guideTargetMode(), pu, true, Phase::OIL);
|
||||
WellGroupHelpers::FractionCalculator fcalc(schedule, well_state, group_state, current_step_, guide_rate_, tcalc.guideTargetMode(), pu, true, Phase::OIL);
|
||||
|
||||
auto localFraction = [&](const std::string& child) {
|
||||
return fcalc.localFraction(child, "");
|
||||
|
Loading…
Reference in New Issue
Block a user