Commit aceb7e35 authored by Tomáš Oberhuber's avatar Tomáš Oberhuber
Browse files

Refactoring tnlFunction.

parent 9b0fca53
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -24,12 +24,10 @@

template< int FunctionDimensions,
          typename Real = double >
class tnlConstantFunction : public tnlFunction
class tnlConstantFunction : public tnlFunction< tnlAnalyticFunction>
{
   public:

   static constexpr tnlFunctionType getFunctionType() { return tnlAnalyticFunction; }

   enum { Dimensions = FunctionDimensions };
   typedef Real RealType;
   typedef tnlStaticVector< Dimensions, Real > VertexType;
+1 −3
Original line number Diff line number Diff line
@@ -23,12 +23,10 @@
#include <functors/tnlFunction.h>

template< typename Real >
class tnlExpBumpFunctionBase : public tnlFunction
class tnlExpBumpFunctionBase : public tnlFunction< tnlAnalyticFunction >
{
   public:
      
      static constexpr tnlFunctionType getFunctionType() { return tnlAnalyticFunction; };
      
      typedef Real RealType;

      bool setup( const tnlParameterContainer& parameters,
+2 −1
Original line number Diff line number Diff line
@@ -23,11 +23,12 @@ enum tnlFunctionType { tnlGeneralFunction,
                       tnlDiscreteFunction,
                       tnlAnalyticFunction };

template< tnlFunctionType FunctionType >
class tnlFunction
{
   public:
   
      inline static constexpr tnlFunctionType getFunctionType() { return tnlGeneralFunction; }
      static constexpr tnlFunctionType getFunctionType() { return FunctionType; }
};

#endif	/* TNLFUNCTION_H */
+1 −3
Original line number Diff line number Diff line
@@ -23,12 +23,10 @@
#include <functors/tnlFunction.h>

template< typename Vertex >
class tnlSinBumpsFunctionBase : public tnlFunction
class tnlSinBumpsFunctionBase : public tnlFunction< tnlAnalyticFunction >
{
   public:
      
      static constexpr tnlFunctionType getFunctionType() { return tnlAnalyticFunction; } 
      
      typedef Vertex VertexType;
      typedef typename Vertex::RealType RealType;
      enum { Dimensions = VertexType::size };
+1 −3
Original line number Diff line number Diff line
@@ -23,12 +23,10 @@
#include <functors/tnlFunction.h>

template< typename Real = double >
class tnlSinWaveFunctionBase : public tnlFunction
class tnlSinWaveFunctionBase : public tnlFunction< tnlAnalyticFunction >
{
   public:
      
      static constexpr tnlFunctionType getFunctionType() { return tnlAnalyticFunction; }
      
   tnlSinWaveFunctionBase();

   bool setup( const tnlParameterContainer& parameters,
Loading