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
48a0487f
Commit
48a0487f
authored
11 years ago
by
Markus Blatt
Browse files
Options
Downloads
Patches
Plain Diff
Added test for twolevelmethod with Schwarz smoother.
parent
a0edcdf7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dune/istl/paamg/test/CMakeLists.txt
+5
-1
5 additions, 1 deletion
dune/istl/paamg/test/CMakeLists.txt
dune/istl/paamg/test/Makefile.am
+7
-1
7 additions, 1 deletion
dune/istl/paamg/test/Makefile.am
dune/istl/paamg/test/twolevelmethodtest.cc
+18
-3
18 additions, 3 deletions
dune/istl/paamg/test/twolevelmethodtest.cc
with
30 additions
and
5 deletions
dune/istl/paamg/test/CMakeLists.txt
+
5
−
1
View file @
48a0487f
...
...
@@ -14,7 +14,7 @@ endif(PARMETIS_FOUND)
if
(
CMAKE_USE_PTHREADS_INIT
)
set
(
PTHREADTESTS pthreadamgtest pthreadfastamgtest
)
endif
(
CMAKE_USE_PTHREADS_INIT
)
set
(
NORMALTESTS amgtest fastamg graphtest kamgtest twolevelmethodtest
${
PTHREADTESTS
}
)
set
(
NORMALTESTS amgtest fastamg graphtest kamgtest
twolevelmethodschwarztest
twolevelmethodtest
${
PTHREADTESTS
}
)
set
(
ALLTESTS
${
MPITESTS
}
${
PARMETISTESTS
}
${
NORMALTESTS
}
${
UMFPACKTESTS
}
${
SUPERLUTESTS
}
)
# We do not want want to build the tests during make all,
...
...
@@ -62,6 +62,10 @@ set_target_properties(pamg_comm_repart_test PROPERTIES COMPILE_FLAGS "-DAMG_REPA
add_executable
(
pamgtest
"parallelamgtest.cc"
)
add_dune_superlu_flags
(
pamgtest
)
add_executable
(
transfertest
"transfertest.cc"
)
add_executable
(
twolevelmethodschwarztest
"twolevelmethodtest.cc"
)
add_dune_superlu_flags
(
twolevelmethodschwarztest
)
set_target_properties
(
twolevelmethodschwarztest PROPERTIES COMPILE_FLAGS
"-DUSE_OVERLAPPINGSCHWARZ"
)
add_executable
(
twolevelmethodtest
"twolevelmethodtest.cc"
)
foreach
(
_exe
${
ALLTESTS
}
)
target_link_libraries
(
${
_exe
}
"dunecommon"
)
...
...
This diff is collapsed.
Click to expand it.
dune/istl/paamg/test/Makefile.am
+
7
−
1
View file @
48a0487f
...
...
@@ -5,7 +5,7 @@ if MPI
TESTPROGS
=
galerkintest hierarchytest pamgtest transfertest pamg_comm_repart_test
endif
NORMALTESTS
=
amgtest fastamg graphtest kamgtest twolevelmethodtest
$(
MPITESTS
)
NORMALTESTS
=
amgtest fastamg graphtest kamgtest
twolevelmethodschwarztest
twolevelmethodtest
$(
MPITESTS
)
# which tests to run
TESTS
=
$(
NORMALTESTS
)
$(
TESTPROGS
)
...
...
@@ -94,6 +94,12 @@ pamg_comm_repart_test_LDADD = \
$(
DUNEMPILIBS
)
\
$(
LDADD
)
twolevelmethodschwarztest_SOURCES
=
twolevelmethodtest.cc
twolevelmethodschwarztest_CPPFLAGS
=
$(
AM_CPPFLAGS
)
$(
SUPERLU_CPPFLAGS
)
twolevelmethodschwarztest_LDFLAGS
=
$(
AM_LDFLAGS
)
$(
SUPERLU_LDFLAGS
)
twolevelmethodschwarztest_LDADD
=
\
$(
SUPERLU_LIBS
)
\
$(
LDADD
)
twolevelmethodtest_SOURCES
=
twolevelmethodtest.cc
twolevelmethodtest_CPPFLAGS
=
$(
AM_CPPFLAGS
)
$(
SUPERLU_CPPFLAGS
)
...
...
This diff is collapsed.
Click to expand it.
dune/istl/paamg/test/twolevelmethodtest.cc
+
18
−
3
View file @
48a0487f
...
...
@@ -3,7 +3,8 @@
#include
<dune/common/timer.hh>
#include
<dune/common/parallel/indexset.hh>
#include
<dune/common/parallel/collectivecommunication.hh>
#include
<dune/istl/paamg/twolevelmethod.hh>
#include
<dune/istl/paamg/twolevelmethod.hh>
#include
<dune/istl/overlappingschwarz.hh>
#include
<dune/istl/paamg/pinfo.hh>
#include
<dune/istl/solvers.hh>
...
...
@@ -38,12 +39,26 @@ void testTwoLevelMethod()
BCRSMat
mat
=
setupAnisotropic2d
<
BS
,
double
>
(
N
,
indices
,
c
,
&
n
,
1
);
Vector
b
(
mat
.
N
()),
x
(
mat
.
M
());
randomize
(
mat
,
b
);
#ifndef USE_OVERLAPPINGSCHWARZ
typedef
Dune
::
SeqSSOR
<
BCRSMat
,
Vector
,
Vector
>
FSmoother
;
typedef
Dune
::
SeqSOR
<
BCRSMat
,
Vector
,
Vector
>
CSmoother
;
FSmoother
fineSmoother
(
mat
,
1
,
1.0
);
#else
typedef
Dune
::
SeqOverlappingSchwarz
<
BCRSMat
,
Vector
>
FSmoother
;
typedef
FSmoother
::
subdomain_vector
SubdomainVector
;
SubdomainVector
subdomains
(
N
);
for
(
int
i
=
0
;
i
<
N
;
++
i
)
for
(
int
j
=
0
;
j
<
N
;
++
j
)
{
int
index
=
i
*
N
+
j
;
subdomains
[
j
].
insert
(
index
);
}
FSmoother
fineSmoother
(
mat
,
subdomains
,
1.0
,
false
);
#endif
typedef
Dune
::
SeqJac
<
BCRSMat
,
Vector
,
Vector
>
CSmoother
;
typedef
Dune
::
Amg
::
CoarsenCriterion
<
Dune
::
Amg
::
UnSymmetricCriterion
<
BCRSMat
,
Dune
::
Amg
::
FirstDiagonal
>
>
Criterion
;
FSmoother
fineSmoother
(
mat
,
1
,
1.0
);
typedef
Dune
::
Amg
::
AggregationLevelTransferPolicy
<
Operator
,
Criterion
>
TransferPolicy
;
typedef
Dune
::
Amg
::
OneStepAMGCoarseSolverPolicy
<
Operator
,
CSmoother
,
Criterion
>
...
...
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