Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
dumux-repositories
dumux
Commits
f6ba2968
Commit
f6ba2968
authored
Dec 15, 2017
by
Dennis Gläser
Browse files
[math][multiplymatrices] use correct size_type
parent
16cd926b
Changes
1
Hide whitespace changes
Inline
Side-by-side
dumux/common/math.hh
View file @
f6ba2968
...
...
@@ -583,15 +583,16 @@ template <class Scalar>
Dune
::
DynamicMatrix
<
Scalar
>
multiplyMatrices
(
const
Dune
::
DynamicMatrix
<
Scalar
>
&
M1
,
const
Dune
::
DynamicMatrix
<
Scalar
>
&
M2
)
{
DUNE_ASSERT_BOUNDS
(
M1
.
M
()
==
M2
.
N
());
using
size_type
=
typename
Dune
::
DynamicMatrix
<
Scalar
>::
size_type
;
const
size_type
rows
=
M1
.
N
();
const
size_type
cols
=
M2
.
M
();
std
::
size_t
rows
=
M1
.
N
();
std
::
size_t
cols
=
M2
.
M
();
DUNE_ASSERT_BOUNDS
(
M1
.
M
()
==
M2
.
N
());
Dune
::
DynamicMatrix
<
Scalar
>
result
(
rows
,
cols
,
0.0
);
for
(
std
::
size_t
i
=
0
;
i
<
rows
;
i
++
)
for
(
std
::
size_t
j
=
0
;
j
<
cols
;
j
++
)
for
(
std
::
size_t
k
=
0
;
k
<
M1
.
M
();
k
++
)
for
(
size_t
ype
i
=
0
;
i
<
rows
;
i
++
)
for
(
size_t
ype
j
=
0
;
j
<
cols
;
j
++
)
for
(
size_t
ype
k
=
0
;
k
<
M1
.
M
();
k
++
)
result
[
i
][
j
]
+=
M1
[
i
][
k
]
*
M2
[
k
][
j
];
return
result
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment