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
ae2acb3f
Commit
ae2acb3f
authored
9 years ago
by
Max Kahnt
Browse files
Options
Downloads
Patches
Plain Diff
Add ProjectedBlockGSStep test.
parent
8f72feb2
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/solvers/test/gssteptest.cc
+23
-1
23 additions, 1 deletion
dune/solvers/test/gssteptest.cc
with
23 additions
and
1 deletion
dune/solvers/test/gssteptest.cc
+
23
−
1
View file @
ae2acb3f
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
#include
<dune/solvers/solvers/loopsolver.hh>
#include
<dune/solvers/solvers/loopsolver.hh>
#include
<dune/solvers/iterationsteps/blockgsstep.hh>
#include
<dune/solvers/iterationsteps/blockgsstep.hh>
#include
<dune/solvers/iterationsteps/projectedblockgsstep.hh>
#include
<dune/solvers/iterationsteps/semidefiniteblockgsstep.hh>
#include
<dune/solvers/iterationsteps/semidefiniteblockgsstep.hh>
#include
"common.hh"
#include
"common.hh"
...
@@ -55,7 +56,7 @@ struct GSTestSuite
...
@@ -55,7 +56,7 @@ struct GSTestSuite
bool
check
(
const
GridType
&
grid
)
bool
check
(
const
GridType
&
grid
)
{
{
double
stepTol
=
1e-12
;
// termination criterion
double
stepTol
=
1e-12
;
// termination criterion
double
solveTol
=
1e-
6
;
// error in the solution
double
solveTol
=
1
.3
e-
5
;
// error in the solution
int
maxIterations
=
10000
;
int
maxIterations
=
10000
;
bool
passed
=
true
;
bool
passed
=
true
;
...
@@ -97,6 +98,27 @@ struct GSTestSuite
...
@@ -97,6 +98,27 @@ struct GSTestSuite
test
(
&
gsStep
,
"BlockGS"
);
test
(
&
gsStep
,
"BlockGS"
);
}
}
{
size_t
size
=
p
.
u
.
size
();
using
GSStep
=
ProjectedBlockGSStep
<
Matrix
,
Vector
>
;
ProjectedBlockGSStep
<
Matrix
,
Vector
>
gsStep
;
typename
GSStep
::
HasObstacle
hasObstacle
(
size
,
false
);
gsStep
.
hasObstacle_
=
&
hasObstacle
;
test
(
&
gsStep
,
"ProjectedBlockGS w/o obstacle"
);
hasObstacle
.
setAll
();
std
::
vector
<
typename
GSStep
::
Obstacle
>
obstacles
(
size
);
for
(
size_t
i
=
0
;
i
<
size
;
++
i
)
{
hasObstacle
[
i
]
=
true
;
for
(
size_t
j
=
0
;
j
<
Vector
::
block_type
::
dimension
;
++
j
)
{
obstacles
[
i
].
lower
(
j
)
=
j
;
obstacles
[
i
].
upper
(
j
)
=
j
+
1
;
}
}
gsStep
.
obstacles_
=
&
obstacles
;
test
(
&
gsStep
,
"ProjectedBlockGS w obstacle"
);
}
for
(
auto
reg
:
{
false
,
true
})
{
for
(
auto
reg
:
{
false
,
true
})
{
for
(
auto
type
:
{
"direct"
,
"ldlt"
,
"cg"
})
{
for
(
auto
type
:
{
"direct"
,
"ldlt"
,
"cg"
})
{
Dune
::
ParameterTree
config
;
Dune
::
ParameterTree
config
;
...
...
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