Commit 9a131027 authored by incardon's avatar incardon

Adding coverty test

parent 221788ce
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
## Take all the options with the exception of --enable-install-req ## Take all the options with the exception of --enable-install-req
AC_PREREQ(2.59) AC_PREREQ(2.59)
AC_INIT(OpenFPM_numerics, 0.8.0, BUG-REPORT-ADDRESS) AC_INIT(OpenFPM_numerics, 1.0.0, BUG-REPORT-ADDRESS)
AC_CANONICAL_SYSTEM AC_CANONICAL_SYSTEM
AC_CONFIG_SRCDIR([src/main.cpp]) AC_CONFIG_SRCDIR([src/main.cpp])
...@@ -131,6 +131,27 @@ AX_LIB_PETSC() ...@@ -131,6 +131,27 @@ AX_LIB_PETSC()
######### #########
###### Check for test coverage
AC_MSG_CHECKING(whether to build with test coverage)
test_cov=no
AC_ARG_ENABLE(test-coverage,
AC_HELP_STRING(
[--enable-test-coverage],
[enable test coverage]
),
test_cov="$enableval"
)
AC_MSG_RESULT($test_cov)
if test x"$test_cov" = x"yes"; then
AC_DEFINE([TEST_COVERAGE_MODE],[],[Test coverage mode])
CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage "
fi
## Check for quadmath ## Check for quadmath
AC_LANG_PUSH([C++]) AC_LANG_PUSH([C++])
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <fstream> #include <fstream>
#include "Solvers/petsc_solver.hpp" #include "Solvers/petsc_solver.hpp"
#include "Vector/map_vector.hpp"
/*! \brief It contain information about the performance of the AMG /*! \brief It contain information about the performance of the AMG
* *
...@@ -189,7 +190,7 @@ class petsc_AMG_report ...@@ -189,7 +190,7 @@ class petsc_AMG_report
/*! \brief Score the solver /*! \brief Score the solver
* *
* \param t_solve time to solve * \param t_solve time to solve
* \param t_m accuracy reache by the solver * \param t_m target accuracy the solver should reach
* *
* *
*/ */
...@@ -506,9 +507,8 @@ class petsc_AMG_report ...@@ -506,9 +507,8 @@ class petsc_AMG_report
/*! \brief Return the best scoring solver /*! \brief Return the best scoring solver
* *
* \param perf where to search for the best score * \param perf where to search for the best score
* \param optimal number of sweeps for each tested method
* \param mn number of method tested * \param mn number of method tested
* \param sw_accu best sweep for the best in accuracy
* \param sw_fast best sweep for the best in performance
* *
*/ */
void best_score(openfpm::vector<AMG_time_err_coars> & perf, void best_score(openfpm::vector<AMG_time_err_coars> & perf,
......
...@@ -373,7 +373,7 @@ inline size_t getSub(Point<vector::dims,typename vector::stype> & p, ...@@ -373,7 +373,7 @@ inline size_t getSub(Point<vector::dims,typename vector::stype> & p,
/*! \brief calculate the interpolation for one point /*! \brief calculate the interpolation for one point
* *
* \tparam vector of particles * \tparam vector of particles
* \kernel type * \tparam kernel type
* *
*/ */
template<typename vector,typename kernel> template<typename vector,typename kernel>
...@@ -390,12 +390,21 @@ struct inte_calc_impl ...@@ -390,12 +390,21 @@ struct inte_calc_impl
* *
* \param it iterator used to retrieve the particle p for interpolation * \param it iterator used to retrieve the particle p for interpolation
* \param vd vector of particles * \param vd vector of particles
* \param domain * \param domain simulation domain
* \param ip index of the grid on each direction (1D) used for interpolation * \param ip index of the grid on each direction (1D) used for interpolation
* \param gd interpolation grid * \param gd interpolation grid
* \param dx spacing on each direction * \param dx spacing on each direction
* \param xp Point that store the position of xp * \param xp Point that store the position of xp
* \param a_int buffer that store the interpolation points * \param a_int coefficients on the stencil points
* \param a coefficients of the kernel for each direction, consider
* that for 3 dimensions the kernel is the multiplication
* the 1D kernel on each direction. The "a" array store the
* calculated coefficient of the 1D kernel on each direction
* \param x position of
* \param sz grid size
* \param geo_cell cell list to convert particle position into sub-domain id
* \param offsets array where are stored the linearized offset of the
* kernel stencil for each local grid (sub-domain)
* *
*/ */
template<unsigned int prp_g, unsigned int prp_v, unsigned int m2p_or_p2m, typename iterator, typename grid> template<unsigned int prp_g, unsigned int prp_v, unsigned int m2p_or_p2m, typename iterator, typename grid>
...@@ -534,7 +543,8 @@ class interpolate ...@@ -534,7 +543,8 @@ class interpolate
/*! \brief It calculate the interpolation stencil offsets /*! \brief It calculate the interpolation stencil offsets
* *
* \param array where to store offsets * \param offsets array where to store the linearized offset of the
* kernel stencil for each local-grid (sub-domain)
* \param sz kernel stencil points in each direction * \param sz kernel stencil points in each direction
* *
*/ */
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment