Loading src/TNL/Solvers/Linear/Jacobi.h +15 −1 Original line number Diff line number Diff line Loading @@ -62,7 +62,7 @@ class Jacobi * defines the following: * * \e jacobi-omega - relaxation parameter of the weighted/damped Jacobi method - 1.0 by default. * \e residue-period - says after how many iterations the reside is recomputed - 4 by default. * \e residue-period - number of iterations between subsequent recomputations of the residue - 4 by default. * * \param config contains description of configuration parameters. * \param prefix is a prefix of particular configuration entries. Loading Loading @@ -91,6 +91,20 @@ class Jacobi */ RealType getOmega() const; /** * \brief Set the period for a recomputation of the residue. * * \param period number of iterations between subsequent recomputations of the residue. */ void setResiduePeriod( IndexType period ); /** * \brief Get the period for a recomputation of the residue. * * \return number of iterations between subsequent recomputations of the residue. */ IndexType getResiduePerid() const; /** * \brief Method for solving of a linear system. * Loading src/TNL/Solvers/Linear/Jacobi.hpp +19 −1 Original line number Diff line number Diff line Loading @@ -24,7 +24,7 @@ configSetup( Config::ConfigDescription& config, const String& prefix ) { LinearSolver< Matrix >::configSetup( config, prefix ); config.addEntry< double >( prefix + "jacobi-omega", "Relaxation parameter of the weighted/damped Jacobi method.", 1.0 ); config.addEntry< int >( prefix + "residue-period", "Says after how many iterations the reside is recomputed.", 4 ); config.addEntry< int >( prefix + "residue-period", "Number of iterations between subsequent recomputations of the residue.", 4 ); } template< typename Matrix > Loading @@ -38,6 +38,8 @@ setup( const Config::ParameterContainer& parameters, const String& prefix ) { std::cerr << "Warning: The Jacobi method parameter omega is out of interval (0,2). The value is " << this->omega << " the method will not converge." << std::endl; } if( parameters.checkParameter( prefix + "residue-period" ) ) this->setResiduePeriod( parameters.getParameter< int >( prefix + "residue-period" ) ); return LinearSolver< Matrix >::setup( parameters, prefix ); } Loading @@ -57,6 +59,22 @@ getOmega() const -> RealType return omega; } template< typename Matrix > void Jacobi< Matrix >:: setResiduePeriod( IndexType period ) { this->residuePeriod = period; } template< typename Matrix > auto Jacobi< Matrix >:: getResiduePerid() const -> IndexType { return this->residuePeriod; } template< typename Matrix > bool Jacobi< Matrix >:: Loading Loading
src/TNL/Solvers/Linear/Jacobi.h +15 −1 Original line number Diff line number Diff line Loading @@ -62,7 +62,7 @@ class Jacobi * defines the following: * * \e jacobi-omega - relaxation parameter of the weighted/damped Jacobi method - 1.0 by default. * \e residue-period - says after how many iterations the reside is recomputed - 4 by default. * \e residue-period - number of iterations between subsequent recomputations of the residue - 4 by default. * * \param config contains description of configuration parameters. * \param prefix is a prefix of particular configuration entries. Loading Loading @@ -91,6 +91,20 @@ class Jacobi */ RealType getOmega() const; /** * \brief Set the period for a recomputation of the residue. * * \param period number of iterations between subsequent recomputations of the residue. */ void setResiduePeriod( IndexType period ); /** * \brief Get the period for a recomputation of the residue. * * \return number of iterations between subsequent recomputations of the residue. */ IndexType getResiduePerid() const; /** * \brief Method for solving of a linear system. * Loading
src/TNL/Solvers/Linear/Jacobi.hpp +19 −1 Original line number Diff line number Diff line Loading @@ -24,7 +24,7 @@ configSetup( Config::ConfigDescription& config, const String& prefix ) { LinearSolver< Matrix >::configSetup( config, prefix ); config.addEntry< double >( prefix + "jacobi-omega", "Relaxation parameter of the weighted/damped Jacobi method.", 1.0 ); config.addEntry< int >( prefix + "residue-period", "Says after how many iterations the reside is recomputed.", 4 ); config.addEntry< int >( prefix + "residue-period", "Number of iterations between subsequent recomputations of the residue.", 4 ); } template< typename Matrix > Loading @@ -38,6 +38,8 @@ setup( const Config::ParameterContainer& parameters, const String& prefix ) { std::cerr << "Warning: The Jacobi method parameter omega is out of interval (0,2). The value is " << this->omega << " the method will not converge." << std::endl; } if( parameters.checkParameter( prefix + "residue-period" ) ) this->setResiduePeriod( parameters.getParameter< int >( prefix + "residue-period" ) ); return LinearSolver< Matrix >::setup( parameters, prefix ); } Loading @@ -57,6 +59,22 @@ getOmega() const -> RealType return omega; } template< typename Matrix > void Jacobi< Matrix >:: setResiduePeriod( IndexType period ) { this->residuePeriod = period; } template< typename Matrix > auto Jacobi< Matrix >:: getResiduePerid() const -> IndexType { return this->residuePeriod; } template< typename Matrix > bool Jacobi< Matrix >:: Loading