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
f20e290a
Commit
f20e290a
authored
11 years ago
by
Markus Blatt
Browse files
Options
Downloads
Patches
Plain Diff
[release] Test row_wise build mode with nonzerors provided, too.
parent
ba9f66db
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/test/bcrsbuild.cc
+16
-2
16 additions, 2 deletions
dune/istl/test/bcrsbuild.cc
with
16 additions
and
2 deletions
dune/istl/test/bcrsbuild.cc
+
16
−
2
View file @
f20e290a
...
...
@@ -80,9 +80,9 @@ struct Builder<Dune::BCRSMatrix<B,A> >
}*/
}
void
rowWiseBuild
(
int
rows
,
int
cols
)
void
rowWiseBuild
(
Dune
::
BCRSMatrix
<
B
,
A
>
matrix
,
int
rows
,
int
cols
)
{
Dune
::
BCRSMatrix
<
B
,
A
>
matrix
(
rows
,
cols
,
Dune
::
BCRSMatrix
<
B
,
A
>::
row_wise
);
for
(
typename
Dune
::
BCRSMatrix
<
B
,
A
>::
CreateIterator
ci
=
matrix
.
createbegin
(),
cend
=
matrix
.
createend
();
ci
!=
cend
;
++
ci
)
{
...
...
@@ -99,6 +99,19 @@ struct Builder<Dune::BCRSMatrix<B,A> >
Dune
::
BCRSMatrix
<
B
,
A
>
matrix1
(
matrix
);
Dune
::
printmatrix
(
std
::
cout
,
matrix
,
"row_wise"
,
"row"
);
}
void
rowWiseBuild
(
int
rows
,
int
cols
)
{
Dune
::
BCRSMatrix
<
B
,
A
>
matrix
(
rows
,
cols
,
Dune
::
BCRSMatrix
<
B
,
A
>::
row_wise
);
rowWiseBuild
(
matrix
,
rows
,
cols
);
}
void
rowWiseBuild
(
int
rows
,
int
cols
,
int
nnz
)
{
Dune
::
BCRSMatrix
<
B
,
A
>
matrix
(
rows
,
cols
,
nnz
,
Dune
::
BCRSMatrix
<
B
,
A
>::
row_wise
);
rowWiseBuild
(
matrix
,
rows
,
cols
);
}
};
// This code used to trigger a valgrind 'uninitialized memory' warning; see FS 1041
...
...
@@ -115,6 +128,7 @@ int main()
try
{
Builder
<
Dune
::
BCRSMatrix
<
Dune
::
FieldMatrix
<
double
,
1
,
1
>
>
>
builder
;
builder
.
randomBuild
(
5
,
4
);
builder
.
rowWiseBuild
(
5
,
4
,
10
);
builder
.
rowWiseBuild
(
5
,
4
);
testDoubleSetSize
();
}
catch
(
Dune
::
Exception
e
)
{
...
...
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