mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-23 07:53:29 -06:00
setPrimaryVarsDomain: take domain index as parameter
This commit is contained in:
parent
75dc66d4d2
commit
58ac8f2553
@ -825,7 +825,7 @@ private:
|
|||||||
Details::setGlobal(initial_local_solution, domain.cells, solution);
|
Details::setGlobal(initial_local_solution, domain.cells, solution);
|
||||||
model_.simulator().model().invalidateAndUpdateIntensiveQuantities(/*timeIdx=*/0, domain);
|
model_.simulator().model().invalidateAndUpdateIntensiveQuantities(/*timeIdx=*/0, domain);
|
||||||
} else {
|
} else {
|
||||||
model_.wellModel().setPrimaryVarsDomain(domain, initial_local_well_primary_vars);
|
model_.wellModel().setPrimaryVarsDomain(domain.index, initial_local_well_primary_vars);
|
||||||
Details::setGlobal(initial_local_solution, domain.cells, solution);
|
Details::setGlobal(initial_local_solution, domain.cells, solution);
|
||||||
model_.simulator().model().invalidateAndUpdateIntensiveQuantities(/*timeIdx=*/0, domain);
|
model_.simulator().model().invalidateAndUpdateIntensiveQuantities(/*timeIdx=*/0, domain);
|
||||||
}
|
}
|
||||||
@ -881,7 +881,7 @@ private:
|
|||||||
auto local_solution = Details::extractVector(solution, domain.cells);
|
auto local_solution = Details::extractVector(solution, domain.cells);
|
||||||
Details::setGlobal(local_solution, domain.cells, locally_solved);
|
Details::setGlobal(local_solution, domain.cells, locally_solved);
|
||||||
} else {
|
} else {
|
||||||
model_.wellModel().setPrimaryVarsDomain(domain, initial_local_well_primary_vars);
|
model_.wellModel().setPrimaryVarsDomain(domain.index, initial_local_well_primary_vars);
|
||||||
Details::setGlobal(initial_local_solution, domain.cells, solution);
|
Details::setGlobal(initial_local_solution, domain.cells, solution);
|
||||||
model_.simulator().model().invalidateAndUpdateIntensiveQuantities(/*timeIdx=*/0, domain);
|
model_.simulator().model().invalidateAndUpdateIntensiveQuantities(/*timeIdx=*/0, domain);
|
||||||
}
|
}
|
||||||
|
@ -389,7 +389,7 @@ template<class Scalar> class WellContributions;
|
|||||||
|
|
||||||
void logPrimaryVars() const;
|
void logPrimaryVars() const;
|
||||||
std::vector<Scalar> getPrimaryVarsDomain(const int domainIdx) const;
|
std::vector<Scalar> getPrimaryVarsDomain(const int domainIdx) const;
|
||||||
void setPrimaryVarsDomain(const Domain& domain, const std::vector<Scalar>& vars);
|
void setPrimaryVarsDomain(const int domainIdx, const std::vector<Scalar>& vars);
|
||||||
|
|
||||||
void setupDomains(const std::vector<Domain>& domains);
|
void setupDomains(const std::vector<Domain>& domains);
|
||||||
|
|
||||||
|
@ -3024,11 +3024,11 @@ namespace Opm {
|
|||||||
template <typename TypeTag>
|
template <typename TypeTag>
|
||||||
void
|
void
|
||||||
BlackoilWellModel<TypeTag>::
|
BlackoilWellModel<TypeTag>::
|
||||||
setPrimaryVarsDomain(const Domain& domain, const std::vector<Scalar>& vars)
|
setPrimaryVarsDomain(const int domainIdx, const std::vector<Scalar>& vars)
|
||||||
{
|
{
|
||||||
std::size_t offset = 0;
|
std::size_t offset = 0;
|
||||||
for (auto& well : well_container_) {
|
for (auto& well : well_container_) {
|
||||||
if (well_domain_.at(well->name()) == domain.index) {
|
if (this->well_domain_.at(well->name()) == domainIdx) {
|
||||||
int num_pri_vars = well->setPrimaryVars(vars.begin() + offset);
|
int num_pri_vars = well->setPrimaryVars(vars.begin() + offset);
|
||||||
offset += num_pri_vars;
|
offset += num_pri_vars;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user