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
7fc22ee8
Commit
7fc22ee8
authored
11 years ago
by
Markus Blatt
Browse files
Options
Downloads
Patches
Plain Diff
Improves documentation for test of twolevel method.
parent
a056f13f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dune/istl/paamg/test/twolevelmethodtest.cc
+10
-3
10 additions, 3 deletions
dune/istl/paamg/test/twolevelmethodtest.cc
with
10 additions
and
3 deletions
dune/istl/paamg/test/twolevelmethodtest.cc
+
10
−
3
View file @
7fc22ee8
...
...
@@ -41,12 +41,17 @@ void testTwoLevelMethod()
x
=
0
;
randomize
(
mat
,
b
);
#ifndef USE_OVERLAPPINGSCHWARZ
// Smoother used for the finest level
typedef
Dune
::
SeqSSOR
<
BCRSMat
,
Vector
,
Vector
>
FSmoother
;
FSmoother
fineSmoother
(
mat
,
1
,
1.0
);
#else
// Smoother used for the finest level. There is an additional
// template parameter to provide the subdomain solver.
typedef
Dune
::
SeqOverlappingSchwarz
<
BCRSMat
,
Vector
,
Dune
::
SymmetricMultiplicativeSchwarzMode
>
FSmoother
;
// Type of the subdomain vector
typedef
FSmoother
::
subdomain_vector
SubdomainVector
;
// Create subdomain.
std
::
size_t
stride
=
2
;
SubdomainVector
subdomains
((((
N
-
1
)
/
stride
)
+
1
)
*
(((
N
-
1
)
/
stride
)
+
1
));
...
...
@@ -56,16 +61,18 @@ void testTwoLevelMethod()
int
index
=
i
/
stride
*
(((
N
-
1
)
/
stride
)
+
1
)
+
j
/
stride
;
subdomains
[
index
].
insert
(
i
*
N
+
j
);
}
//create smoother
FSmoother
fineSmoother
(
mat
,
subdomains
,
1.0
,
false
);
#endif
// Create the approximate coarse level solver
typedef
Dune
::
SeqJac
<
BCRSMat
,
Vector
,
Vector
>
CSmoother
;
typedef
Dune
::
Amg
::
CoarsenCriterion
<
Dune
::
Amg
::
UnSymmetricCriterion
<
BCRSMat
,
Dune
::
Amg
::
FirstDiagonal
>
>
Criterion
;
typedef
Dune
::
Amg
::
AggregationLevelTransferPolicy
<
Operator
,
Criterion
>
TransferPolicy
;
TransferPolicy
;
// Policy for coarse linear system creation
typedef
Dune
::
Amg
::
OneStepAMGCoarseSolverPolicy
<
Operator
,
CSmoother
,
Criterion
>
CoarsePolicy
;
CoarsePolicy
;
// Policy for coarse solver creation
typedef
typename
Dune
::
Amg
::
SmootherTraits
<
CSmoother
>::
Arguments
SmootherArgs
;
Criterion
crit
;
CoarsePolicy
coarsePolicy
=
CoarsePolicy
(
SmootherArgs
(),
crit
);
...
...
@@ -74,7 +81,7 @@ void testTwoLevelMethod()
Dune
::
Amg
::
TwoLevelMethod
<
Operator
,
Operator
,
FSmoother
>
preconditioner
(
fop
,
Dune
::
stackobject_to_shared_ptr
(
fineSmoother
),
Dune
::
stackobject_to_shared_ptr
<
Dune
::
Amg
::
LevelTransferPolicy
<
Operator
,
Operator
>
>
(
transferPolicy
),
coarsePolicy
,
1
,
0
);
coarsePolicy
);
Dune
::
GeneralizedPCGSolver
<
Vector
>
amgCG
(
fop
,
preconditioner
,
1e-8
,
80
,
2
);
Dune
::
InverseOperatorResult
res
;
amgCG
.
apply
(
x
,
b
,
res
);
...
...
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