Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
O
openfpm_numerics
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
openfpm
openfpm_numerics
Commits
ab6ab5bb
Commit
ab6ab5bb
authored
Jun 03, 2017
by
incardon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added p2m and m2p for interpolation
parent
a52a73e5
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
309 additions
and
130 deletions
+309
-130
src/FiniteDifference/FDScheme.hpp
src/FiniteDifference/FDScheme.hpp
+287
-117
src/Makefile.am
src/Makefile.am
+2
-1
src/Matrix/SparseMatrix_petsc.hpp
src/Matrix/SparseMatrix_petsc.hpp
+17
-12
src/Solvers/petsc_solver.hpp
src/Solvers/petsc_solver.hpp
+2
-0
src/main.cpp
src/main.cpp
+1
-0
No files found.
src/FiniteDifference/FDScheme.hpp
View file @
ab6ab5bb
This diff is collapsed.
Click to expand it.
src/Makefile.am
View file @
ab6ab5bb
...
...
@@ -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
$<
...
...
src/Matrix/SparseMatrix_petsc.hpp
View file @
ab6ab5bb
...
...
@@ -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 bu
gg
er
/*! \brief Get the Matrix triplets bu
ff
er
*
* It return a buffer that can be filled with triplets
*
...
...
src/Solvers/petsc_solver.hpp
View file @
ab6ab5bb
...
...
@@ -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
...
...
src/main.cpp
View file @
ab6ab5bb
...
...
@@ -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"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment