Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-xt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
ag-ohlberger
dune-community
dune-xt
Commits
b3fdc0a7
Commit
b3fdc0a7
authored
6 years ago
by
Tobias Leibner
Browse files
Options
Downloads
Patches
Plain Diff
[container.matrix-view] fix test
parent
ebab91c8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dune/xt/la/container/matrix-view.hh
+3
-3
3 additions, 3 deletions
dune/xt/la/container/matrix-view.hh
dune/xt/la/test/pattern.cc
+8
-4
8 additions, 4 deletions
dune/xt/la/test/pattern.cc
with
11 additions
and
7 deletions
dune/xt/la/container/matrix-view.hh
+
3
−
3
View file @
b3fdc0a7
...
...
@@ -87,7 +87,7 @@ public:
,
past_last_row_
(
0
)
,
first_col_
(
0
)
,
past_last_col_
(
0
)
,
pattern_
(
nullptr
)
,
pattern_
(
std
::
shared_ptr
<
SparsityPatternDefault
>
(
nullptr
)
)
{
DUNE_THROW
(
XT
::
Common
::
Exceptions
::
you_are_using_this_wrong
,
"This constructor does not make sense for MatrixView"
);
}
...
...
@@ -102,7 +102,7 @@ public:
,
past_last_row_
(
0
)
,
first_col_
(
0
)
,
past_last_col_
(
0
)
,
pattern_
(
nullptr
)
,
pattern_
(
std
::
shared_ptr
<
SparsityPatternDefault
>
(
nullptr
)
)
{
DUNE_THROW
(
XT
::
Common
::
Exceptions
::
you_are_using_this_wrong
,
"This constructor does not make sense for MatrixView"
);
}
...
...
@@ -118,7 +118,7 @@ public:
,
past_last_row_
(
past_last_row
)
,
first_col_
(
first_col
)
,
past_last_col_
(
past_last_col
)
,
pattern_
(
nullptr
)
,
pattern_
(
std
::
shared_ptr
<
SparsityPatternDefault
>
(
nullptr
)
)
{}
size_t
row_index
(
const
size_t
ii
)
const
...
...
This diff is collapsed.
Click to expand it.
dune/xt/la/test/pattern.cc
+
8
−
4
View file @
b3fdc0a7
...
...
@@ -111,15 +111,19 @@ GTEST_TEST(SparsityPatternDefaultTest, test_creation_functions)
EXPECT_TRUE
(
diagonal_patt
.
size
()
==
ROWS
);
EXPECT_TRUE
(
subdiagonal_patt
.
size
()
==
ROWS
);
for
(
size_t
ii
=
0
;
ii
<
ROWS
;
++
ii
)
{
if
(
ii
<
COLS
)
if
(
ii
<
COLS
)
{
EXPECT_TRUE
(
diagonal_patt
.
contains
(
ii
,
ii
));
if
(
ii
>
0
)
}
if
(
ii
>
0
)
{
EXPECT_TRUE
(
subdiagonal_patt
.
contains
(
ii
,
ii
-
1
));
}
for
(
size_t
jj
=
0
;
jj
<
COLS
;
++
jj
)
{
if
(
jj
!=
ii
)
if
(
jj
!=
ii
)
{
EXPECT_FALSE
(
diagonal_patt
.
contains
(
ii
,
jj
));
if
(
jj
!=
ii
-
1
)
}
if
(
jj
!=
ii
-
1
)
{
EXPECT_FALSE
(
subdiagonal_patt
.
contains
(
ii
,
jj
));
}
}
// jj
}
// ii
...
...
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