Loading examples/simple-solver/main.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -20,9 +20,17 @@ #include <config/tnlBasicTypesSetter.h> #include <solvers/tnlProblemSolver.h> #include <core/tnlHost.h> #include <config/tnlParameterContainer.h> int main( int argc, char* argv[] ) { typedef simpleProblemTypesSetter ProblemSetter; tnlParameterContainer parameters; ProblemSetter problemSetter; problemSetter. run< double, tnlHost, int >( parameters ); typedef tnlBasicTypesSetter< ProblemSetter > BasicTypesSetter; tnlProblemSolver< BasicTypesSetter > problemSolver; if( ! problemSolver. run( CONFIG_FILE, argc, argv ) ) Loading src/implementation/config/tnlBasicTypesSetter_impl.h +4 −1 Original line number Diff line number Diff line Loading @@ -111,11 +111,14 @@ bool tnlBasicTypesSetter< ProblemTypesSetter > :: setDeviceType( const tnlParame return false; } ProblemTypesSetter problemTypesSetter; /*const tnlString& device2 = parameters. GetParameter< tnlString >( "device" ); problemTypesSetter. run< double, tnlHost, int >( parameters ); problemTypesSetter. run< RealType, tnlHost, IndexType >( parameters ); if( device == "host" ) return problemTypesSetter. run< RealType, tnlHost, IndexType >( parameters ); if( device == "cuda" ) return problemTypesSetter. run( parameters ); cerr << "The device '" << device << "' is not defined. " << endl; cerr << "The device '" << device << "' is not defined. " << endl;*/ return false; } Loading src/implementation/solvers/linear/krylov/tnlGMRESSolver_impl.h +2 −1 Original line number Diff line number Diff line Loading @@ -272,12 +272,13 @@ tnlGMRESSolver< Matrix, Preconditioner > :: ~tnlGMRESSolver() template< typename Matrix, typename Preconditioner > template< typename Vector > void tnlGMRESSolver< Matrix, Preconditioner > :: update( IndexType k, IndexType m, const tnlVector< RealType, tnlHost, IndexType >& H, const tnlVector< RealType, tnlHost, IndexType >& s, tnlVector< RealType, DeviceType, IndexType >& v, tnlVector< RealType, DeviceType, IndexType >& x ) Vector& x ) { //dbgFunctionName( "tnlGMRESSolver", "Update" ); tnlVector< RealType, tnlHost, IndexType > y( "tnlGMRESSolver::update:y" ); Loading src/solvers/linear/krylov/tnlGMRESSolver.h +2 −1 Original line number Diff line number Diff line Loading @@ -59,12 +59,13 @@ class tnlGMRESSolver : public tnlObject, protected: template< typename Vector > void update( IndexType k, IndexType m, const tnlVector< RealType, tnlHost, IndexType >& H, const tnlVector< RealType, tnlHost, IndexType >& s, tnlVector< RealType, DeviceType, IndexType >& v, tnlVector< RealType, DeviceType, IndexType >& x ); Vector& x ); void generatePlaneRotation( RealType &dx, RealType &dy, Loading Loading
examples/simple-solver/main.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -20,9 +20,17 @@ #include <config/tnlBasicTypesSetter.h> #include <solvers/tnlProblemSolver.h> #include <core/tnlHost.h> #include <config/tnlParameterContainer.h> int main( int argc, char* argv[] ) { typedef simpleProblemTypesSetter ProblemSetter; tnlParameterContainer parameters; ProblemSetter problemSetter; problemSetter. run< double, tnlHost, int >( parameters ); typedef tnlBasicTypesSetter< ProblemSetter > BasicTypesSetter; tnlProblemSolver< BasicTypesSetter > problemSolver; if( ! problemSolver. run( CONFIG_FILE, argc, argv ) ) Loading
src/implementation/config/tnlBasicTypesSetter_impl.h +4 −1 Original line number Diff line number Diff line Loading @@ -111,11 +111,14 @@ bool tnlBasicTypesSetter< ProblemTypesSetter > :: setDeviceType( const tnlParame return false; } ProblemTypesSetter problemTypesSetter; /*const tnlString& device2 = parameters. GetParameter< tnlString >( "device" ); problemTypesSetter. run< double, tnlHost, int >( parameters ); problemTypesSetter. run< RealType, tnlHost, IndexType >( parameters ); if( device == "host" ) return problemTypesSetter. run< RealType, tnlHost, IndexType >( parameters ); if( device == "cuda" ) return problemTypesSetter. run( parameters ); cerr << "The device '" << device << "' is not defined. " << endl; cerr << "The device '" << device << "' is not defined. " << endl;*/ return false; } Loading
src/implementation/solvers/linear/krylov/tnlGMRESSolver_impl.h +2 −1 Original line number Diff line number Diff line Loading @@ -272,12 +272,13 @@ tnlGMRESSolver< Matrix, Preconditioner > :: ~tnlGMRESSolver() template< typename Matrix, typename Preconditioner > template< typename Vector > void tnlGMRESSolver< Matrix, Preconditioner > :: update( IndexType k, IndexType m, const tnlVector< RealType, tnlHost, IndexType >& H, const tnlVector< RealType, tnlHost, IndexType >& s, tnlVector< RealType, DeviceType, IndexType >& v, tnlVector< RealType, DeviceType, IndexType >& x ) Vector& x ) { //dbgFunctionName( "tnlGMRESSolver", "Update" ); tnlVector< RealType, tnlHost, IndexType > y( "tnlGMRESSolver::update:y" ); Loading
src/solvers/linear/krylov/tnlGMRESSolver.h +2 −1 Original line number Diff line number Diff line Loading @@ -59,12 +59,13 @@ class tnlGMRESSolver : public tnlObject, protected: template< typename Vector > void update( IndexType k, IndexType m, const tnlVector< RealType, tnlHost, IndexType >& H, const tnlVector< RealType, tnlHost, IndexType >& s, tnlVector< RealType, DeviceType, IndexType >& v, tnlVector< RealType, DeviceType, IndexType >& x ); Vector& x ); void generatePlaneRotation( RealType &dx, RealType &dy, Loading