mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -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:
@@ -1203,7 +1203,7 @@ namespace Opm {
|
|||||||
auto& well = well_container_[i];
|
auto& well = well_container_[i];
|
||||||
std::shared_ptr<StandardWell<TypeTag> > derived = std::dynamic_pointer_cast<StandardWell<TypeTag> >(well);
|
std::shared_ptr<StandardWell<TypeTag> > derived = std::dynamic_pointer_cast<StandardWell<TypeTag> >(well);
|
||||||
if (derived) {
|
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) \
|
#define INSTANCE(N) \
|
||||||
template class StandardWellEquations<double,N>; \
|
template class StandardWellEquations<double,N>; \
|
||||||
template void StandardWellEquations<double,N>::extract(Linear::IstlSparseMatrixAdapter<MatrixBlock<double,N,N>>&) const;
|
template void StandardWellEquations<double,N>::extract(Linear::IstlSparseMatrixAdapter<MatrixBlock<double,N,N>>&) const;
|
||||||
|
|||||||
@@ -98,6 +98,9 @@ public:
|
|||||||
template<class SparseMatrixAdapter>
|
template<class SparseMatrixAdapter>
|
||||||
void extract(SparseMatrixAdapter& jacobian) const;
|
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
|
// two off-diagonal matrices
|
||||||
OffDiagMatWell duneB_;
|
OffDiagMatWell duneB_;
|
||||||
OffDiagMatWell duneC_;
|
OffDiagMatWell duneC_;
|
||||||
|
|||||||
@@ -1044,13 +1044,6 @@ init(std::vector<double>& perf_depth,
|
|||||||
baseif_.numPerfs(), baseif_.cells());
|
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(...) \
|
#define INSTANCE(...) \
|
||||||
template class StandardWellEval<BlackOilFluidSystem<double,BlackOilDefaultIndexTraits>,__VA_ARGS__,double>;
|
template class StandardWellEval<BlackOilFluidSystem<double,BlackOilDefaultIndexTraits>,__VA_ARGS__,double>;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user