Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
1 merge request!116Documentation for linear solvers and preconditioners
......@@ -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
......
......@@ -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
......
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