Commit 8980f2a5 authored by incardon's avatar incardon

Reverting to previous interpolation untill clarification

parent 0f84683a
......@@ -717,6 +717,23 @@ class petsc_solver<double>
KSPDestroy(&ksp);
}
/*! \brief Return the norm error of the solution
*
* \param x_ the solution
* \param b_ the right-hand-side
*
* \return the solution error
*
*/
static solError getSolNormError(const Vec & b_, const Vec & x_,KSP ksp)
{
Mat A_;
Mat P_;
KSPGetOperators(ksp,&A_,&P_);
return getSolNormError(A_,b_,x_);
}
/*! \brief Return the norm error of the solution
*
* \param A_ the matrix that identity the linear system
......@@ -1259,6 +1276,20 @@ public:
return getSolNormError(A.getMat(),b.getVec(),x.getVec());
}
/*! \brief It return the resiual error
*
* \param A Sparse matrix
* \param x solution
* \param b right-hand-side
*
* \return the solution error norms
*
*/
solError get_residual_error(const Vector<double,PETSC_BASE> & x, const Vector<double,PETSC_BASE> & b)
{
return getSolNormError(b.getVec(),x.getVec(),ksp);
}
/*! \brief Here we invert the matrix and solve the system
*
* \param A sparse matrix
......
This diff is collapsed.
This diff is collapsed.
......@@ -9,8 +9,8 @@
#define OPENFPM_NUMERICS_SRC_INTERPOLATION_INTERPOLATION_UNIT_TESTS_HPP_
#include "interpolation/mp4_kernel.hpp"
#include "interpolation/interpolation.hpp"
#include "interpolation/z_spline.hpp"
#include "interpolation.hpp"
BOOST_AUTO_TEST_SUITE( interpolation_test )
......
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