Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
amdis
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
iwr
amdis
Commits
2ffb4759
Commit
2ffb4759
authored
14 years ago
by
Thomas Witkowski
Browse files
Options
Downloads
Patches
Plain Diff
Improved memory allocation for petsc matrix in the case of zero diagonal elements.
parent
3c9efbeb
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
AMDiS/src/parallel/GlobalMatrixSolver.cc
+7
-4
7 additions, 4 deletions
AMDiS/src/parallel/GlobalMatrixSolver.cc
with
7 additions
and
4 deletions
AMDiS/src/parallel/GlobalMatrixSolver.cc
+
7
−
4
View file @
2ffb4759
...
...
@@ -4,7 +4,7 @@
#include
"DOFVector.h"
#include
"Debug.h"
#include
"SystemVector.h"
#include
"VtkWriter.h"
#include
"petscksp.h"
namespace
AMDiS
{
...
...
@@ -283,10 +283,10 @@ namespace AMDiS {
// Traverse all non zero entries in this row.
for
(
icursor_type
icursor
=
begin
<
nz
>
(
cursor
),
icend
=
end
<
nz
>
(
cursor
);
icursor
!=
icend
;
++
icursor
)
{
if
(
value
(
*
icursor
)
!=
0.0
)
{
int
petscColIdx
=
meshDistributor
->
mapLocalToGlobal
(
col
(
*
icursor
))
*
nComponents
+
j
;
int
petscColIdx
=
meshDistributor
->
mapLocalToGlobal
(
col
(
*
icursor
))
*
nComponents
+
j
;
if
(
value
(
*
icursor
)
!=
0.0
||
petscRowIdx
==
petscColIdx
)
{
// The row DOF is a rank DOF, if also the column is a rank DOF,
// increment the d_nnz values for this row, otherwise the o_nnz value.
if
(
petscColIdx
>=
meshDistributor
->
getRstart
()
*
nComponents
&&
...
...
@@ -445,6 +445,9 @@ namespace AMDiS {
MatAssemblyBegin
(
petscMatrix
,
MAT_FINAL_ASSEMBLY
);
MatAssemblyEnd
(
petscMatrix
,
MAT_FINAL_ASSEMBLY
);
#if (DEBUG != 0)
INFO
(
info
,
8
)(
"Fill petsc matrix 3 needed %.5f seconds
\n
"
,
TIME_USED
(
first
,
clock
()));
#endif
// === Transfer values from DOF vector to the PETSc vector. ===
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment