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

Fixes of Jacobi and SOR solver to be acepted by nvcc.

parent 1e0dc11b
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -121,16 +121,17 @@ class Jacobi

      using VectorType = TNL::Containers::Vector< RealType, DeviceType, IndexType >;

      void performIteration( const ConstVectorViewType& b,
                             const ConstVectorViewType& diagonalView,
                             const ConstVectorViewType& in,
                             VectorViewType& out ) const;

      RealType omega = 1.0;

      IndexType residuePeriod = 4;

      VectorType diagonal;

   public: // because nvcc does not accept lambda functions within private or protected methods
      void performIteration( const ConstVectorViewType& b,
                           const ConstVectorViewType& diagonalView,
                           const ConstVectorViewType& in,
                           VectorViewType& out ) const;
};

      } // namespace Linear
+6 −4
Original line number Diff line number Diff line
@@ -122,15 +122,17 @@ class SOR
   protected:
      using VectorType = TNL::Containers::Vector< RealType, DeviceType, IndexType >;

      void performIteration( const ConstVectorViewType& b,
                             const ConstVectorViewType& diagonalView,
                             VectorViewType& x ) const;

      RealType omega = 1.0;

      IndexType residuePeriod = 4;

      VectorType diagonal;

   public: // because nvcc does not accept lambda functions within private or protected methods
      void performIteration( const ConstVectorViewType& b,
                             const ConstVectorViewType& diagonalView,
                             VectorViewType& x ) const;

};

      } // namespace Linear