Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-istl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Core Modules
dune-istl
Commits
0c2560dd
Commit
0c2560dd
authored
13 years ago
by
Rebecca Neumann
Browse files
Options
Downloads
Patches
Plain Diff
add member variable verbosity_ to AMG, check verbosity before printing output
[[Imported from SVN: r1474]]
parent
1dc39dab
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dune/istl/paamg/amg.hh
+10
-7
10 additions, 7 deletions
dune/istl/paamg/amg.hh
with
10 additions
and
7 deletions
dune/istl/paamg/amg.hh
+
10
−
7
View file @
0c2560dd
...
...
@@ -266,6 +266,8 @@ namespace Dune
bool
buildHierarchy_
;
bool
additive
;
Smoother
*
coarseSmoother_
;
/** @brief The verbosity level. */
std
::
size_t
verbosity_
;
};
template
<
class
M
,
class
X
,
class
S
,
class
PI
,
class
A
>
...
...
@@ -276,7 +278,7 @@ namespace Dune
:
matrices_
(
&
matrices
),
smootherArgs_
(
smootherArgs
),
smoothers_
(),
solver_
(
&
coarseSolver
),
scalarProduct_
(
0
),
gamma_
(
gamma
),
preSteps_
(
preSmoothingSteps
),
postSteps_
(
postSmoothingSteps
),
buildHierarchy_
(
false
),
additive
(
additive_
),
coarseSmoother_
()
additive
(
additive_
),
coarseSmoother_
()
,
verbosity_
(
2
)
{
assert
(
matrices_
->
isBuilt
());
...
...
@@ -292,7 +294,7 @@ namespace Dune
smoothers_
(),
solver_
(
&
coarseSolver
),
scalarProduct_
(
0
),
gamma_
(
parms
.
getGamma
()),
preSteps_
(
parms
.
getNoPreSmoothSteps
()),
postSteps_
(
parms
.
getNoPostSmoothSteps
()),
buildHierarchy_
(
false
),
additive
(
parms
.
getAdditive
()),
coarseSmoother_
()
additive
(
parms
.
getAdditive
()),
coarseSmoother_
()
,
verbosity_
(
parms
.
debugLevel
())
{
assert
(
matrices_
->
isBuilt
());
...
...
@@ -312,7 +314,7 @@ namespace Dune
:
smootherArgs_
(
smootherArgs
),
smoothers_
(),
solver_
(),
scalarProduct_
(
0
),
gamma_
(
gamma
),
preSteps_
(
preSmoothingSteps
),
postSteps_
(
postSmoothingSteps
),
buildHierarchy_
(
true
),
additive
(
additive_
),
coarseSmoother_
()
additive
(
additive_
),
coarseSmoother_
()
,
verbosity_
(
criterion
.
debugLevel
())
{
dune_static_assert
(
static_cast
<
int
>
(
M
::
category
)
==
static_cast
<
int
>
(
S
::
category
),
"Matrix and Solver must match in terms of category!"
);
...
...
@@ -327,7 +329,7 @@ namespace Dune
// build the necessary smoother hierarchies
matrices_
->
coarsenSmoother
(
smoothers_
,
smootherArgs_
);
if
(
criterion
.
debugLevel
()
>
0
&&
matrices_
->
parallelInformation
().
finest
()
->
communicator
().
rank
()
==
0
)
if
(
verbosity_
>
0
&&
matrices_
->
parallelInformation
().
finest
()
->
communicator
().
rank
()
==
0
)
std
::
cout
<<
"Building Hierarchy of "
<<
matrices_
->
maxlevels
()
<<
" levels took "
<<
watch
.
elapsed
()
<<
" seconds."
<<
std
::
endl
;
}
...
...
@@ -341,7 +343,7 @@ namespace Dune
smoothers_
(),
solver_
(),
scalarProduct_
(
0
),
gamma_
(
criterion
.
getGamma
()),
preSteps_
(
criterion
.
getNoPreSmoothSteps
()),
postSteps_
(
criterion
.
getNoPostSmoothSteps
()),
buildHierarchy_
(
true
),
additive
(
criterion
.
getAdditive
()),
coarseSmoother_
()
additive
(
criterion
.
getAdditive
()),
coarseSmoother_
()
,
verbosity_
(
criterion
.
debugLevel
())
{
dune_static_assert
(
static_cast
<
int
>
(
M
::
category
)
==
static_cast
<
int
>
(
S
::
category
),
"Matrix and Solver must match in terms of category!"
);
...
...
@@ -356,7 +358,7 @@ namespace Dune
// build the necessary smoother hierarchies
matrices_
->
coarsenSmoother
(
smoothers_
,
smootherArgs_
);
if
(
criterion
.
debugLevel
()
>
0
&&
matrices_
->
parallelInformation
().
finest
()
->
communicator
().
rank
()
==
0
)
if
(
verbosity_
>
0
&&
matrices_
->
parallelInformation
().
finest
()
->
communicator
().
rank
()
==
0
)
std
::
cout
<<
"Building Hierarchy of "
<<
matrices_
->
maxlevels
()
<<
" levels took "
<<
watch
.
elapsed
()
<<
" seconds."
<<
std
::
endl
;
}
...
...
@@ -443,7 +445,8 @@ namespace Dune
||
(
matrices_
->
parallelInformation
().
coarsest
().
isRedistributed
()
&&
matrices_
->
parallelInformation
().
coarsest
().
getRedistributed
().
communicator
().
size
()
==
1
&&
matrices_
->
parallelInformation
().
coarsest
().
getRedistributed
().
communicator
().
size
()
>
0
))
{
// redistribute and 1 proc
std
::
cout
<<
"Using superlu"
<<
std
::
endl
;
if
(
verbosity_
>
0
&&
matrices_
->
parallelInformation
().
coarsest
()
->
communicator
().
rank
()
==
0
)
std
::
cout
<<
"Using superlu"
<<
std
::
endl
;
if
(
matrices_
->
parallelInformation
().
coarsest
().
isRedistributed
())
{
if
(
matrices_
->
matrices
().
coarsest
().
getRedistributed
().
getmat
().
N
()
>
0
)
...
...
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