mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
remove 2.6 and move ownerFirst in lb
This commit is contained in:
parent
866a661255
commit
c91eb330d3
@ -193,6 +193,7 @@ public:
|
|||||||
{
|
{
|
||||||
const auto wells = this->schedule().getWellsatEnd();
|
const auto wells = this->schedule().getWellsatEnd();
|
||||||
|
|
||||||
|
|
||||||
auto& eclState = static_cast<ParallelEclipseState&>(this->eclState());
|
auto& eclState = static_cast<ParallelEclipseState&>(this->eclState());
|
||||||
const EclipseGrid* eclGrid = nullptr;
|
const EclipseGrid* eclGrid = nullptr;
|
||||||
|
|
||||||
|
@ -208,34 +208,26 @@ public:
|
|||||||
typedef Dune::CollectiveCommunication< int > communication_type;
|
typedef Dune::CollectiveCommunication< int > communication_type;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 6)
|
|
||||||
Dune::SolverCategory::Category category() const override
|
Dune::SolverCategory::Category category() const override
|
||||||
{
|
{
|
||||||
return overlapping ?
|
return overlapping ?
|
||||||
Dune::SolverCategory::overlapping : Dune::SolverCategory::sequential;
|
Dune::SolverCategory::overlapping : Dune::SolverCategory::sequential;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
enum {
|
|
||||||
//! \brief The solver category.
|
|
||||||
category = overlapping ?
|
|
||||||
Dune::SolverCategory::overlapping :
|
|
||||||
Dune::SolverCategory::sequential
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//! constructor: just store a reference to a matrix
|
//! constructor: just store a reference to a matrix
|
||||||
WellModelGhostLastMatrixAdapter (const M& A,
|
WellModelGhostLastMatrixAdapter (const M& A,
|
||||||
const M& A_for_precond,
|
const M& A_for_precond,
|
||||||
const WellModel& wellMod,
|
const WellModel& wellMod,
|
||||||
const size_t interiorSize,
|
const size_t interiorSize,
|
||||||
const boost::any& parallelInformation = boost::any() )
|
const std::any& parallelInformation OPM_UNUSED_NOMPI = std::any() )
|
||||||
: A_( A ), A_for_precond_(A_for_precond), wellMod_( wellMod ), interiorSize_(interiorSize), comm_()
|
: A_( A ), A_for_precond_(A_for_precond), wellMod_( wellMod ), interiorSize_(interiorSize), comm_()
|
||||||
{
|
{
|
||||||
#if HAVE_MPI
|
#if HAVE_MPI
|
||||||
if( parallelInformation.type() == typeid(ParallelISTLInformation) )
|
if( parallelInformation.type() == typeid(ParallelISTLInformation) )
|
||||||
{
|
{
|
||||||
const ParallelISTLInformation& info =
|
const ParallelISTLInformation& info =
|
||||||
boost::any_cast<const ParallelISTLInformation&>( parallelInformation);
|
std::any_cast<const ParallelISTLInformation&>( parallelInformation);
|
||||||
comm_.reset( new communication_type( info.communicator() ) );
|
comm_.reset( new communication_type( info.communicator() ) );
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -243,8 +235,7 @@ public:
|
|||||||
|
|
||||||
virtual void apply( const X& x, Y& y ) const
|
virtual void apply( const X& x, Y& y ) const
|
||||||
{
|
{
|
||||||
unsigned row_count = 0;
|
for (auto row = A_.begin(); row.index() < interiorSize_; ++row)
|
||||||
for (auto row = A_.begin(); row_count < interiorSize_; ++row, ++row_count)
|
|
||||||
{
|
{
|
||||||
y[row.index()]=0;
|
y[row.index()]=0;
|
||||||
auto endc = (*row).end();
|
auto endc = (*row).end();
|
||||||
@ -261,9 +252,7 @@ public:
|
|||||||
// y += \alpha * A * x
|
// y += \alpha * A * x
|
||||||
virtual void applyscaleadd (field_type alpha, const X& x, Y& y) const
|
virtual void applyscaleadd (field_type alpha, const X& x, Y& y) const
|
||||||
{
|
{
|
||||||
//auto first_row = A_.begin();
|
for (auto row = A_.begin(); row.index() < interiorSize_; ++row)
|
||||||
unsigned row_count = 0;
|
|
||||||
for (auto row = A_.begin(); row_count < interiorSize_; ++row, ++row_count)
|
|
||||||
{
|
{
|
||||||
auto endc = (*row).end();
|
auto endc = (*row).end();
|
||||||
for (auto col = (*row).begin(); col != endc; ++col)
|
for (auto col = (*row).begin(); col != endc; ++col)
|
||||||
@ -670,11 +659,11 @@ struct GhostLastSPChooser<X,C,Dune::SolverCategory::overlapping>
|
|||||||
solve(linearOperator, x, istlb, *sp, *precond, result);
|
solve(linearOperator, x, istlb, *sp, *precond, result);
|
||||||
} // end Dune call
|
} // end Dune call
|
||||||
#else
|
#else
|
||||||
// Construct preconditioner.
|
// Construct preconditioner.
|
||||||
auto precond = constructPrecond(linearOperator, parallelInformation_arg);
|
auto precond = constructPrecond(linearOperator, parallelInformation_arg);
|
||||||
|
|
||||||
// Solve.
|
// Solve.
|
||||||
solve(linearOperator, x, istlb, *sp, *precond, result);
|
solve(linearOperator, x, istlb, *sp, *precond, result);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user