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
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
argupta
openfpm_numerics
Commits
858741a6
Commit
858741a6
authored
Aug 20, 2017
by
incardon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing documentation + coverity error
parent
4cbdaaa7
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
14 deletions
+33
-14
src/Matrix/SparseMatrix_petsc.hpp
src/Matrix/SparseMatrix_petsc.hpp
+3
-1
src/Operators/Vector/vector_dist_operators_functions.hpp
src/Operators/Vector/vector_dist_operators_functions.hpp
+1
-1
src/Solvers/petsc_solver.hpp
src/Solvers/petsc_solver.hpp
+2
-1
src/Vector/Vector_eigen.hpp
src/Vector/Vector_eigen.hpp
+24
-9
src/Vector/Vector_petsc.hpp
src/Vector/Vector_petsc.hpp
+3
-2
No files found.
src/Matrix/SparseMatrix_petsc.hpp
View file @
858741a6
...
...
@@ -80,7 +80,9 @@ public:
}
// Default constructor
triplet
()
{};
triplet
()
:
row_
(
0
),
col_
(
0
),
val_
(
0
)
{};
};
/*! \brief Sparse Matrix implementation, that map over Eigen
...
...
src/Operators/Vector/vector_dist_operators_functions.hpp
View file @
858741a6
...
...
@@ -234,7 +234,7 @@ public:
//! constructor from an epxression exp1 and a vector vd
vector_dist_expression_op
(
const
exp1
&
o1
,
const
vector_type
&
vd
)
:
o1
(
o1
),
vd
(
vd
)
:
o1
(
o1
),
val
(
0
),
vd
(
vd
)
{}
//! sum reduction require initialization where we calculate the reduction
...
...
src/Solvers/petsc_solver.hpp
View file @
858741a6
...
...
@@ -777,6 +777,7 @@ class petsc_solver<double>
solError
err
;
err
.
err_norm
=
norm
/
col
;
err
.
err_inf
=
norm_inf
;
err
.
its
=
0
;
return
err
;
}
...
...
@@ -792,7 +793,7 @@ public:
}
petsc_solver
()
:
maxits
(
300
)
:
maxits
(
300
)
,
tmp
(
0
)
{
initKSP
();
...
...
src/Vector/Vector_eigen.hpp
View file @
858741a6
...
...
@@ -29,21 +29,29 @@
template
<
typename
T
>
class
rval
<
T
,
EIGEN_RVAL
>
{
// row
//
!
row
long
int
r
;
// value
//
!
value
T
val
;
public:
// Get the row
/*! \brief Return the row index
*
* \return a reference to the row index
*
*/
long
int
&
row
()
{
return
r
;
}
// Get the value
/*! \brief Return the value
*
* \return a reference to the row value
*
*/
T
&
value
()
{
return
val
;
...
...
@@ -52,7 +60,9 @@ public:
/*! \brief Default constructor
*
*/
rval
()
{}
rval
()
:
r
(
0
)
{}
/*! \brief Constructor from row, colum and value
*
...
...
@@ -70,19 +80,22 @@ public:
template
<
typename
T
>
class
Vector
<
T
,
EIGEN_BASE
>
{
//! Eigen vector
mutable
Eigen
::
Matrix
<
T
,
Eigen
::
Dynamic
,
1
>
v
;
//
row value
vector
//
! row val
vector
mutable
openfpm
::
vector
<
rval
<
T
,
EIGEN_RVAL
>>
row_val
;
//! row val vector received
mutable
openfpm
::
vector
<
rval
<
T
,
EIGEN_RVAL
>>
row_val_recv
;
// global to local map
//
!
global to local map
mutable
std
::
unordered_map
<
size_t
,
size_t
>
map
;
// invalid
//
!
invalid
T
invalid
;
// Processors from where we gather
//
!
Processors from where we gather
mutable
openfpm
::
vector
<
size_t
>
prc
;
//size of each chunk
...
...
@@ -141,6 +154,7 @@ public:
*
*/
Vector
(
const
Vector
<
T
>
&
v
)
:
invalid
(
0
)
{
this
->
operator
=
(
v
);
}
...
...
@@ -151,6 +165,7 @@ public:
*
*/
Vector
(
const
Vector
<
T
>
&&
v
)
:
invalid
(
0
)
{
this
->
operator
=
(
v
);
}
...
...
src/Vector/Vector_petsc.hpp
View file @
858741a6
...
...
@@ -152,6 +152,7 @@ public:
*
*/
Vector
(
Vector
<
T
,
PETSC_BASE
>
&&
v
)
:
n_row
(
0
),
n_row_local
(
0
),
invalid
(
0
)
{
this
->
operator
=
(
v
);
}
...
...
@@ -173,7 +174,7 @@ public:
*
*/
Vector
(
size_t
n
,
size_t
n_row_local
)
:
n_row_local
(
n_row_local
)
:
n_row_local
(
n_row_local
)
,
invalid
(
0
),
v
(
NULL
)
{
// Create the vector
PETSC_SAFE_CALL
(
VecCreate
(
PETSC_COMM_WORLD
,
&
v
));
...
...
@@ -185,7 +186,7 @@ public:
*
*/
Vector
()
:
n_row
(
0
),
n_row_local
(
0
)
:
n_row
(
0
),
n_row_local
(
0
)
,
invalid
(
0
)
{
// Create the vector
PETSC_SAFE_CALL
(
VecCreate
(
PETSC_COMM_WORLD
,
&
v
));
...
...
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