diff --git a/MathLib/LinAlg/Eigen/EigenLinearSolver.h b/MathLib/LinAlg/Eigen/EigenLinearSolver.h index 8d428c88f4ec4b142b72cb626e573064a10d32f8..689960407ec5307b231654be0c3281c707d95127 100644 --- a/MathLib/LinAlg/Eigen/EigenLinearSolver.h +++ b/MathLib/LinAlg/Eigen/EigenLinearSolver.h @@ -22,8 +22,6 @@ namespace MathLib class EigenMatrix; -/** - */ class EigenLinearSolver final { public: @@ -35,20 +33,17 @@ public: } /** - * configure linear solvers - * @param option + * parse linear solvers configuration */ void setOption(const boost::property_tree::ptree &option); /** - * configure linear solvers - * @param option + * copy linear solvers options */ void setOption(const EigenOption &option) { _option = option; } /** * get linear solver options - * @return */ EigenOption &getOption() { return _option; } diff --git a/MathLib/LinAlg/Eigen/EigenMatrix.h b/MathLib/LinAlg/Eigen/EigenMatrix.h index 79b54e5cb0c388e5dadfcf85877310042bcfb9f7..4cb2bbb4d510331c7b7559f693722b69a80847fb 100644 --- a/MathLib/LinAlg/Eigen/EigenMatrix.h +++ b/MathLib/LinAlg/Eigen/EigenMatrix.h @@ -36,7 +36,7 @@ public: /** * constructor - * @param n_rows the number of rows (that is equal to the number of columns) + * @param n the number of rows (that is equal to the number of columns) */ explicit EigenMatrix(std::size_t n) :_mat(n, n) {} @@ -95,16 +95,14 @@ public: this->add(indices.rows, indices.columns, sub_matrix, fkt); } - /** - * Add sub-matrix at positions \c row_pos and \c col_pos. If the entries doesn't - * exist in the matrix, the values are inserted. - * @param row_pos a vector of row position indices. The vector size should - * equal to the number of rows in the given sub-matrix. - * @param col_pos a vector of column position indices. The vector size should - * equal to the number of columns in the given sub-matrix. - * @param sub_matrix a sub-matrix to be added - * @param fkt a scaling factor applied to all entries in the sub-matrix - */ + /// Add sub-matrix at positions \c row_pos and \c col_pos. If the entries doesn't + /// exist in the matrix, the values are inserted. + /// @param row_pos a vector of row position indices. The vector size should + /// equal to the number of rows in the given sub-matrix. + /// @param col_pos a vector of column position indices. The vector size should + /// equal to the number of columns in the given sub-matrix. + /// @param sub_matrix a sub-matrix to be added + /// @param fkt a scaling factor applied to all entries in the sub-matrix template <class T_DENSE_MATRIX> void add(std::vector<std::size_t> const& row_pos, std::vector<std::size_t> const& col_pos, const T_DENSE_MATRIX &sub_matrix, diff --git a/MathLib/LinAlg/Eigen/EigenOption.h b/MathLib/LinAlg/Eigen/EigenOption.h index a7ef314ff3779e29911b3563eed4014bb1a051e7..e38927baecb65219ea00348398c1249a69418536 100644 --- a/MathLib/LinAlg/Eigen/EigenOption.h +++ b/MathLib/LinAlg/Eigen/EigenOption.h @@ -15,9 +15,7 @@ namespace MathLib { -/** - * \brief Option for Eigen sparse solver - */ +/// \brief Option for Eigen sparse solver struct EigenOption final { /// Solver type @@ -45,35 +43,29 @@ struct EigenOption final /// Error tolerance double error_tolerance; - /** - * Constructor - * - * Default options are CG, no preconditioner, iteration count 500 and - * tolerance 1e-10. Default matrix storage type is CRS. - */ + /// Constructor + /// + /// Default options are CG, no preconditioner, iteration count 500 and + /// tolerance 1e-10. Default matrix storage type is CRS. EigenOption(); - /** - * return a linear solver type from the solver name - * - * @param solver_name - * @return a linear solver type - * If there is no solver type matched with the given name, INVALID - * is returned. - */ + /// return a linear solver type from the solver name + /// + /// @param solver_name + /// @return a linear solver type + /// If there is no solver type matched with the given name, INVALID + /// is returned. static SolverType getSolverType(const std::string &solver_name); - /** - * return a preconditioner type from the name - * - * @param precon_name - * @return a preconditioner type - * If there is no preconditioner type matched with the given name, NONE - * is returned. - */ + /// return a preconditioner type from the name + /// + /// @param precon_name + /// @return a preconditioner type + /// If there is no preconditioner type matched with the given name, NONE + /// is returned. static PreconType getPreconType(const std::string &precon_name); }; } -#endif //LIS_OPTION_H_ +#endif // EIGENOPTION_H_ diff --git a/MathLib/LinAlg/Eigen/EigenVector.h b/MathLib/LinAlg/Eigen/EigenVector.h index ca52dc1481ca49d6151c27185af209087a2d211d..373ed3906402f1e1664a40be958352a9fc27f569 100644 --- a/MathLib/LinAlg/Eigen/EigenVector.h +++ b/MathLib/LinAlg/Eigen/EigenVector.h @@ -21,18 +21,14 @@ namespace MathLib { -/** - * Global vector based on Eigen vector - */ +/// Global vector based on Eigen vector class EigenVector final { public: using RawVectorType = Eigen::VectorXd; - /** - * Constructor for initialization of the number of rows - * @param length number of rows - */ + /// Constructor for initialization of the number of rows + /// @param length number of rows explicit EigenVector(std::size_t length) : _vec(length) {} /// copy constructor @@ -88,10 +84,10 @@ public: void write (const std::string &filename) const { std::ofstream os(filename); os << _vec; } #endif - /// return a raw Lis vector object + /// return a raw Eigen vector object RawVectorType& getRawVector() {return _vec; } - /// return a raw Lis vector object + /// return a raw Eigen vector object const RawVectorType& getRawVector() const {return _vec; } /// vector operation: set data diff --git a/MathLib/LinAlg/EigenLis/EigenLisLinearSolver.h b/MathLib/LinAlg/EigenLis/EigenLisLinearSolver.h index 4629b9e834987d2ae5e175f806c39d8f3f026de2..168e4dcca5da78f87b406421ba9dde970985a65b 100644 --- a/MathLib/LinAlg/EigenLis/EigenLisLinearSolver.h +++ b/MathLib/LinAlg/EigenLis/EigenLisLinearSolver.h @@ -38,20 +38,17 @@ public: EigenLisLinearSolver(EigenMatrix &A, boost::property_tree::ptree const*const option = nullptr); /** - * configure linear solvers - * @param option + * parse linear solvers configuration */ void setOption(const boost::property_tree::ptree &option); /** - * configure linear solvers - * @param option + * copy linear solvers options */ void setOption(const LisOption &option) { _option = option; } /** * get linear solver options - * @return */ LisOption &getOption() { return _option; }