mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-26 01:01:00 -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)...);
|
||||
}
|
||||
|
||||
template <class OriginalPreconditioner, class MatrixPtr>
|
||||
template <class OriginalPreconditioner, class MatrixRef>
|
||||
class RebuildOnUpdatePreconditioner : public PreconditionerWithUpdate<typename OriginalPreconditioner::domain_type,
|
||||
typename OriginalPreconditioner::range_type>
|
||||
{
|
||||
public:
|
||||
RebuildOnUpdatePreconditioner(const MatrixPtr &mat_ptr, const int n, const double w, const bool resort)
|
||||
: orig_precond_(std::make_unique<OriginalPreconditioner>(mat_ptr, n, w, resort))
|
||||
, mat_ptr_(mat_ptr)
|
||||
RebuildOnUpdatePreconditioner(const MatrixRef &mat_ref, const int n, const double w, const bool resort)
|
||||
: orig_precond_(std::make_unique<OriginalPreconditioner>(mat_ref, n, w, resort))
|
||||
, mat_ref_(mat_ref)
|
||||
, n_(n)
|
||||
, w_(w)
|
||||
, resort_(resort)
|
||||
@ -124,22 +124,22 @@ public:
|
||||
// Rebuild the preconditioner on update
|
||||
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:
|
||||
std::unique_ptr<OriginalPreconditioner> orig_precond_;
|
||||
const MatrixPtr &mat_ptr_;
|
||||
const MatrixRef &mat_ref_;
|
||||
const int n_;
|
||||
const double w_;
|
||||
const bool resort_;
|
||||
};
|
||||
|
||||
template <class OriginalPreconditioner, class MatrixPtr>
|
||||
std::shared_ptr<RebuildOnUpdatePreconditioner<OriginalPreconditioner, MatrixPtr>>
|
||||
getRebuildOnUpdateWrapper(const MatrixPtr &mat_ptr, const int n, const double w, const bool resort)
|
||||
template <class OriginalPreconditioner, class MatrixRef>
|
||||
std::shared_ptr<RebuildOnUpdatePreconditioner<OriginalPreconditioner, MatrixRef>>
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user