mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-26 17:20:59 -06:00
working with no resue on norne
This commit is contained in:
parent
c697e70a69
commit
aba1d5047d
@ -102,7 +102,8 @@ public:
|
||||
{
|
||||
//return wellMod_.numLocalWells();
|
||||
//return wellMod_.localNonshutWells().size();
|
||||
return wellMod_.numLocalNonshutWells();
|
||||
//return wellMod_.numLocalNonshutWells();
|
||||
return wellMod_.numLocalWellsEnd();
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -296,15 +296,37 @@ namespace Opm {
|
||||
|
||||
using PressureMatrix = Dune::BCRSMatrix<Dune::FieldMatrix<double, 1, 1>>;
|
||||
|
||||
int numLocalWellsEnd() const
|
||||
{
|
||||
auto w = schedule().getWellsatEnd();
|
||||
w.erase(std::remove_if(w.begin(), w.end(), not_on_process_), w.end());
|
||||
return w.size();
|
||||
}
|
||||
|
||||
void addWellPressureEquations(PressureMatrix& jacobian, const BVector& weights) const
|
||||
{
|
||||
int nw = this->numLocalWellsEnd();
|
||||
int rdofs = local_num_cells_;
|
||||
for(int i=0; i < nw; i++){
|
||||
int wdof = rdofs + i;
|
||||
jacobian[wdof][wdof] = 1.0;// better scaling ?
|
||||
}
|
||||
|
||||
for (const auto& well : well_container_) {
|
||||
well->addWellPressureEquations(jacobian, weights, pressureVarIndex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void addWellPressureEquationsStruct(PressureMatrix& jacobian) const
|
||||
{
|
||||
int nw = this->numLocalWellsEnd();
|
||||
int rdofs = local_num_cells_;
|
||||
for(int i=0; i < nw; i++){
|
||||
int wdof = rdofs + i;
|
||||
jacobian.entry(wdof,wdof) = 1.0;// better scaling ?
|
||||
}
|
||||
for (const auto& well : well_container_) {
|
||||
well->addWellPressureEquationsStruct(jacobian);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user