Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-solvers
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
agnumpde
dune-solvers
Commits
1c526652
There was a problem fetching the pipeline summary.
Commit
1c526652
authored
8 years ago
by
Elias Pipping
Browse files
Options
Downloads
Patches
Plain Diff
Tests: Cover partial Dirichlet BC where supported
parent
e305586a
No related branches found
No related tags found
No related merge requests found
Pipeline
#
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dune/solvers/test/gssteptest.cc
+16
-5
16 additions, 5 deletions
dune/solvers/test/gssteptest.cc
with
16 additions
and
5 deletions
dune/solvers/test/gssteptest.cc
+
16
−
5
View file @
1c526652
...
@@ -24,13 +24,14 @@
...
@@ -24,13 +24,14 @@
* is solved correctly for a random rhs by a LoopSolver employing
* is solved correctly for a random rhs by a LoopSolver employing
* a GSStep.
* a GSStep.
*/
*/
template
<
size_t
blocksize
>
template
<
size_t
blocksize
,
bool
trivialDirichletOnly
=
true
>
struct
GSTestSuite
{
struct
GSTestSuite
{
template
<
class
GridType
>
template
<
class
GridType
>
bool
check
(
const
GridType
&
grid
)
{
bool
check
(
const
GridType
&
grid
)
{
bool
passed
=
true
;
bool
passed
=
true
;
using
Problem
=
SymmetricSampleProblem
<
blocksize
,
typename
GridType
::
LevelGridView
>
;
using
Problem
=
SymmetricSampleProblem
<
blocksize
,
typename
GridType
::
LevelGridView
,
trivialDirichletOnly
>
;
Problem
p
(
grid
.
levelGridView
(
grid
.
maxLevel
()));
Problem
p
(
grid
.
levelGridView
(
grid
.
maxLevel
()));
const
auto
verbosity
=
Solver
::
QUIET
;
const
auto
verbosity
=
Solver
::
QUIET
;
...
@@ -144,14 +145,19 @@ struct GSTestSuite {
...
@@ -144,14 +145,19 @@ struct GSTestSuite {
Matrix
,
Vector
>::
createPtrFromConfig
(
config
);
Matrix
,
Vector
>::
createPtrFromConfig
(
config
);
auto
gsString2
=
Dune
::
formatString
(
"Dune::Solvers::BlockGS(%s) %s"
,
auto
gsString2
=
Dune
::
formatString
(
"Dune::Solvers::BlockGS(%s) %s"
,
type
,
reg
?
"regularized"
:
""
);
type
,
reg
?
"regularized"
:
""
);
test
(
&
gsStep1
,
gsString1
);
if
(
trivialDirichletOnly
)
{
// TODO: missing feature in SDBlockGS
test
(
gsStep2Ptr
.
get
(),
gsString2
);
test
(
&
gsStep1
,
gsString1
);
diffTest
(
&
gsStep1
,
gsString1
,
gsStep2Ptr
.
get
(),
gsString2
,
1e-8
);
test
(
gsStep2Ptr
.
get
(),
gsString2
);
diffTest
(
&
gsStep1
,
gsString1
,
gsStep2Ptr
.
get
(),
gsString2
,
1e-8
);
}
else
{
test
(
gsStep2Ptr
.
get
(),
gsString2
);
}
}
}
}
}
}
}
// test projected block GS
// test projected block GS
if
(
trivialDirichletOnly
)
// TODO: missing feature in ProjectedBlockGS
{
{
size_t
size
=
p
.
u
.
size
();
size_t
size
=
p
.
u
.
size
();
using
GSStep
=
ProjectedBlockGSStep
<
Matrix
,
Vector
>
;
using
GSStep
=
ProjectedBlockGSStep
<
Matrix
,
Vector
>
;
...
@@ -186,5 +192,10 @@ int main(int argc, char** argv) {
...
@@ -186,5 +192,10 @@ int main(int argc, char** argv) {
GSTestSuite
<
2
>
testsuite2
;
GSTestSuite
<
2
>
testsuite2
;
passed
&=
checkWithStandardGrids
(
testsuite2
);
passed
&=
checkWithStandardGrids
(
testsuite2
);
std
::
cout
<<
std
::
endl
;
GSTestSuite
<
2
,
false
>
testsuite2f
;
passed
&=
checkWithStandardGrids
(
testsuite2f
);
return
passed
?
0
:
1
;
return
passed
?
0
:
1
;
}
}
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