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
d389a19c
Commit
d389a19c
authored
Feb 09, 2017
by
Dennis Gläser
Browse files
[math] fix getTransposed() method
parent
e5e8a53a
Changes
1
Hide whitespace changes
Inline
Side-by-side
dumux/common/math.hh
View file @
d389a19c
...
...
@@ -543,11 +543,11 @@ Scalar tripleProduct(const Dune::FieldVector<Scalar, 3> &vec1,
* \param M The matrix to be transposed
*/
template
<
class
Scalar
,
int
m
,
int
n
>
Dune
::
FieldMatrix
<
Scalar
,
m
,
n
>
getTransposed
(
const
Dune
::
FieldMatrix
<
Scalar
,
m
,
n
>&
M
)
Dune
::
FieldMatrix
<
Scalar
,
n
,
m
>
getTransposed
(
const
Dune
::
FieldMatrix
<
Scalar
,
m
,
n
>&
M
)
{
Dune
::
FieldMatrix
<
Scalar
,
m
,
n
>
T
;
for
(
std
::
size_t
i
=
0
;
i
<
n
;
++
i
)
for
(
std
::
size_t
j
=
0
;
j
<
m
;
++
j
)
Dune
::
FieldMatrix
<
Scalar
,
n
,
m
>
T
;
for
(
std
::
size_t
i
=
0
;
i
<
m
;
++
i
)
for
(
std
::
size_t
j
=
0
;
j
<
n
;
++
j
)
T
[
j
][
i
]
=
M
[
i
][
j
];
return
T
;
...
...
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