mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
update variable and template names
This commit is contained in:
parent
2a7251efc5
commit
2815a8db86
@ -84,14 +84,14 @@ getDummyUpdateWrapper(Args&&... args)
|
|||||||
return std::make_shared<DummyUpdatePreconditioner<OriginalPreconditioner>>(std::forward<Args>(args)...);
|
return std::make_shared<DummyUpdatePreconditioner<OriginalPreconditioner>>(std::forward<Args>(args)...);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class OriginalPreconditioner, class MatrixPtr>
|
template <class OriginalPreconditioner, class MatrixRef>
|
||||||
class RebuildOnUpdatePreconditioner : public PreconditionerWithUpdate<typename OriginalPreconditioner::domain_type,
|
class RebuildOnUpdatePreconditioner : public PreconditionerWithUpdate<typename OriginalPreconditioner::domain_type,
|
||||||
typename OriginalPreconditioner::range_type>
|
typename OriginalPreconditioner::range_type>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RebuildOnUpdatePreconditioner(const MatrixPtr &mat_ptr, const int n, const double w, const bool resort)
|
RebuildOnUpdatePreconditioner(const MatrixRef &mat_ref, const int n, const double w, const bool resort)
|
||||||
: orig_precond_(std::make_unique<OriginalPreconditioner>(mat_ptr, n, w, resort))
|
: orig_precond_(std::make_unique<OriginalPreconditioner>(mat_ref, n, w, resort))
|
||||||
, mat_ptr_(mat_ptr)
|
, mat_ref_(mat_ref)
|
||||||
, n_(n)
|
, n_(n)
|
||||||
, w_(w)
|
, w_(w)
|
||||||
, resort_(resort)
|
, resort_(resort)
|
||||||
@ -124,22 +124,22 @@ public:
|
|||||||
// Rebuild the preconditioner on update
|
// Rebuild the preconditioner on update
|
||||||
void update() override
|
void update() override
|
||||||
{
|
{
|
||||||
orig_precond_ = std::make_unique<OriginalPreconditioner>(mat_ptr_, n_, w_, resort_);
|
orig_precond_ = std::make_unique<OriginalPreconditioner>(mat_ref_, n_, w_, resort_);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::unique_ptr<OriginalPreconditioner> orig_precond_;
|
std::unique_ptr<OriginalPreconditioner> orig_precond_;
|
||||||
const MatrixPtr &mat_ptr_;
|
const MatrixRef &mat_ref_;
|
||||||
const int n_;
|
const int n_;
|
||||||
const double w_;
|
const double w_;
|
||||||
const bool resort_;
|
const bool resort_;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class OriginalPreconditioner, class MatrixPtr>
|
template <class OriginalPreconditioner, class MatrixRef>
|
||||||
std::shared_ptr<RebuildOnUpdatePreconditioner<OriginalPreconditioner, MatrixPtr>>
|
std::shared_ptr<RebuildOnUpdatePreconditioner<OriginalPreconditioner, MatrixRef>>
|
||||||
getRebuildOnUpdateWrapper(const MatrixPtr &mat_ptr, const int n, const double w, const bool resort)
|
getRebuildOnUpdateWrapper(const MatrixRef &mat_ref, const int n, const double w, const bool resort)
|
||||||
{
|
{
|
||||||
return std::make_shared<RebuildOnUpdatePreconditioner<OriginalPreconditioner, MatrixPtr>>(mat_ptr, n, w, resort);
|
return std::make_shared<RebuildOnUpdatePreconditioner<OriginalPreconditioner, MatrixRef>>(mat_ref, n, w, resort);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Dune
|
} // namespace Dune
|
||||||
|
Loading…
Reference in New Issue
Block a user