Commit ab6ab5bb authored by incardon's avatar incardon

Added p2m and m2p for interpolation

parent a52a73e5
This diff is collapsed.
......@@ -12,7 +12,8 @@ Solvers/umfpack_solver.hpp Solvers/petsc_solver.hpp \
util/petsc_util.hpp util/linalgebra_lib.hpp util/util_num.hpp util/grid_dist_testing.hpp \
FiniteDifference/Average.hpp FiniteDifference/Derivative.hpp FiniteDifference/eq.hpp FiniteDifference/FDScheme.hpp FiniteDifference/Laplacian.hpp FiniteDifference/mul.hpp FiniteDifference/sum.hpp FiniteDifference/util/common.hpp \
PSE/Kernels.hpp PSE/Kernels_test_util.hpp Operators/Vector/vector_dist_operators_extensions.hpp Operators/Vector/vector_dist_operators.hpp Operators/Vector/vector_dist_operators_apply_kernel.hpp Operators/Vector/vector_dist_operators_functions.hpp Operators/Vector/vector_dist_operator_assign.hpp \
Draw/DrawParticles.hpp Draw/PointIterator.hpp Draw/PointIteratorSkin.hpp
Draw/DrawParticles.hpp Draw/PointIterator.hpp Draw/PointIteratorSkin.hpp \
interpolation/interpolation.hpp interpolation/mp4_kernel.hpp interpolation/z_spline.hpp
.cu.o :
$(NVCC) $(NVCCFLAGS) -o $@ -c $<
......
......@@ -103,31 +103,36 @@ public:
private:
// Size of the matrix
//! Number of matrix row (global)
size_t g_row;
//! Number of matrix colums (global)
size_t g_col;
// Local size of the matrix
//! Number of matrix row (local)
size_t l_row;
//! Number of matrix colums (local)
size_t l_col;
// starting row for this processor
//! starting row for this processor
size_t start_row;
// indicate if the matrix has been created
//! indicate if the matrix has been created
bool m_created = false;
// PETSC Matrix
//! PETSC Matrix
Mat mat;
//! Triplets of the matrix
openfpm::vector<triplet_type> trpl;
openfpm::vector<triplet_type> trpl_recv;
// temporary list of values
//! temporary list of values
mutable openfpm::vector<PetscScalar> vals;
// temporary list of colums
//! temporary list of colums
mutable openfpm::vector<PetscInt> cols;
// PETSC d_nnz and o_nnz
//! PETSC d_nnz
mutable openfpm::vector<PetscInt> d_nnz;
//! PETSC o_nnz
mutable openfpm::vector<PetscInt> o_nnz;
/*! \brief Fill the petsc Matrix
......@@ -152,7 +157,7 @@ private:
{
PetscInt row = trpl.get(i).row();
while(row == trpl.get(i).row() && i < trpl.size())
while(i < trpl.size() && row == trpl.get(i).row())
{
if ((size_t)trpl.get(i).col() >= start_row && (size_t)trpl.get(i).col() < start_row + l_row)
d_nnz.get(row - start_row)++;
......@@ -176,7 +181,7 @@ private:
PetscInt row = trpl.get(i).row();
while(row == trpl.get(i).row() && i < trpl.size())
while(i < trpl.size() && row == trpl.get(i).row())
{
vals.add(trpl.get(i).value());
cols.add(trpl.get(i).col());
......@@ -237,7 +242,7 @@ public:
{PETSC_SAFE_CALL(MatDestroy(&mat));}
}
/*! \brief Get the Matrix triplets bugger
/*! \brief Get the Matrix triplets buffer
*
* It return a buffer that can be filled with triplets
*
......
......@@ -16,6 +16,8 @@
#include <petscksp.h>
#include <petsctime.h>
#include "Plot/GoogleChart.hpp"
#include "Matrix/SparseMatrix.hpp"
#include "Vector/Vector.hpp"
#define UMFPACK_NONE 0
......
......@@ -16,3 +16,4 @@
#include "PSE/Kernels_unit_tests.hpp"
#include "Operators/Vector/vector_dist_operators_unit_tests.hpp"
#include "Draw/DrawParticles_unit_tests.hpp"
#include "interpolation/interpolation_unit_tests.hpp"
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