mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-01-26 19:56:27 -06:00
added: StandardWellEquations::getNumBlocks()
this returns the number of blocks in in B/C matrices. use the new method in the well implementation.
This commit is contained in:
parent
f2d8a073f9
commit
b24f22312e
@ -1203,7 +1203,7 @@ namespace Opm {
|
||||
auto& well = well_container_[i];
|
||||
std::shared_ptr<StandardWell<TypeTag> > derived = std::dynamic_pointer_cast<StandardWell<TypeTag> >(well);
|
||||
if (derived) {
|
||||
wellContribs.addNumBlocks(derived->getNumBlocks());
|
||||
wellContribs.addNumBlocks(derived->linSys().getNumBlocks());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -262,6 +262,13 @@ extract(SparseMatrixAdapter& jacobian) const
|
||||
}
|
||||
}
|
||||
|
||||
template<class Scalar, int numEq>
|
||||
unsigned int StandardWellEquations<Scalar,numEq>::
|
||||
getNumBlocks() const
|
||||
{
|
||||
return duneB_.nonzeroes();
|
||||
}
|
||||
|
||||
#define INSTANCE(N) \
|
||||
template class StandardWellEquations<double,N>; \
|
||||
template void StandardWellEquations<double,N>::extract(Linear::IstlSparseMatrixAdapter<MatrixBlock<double,N,N>>&) const;
|
||||
|
@ -98,6 +98,9 @@ public:
|
||||
template<class SparseMatrixAdapter>
|
||||
void extract(SparseMatrixAdapter& jacobian) const;
|
||||
|
||||
//! \brief Get the number of blocks of the C and B matrices.
|
||||
unsigned int getNumBlocks() const;
|
||||
|
||||
// two off-diagonal matrices
|
||||
OffDiagMatWell duneB_;
|
||||
OffDiagMatWell duneC_;
|
||||
|
@ -1044,13 +1044,6 @@ init(std::vector<double>& perf_depth,
|
||||
baseif_.numPerfs(), baseif_.cells());
|
||||
}
|
||||
|
||||
template<class FluidSystem, class Indices, class Scalar>
|
||||
unsigned int StandardWellEval<FluidSystem,Indices,Scalar>::
|
||||
getNumBlocks() const
|
||||
{
|
||||
return linSys_.duneB_.nonzeroes();
|
||||
}
|
||||
|
||||
#define INSTANCE(...) \
|
||||
template class StandardWellEval<BlackOilFluidSystem<double,BlackOilDefaultIndexTraits>,__VA_ARGS__,double>;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user