Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
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
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
33292ef2
Commit
33292ef2
authored
12 years ago
by
Sebastien Blaise
Browse files
Options
Downloads
Patches
Plain Diff
Print system petsc
parent
72fdcae3
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Solver/linearSystemPETSc.cpp
+18
-0
18 additions, 0 deletions
Solver/linearSystemPETSc.cpp
Solver/linearSystemPETSc.h
+1
-0
1 addition, 0 deletions
Solver/linearSystemPETSc.h
with
19 additions
and
0 deletions
Solver/linearSystemPETSc.cpp
+
18
−
0
View file @
33292ef2
...
@@ -177,6 +177,24 @@ void linearSystemPETScBlockDouble::clear()
...
@@ -177,6 +177,24 @@ void linearSystemPETScBlockDouble::clear()
_isAllocated
=
false
;
_isAllocated
=
false
;
}
}
void
linearSystemPETScBlockDouble
::
print
()
{
_try
(
MatAssemblyBegin
(
_a
,
MAT_FINAL_ASSEMBLY
));
_try
(
MatAssemblyEnd
(
_a
,
MAT_FINAL_ASSEMBLY
));
_try
(
VecAssemblyBegin
(
_b
));
_try
(
VecAssemblyEnd
(
_b
));
if
(
Msg
::
GetCommRank
()
==
0
)
printf
(
"a :
\n
"
);
MatView
(
_a
,
PETSC_VIEWER_STDOUT_WORLD
);
if
(
Msg
::
GetCommRank
()
==
0
)
printf
(
"b :
\n
"
);
VecView
(
_b
,
PETSC_VIEWER_STDOUT_WORLD
);
if
(
Msg
::
GetCommRank
()
==
0
)
printf
(
"x :
\n
"
);
VecView
(
_x
,
PETSC_VIEWER_STDOUT_WORLD
);
}
int
linearSystemPETScBlockDouble
::
systemSolve
()
int
linearSystemPETScBlockDouble
::
systemSolve
()
{
{
if
(
!
_kspAllocated
)
if
(
!
_kspAllocated
)
...
...
This diff is collapsed.
Click to expand it.
Solver/linearSystemPETSc.h
+
1
−
0
View file @
33292ef2
...
@@ -91,6 +91,7 @@ class linearSystemPETScBlockDouble : public linearSystem<fullMatrix<double> > {
...
@@ -91,6 +91,7 @@ class linearSystemPETScBlockDouble : public linearSystem<fullMatrix<double> > {
bool
_sequential
;
bool
_sequential
;
public:
public:
void
_kspCreate
();
void
_kspCreate
();
void
print
();
virtual
void
addToMatrix
(
int
row
,
int
col
,
const
fullMatrix
<
double
>
&
val
);
virtual
void
addToMatrix
(
int
row
,
int
col
,
const
fullMatrix
<
double
>
&
val
);
virtual
void
addToRightHandSide
(
int
row
,
const
fullMatrix
<
double
>
&
val
);
virtual
void
addToRightHandSide
(
int
row
,
const
fullMatrix
<
double
>
&
val
);
virtual
void
addToSolution
(
int
row
,
const
fullMatrix
<
double
>
&
val
);
virtual
void
addToSolution
(
int
row
,
const
fullMatrix
<
double
>
&
val
);
...
...
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