removing setWellSolutionsFromPrevState from WellStateFullyImplicitBlackoilDense

Not used anymore.
This commit is contained in:
Kai Bao
2017-04-04 15:02:06 +02:00
parent 032f9803be
commit 22b2217dd3

View File

@@ -74,50 +74,9 @@ namespace Opm
// available constraints in the well_controls is the defaulted BHP value, and it // available constraints in the well_controls is the defaulted BHP value, and it
// is really not desirable to use this value to enter the Newton iterations. // is really not desirable to use this value to enter the Newton iterations.
setWellSolutions(pu); setWellSolutions(pu);
// setWellSolutionsFromPrevState(prevState);
} }
template <class PrevState>
void setWellSolutionsFromPrevState(const PrevState& prevState)
{
// Set nw and np, or return if no wells.
if (wells_.get() == nullptr) {
return;
}
const int nw = wells_->number_of_wells;
if (nw == 0) {
return;
}
const int np = wells_->number_of_phases;
// intialize wells that have been there before
// order may change so the mapping is based on the well name
// if there are no well, do nothing in init
if( ! prevState.wellMap().empty() )
{
typedef typename WellMapType :: const_iterator const_iterator;
const_iterator end = prevState.wellMap().end();
int nw_old = prevState.bhp().size();
for (int w = 0; w < nw; ++w) {
std::string name( wells_->name[ w ] );
const_iterator it = prevState.wellMap().find( name );
if( it != end )
{
const int oldIndex = (*it).second[ 0 ];
const int newIndex = w;
// wellSolutions
for( int i = 0; i < np; ++i)
{
wellSolutions()[ i*nw + newIndex ] = prevState.wellSolutions()[i * nw_old + oldIndex ];
}
}
}
}
}
/// Set wellSolutions() based on the base class members. /// Set wellSolutions() based on the base class members.
void setWellSolutions(const PhaseUsage& pu) void setWellSolutions(const PhaseUsage& pu)