2023-09-27 08:47:05 -05:00
|
|
|
#ifndef OPM_EXTRASMOOTHERS_HPP
|
|
|
|
#define OPM_EXTRASMOOTHERS_HPP
|
|
|
|
|
|
|
|
#include "DILU.hpp"
|
|
|
|
|
|
|
|
namespace Dune
|
|
|
|
{
|
|
|
|
template <class M, class X, class Y>
|
2023-10-18 08:44:58 -05:00
|
|
|
class MultithreadDILU;
|
2023-09-27 08:47:05 -05:00
|
|
|
|
|
|
|
namespace Amg
|
|
|
|
{
|
|
|
|
/**
|
2023-10-18 08:44:58 -05:00
|
|
|
* @brief Policy for the construction of the MultithreadDILU smoother
|
2023-09-27 08:47:05 -05:00
|
|
|
*/
|
|
|
|
template <class M, class X, class Y>
|
2023-10-18 08:44:58 -05:00
|
|
|
struct ConstructionTraits<MultithreadDILU<M, X, Y>> {
|
|
|
|
using Arguments = DefaultConstructionArgs<MultithreadDILU<M, X, Y>>;
|
2023-09-27 08:47:05 -05:00
|
|
|
|
|
|
|
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7)
|
2023-10-18 08:44:58 -05:00
|
|
|
static inline std::shared_ptr<MultithreadDILU<M, X, Y>> construct(Arguments& args) {
|
|
|
|
return std::make_shared<MultithreadDILU<M, X, Y>>(args.getMatrix());
|
2023-09-27 08:47:05 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
#else
|
2023-10-18 08:44:58 -05:00
|
|
|
static inline MultithreadDILU<M, X, Y>* construct(Arguments& args) {
|
|
|
|
return new MultithreadDILU<M, X, Y>(args.getMatrix());
|
2023-09-27 08:47:05 -05:00
|
|
|
}
|
|
|
|
|
2023-10-18 08:44:58 -05:00
|
|
|
static void deconstruct(MultithreadDILU<M, X, Y>* dilu) {
|
2023-09-27 08:47:05 -05:00
|
|
|
delete dilu;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace Amg
|
|
|
|
} // namespace Dune
|
|
|
|
#endif // OPM_EXTRASMOOTHERS_HPP
|