Skip to content
Snippets Groups Projects
Commit d147c562 authored by Chris Cantwell's avatar Chris Cantwell
Browse files

Tidy up. Put implementation in detail namespace.

parent 2e3f27fb
No related branches found
No related tags found
1 merge request!1Updated code to use a common base class and single factory pattern.
#include "BwdTransSumFac.hpp"
#include "BwdTransMatFree.hpp"
namespace Nektar::Operators
namespace Nektar::Operators::detail
{
// Add different BwdTrans implementations to the factory.
template <>
std::string OperatorBwdTransImpl<double, ImplMatFree>::className =
GetOperatorFactory<double>().RegisterCreatorFunction(
......
#include "Operators/OperatorBwdTrans.hpp"
namespace Nektar::Operators
namespace Nektar::Operators::detail
{
// Matrix-free implementation
......
#include "Operators/OperatorBwdTrans.hpp"
namespace Nektar::Operators
namespace Nektar::Operators::detail
{
// sum-factorisation implementation
......
......@@ -6,27 +6,6 @@
namespace Nektar::Operators
{
// Fwd declaration
template <typename TData>
class OperatorBwdTrans;
template< typename TData>
struct BwdTrans;
// Descriptor / traits class for BwdTrans
template<typename TData = default_fp_type>
struct BwdTrans {
using class_name = OperatorBwdTrans<TData>;
static const std::string key;
static const std::string default_impl;
static std::unique_ptr<class_name> create(std::string pKey = "")
{
return Operator<TData>::template create<BwdTrans>(pKey);
}
};
// BwdTrans base class
// Defines the apply operator to enforce apply parameter types
template <typename TData>
......@@ -42,10 +21,24 @@ public:
}
};
// Descriptor / traits class for BwdTrans
template<typename TData = default_fp_type>
struct BwdTrans {
using class_name = OperatorBwdTrans<TData>;
static const std::string key;
static const std::string default_impl;
static std::unique_ptr<class_name> create(std::string pKey = "")
{
return Operator<TData>::template create<BwdTrans>(pKey);
}
};
namespace detail {
// Template for BwdTrans implementations
template <typename TData, typename Op>
class OperatorBwdTransImpl;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment