Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dune-common
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
42
Issues
42
List
Board
Labels
Milestones
Merge Requests
23
Merge Requests
23
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Core Modules
dune-common
Commits
2abb3bd4
Commit
2abb3bd4
authored
Nov 20, 2015
by
Christian Engwer
2
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[densematrix] reenable and fix broken check, to avoid aliasing in mv and mtv
parent
522bc0e2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
densematrix.hh
dune/common/densematrix.hh
+2
-4
No files found.
dune/common/densematrix.hh
View file @
2abb3bd4
...
...
@@ -390,6 +390,7 @@ namespace Dune
void
mv
(
const
X
&
x
,
Y
&
y
)
const
{
#ifdef DUNE_FMatrix_WITH_CHECKING
assert
(
(
void
*
)(
&
x
)
!=
(
void
*
)(
&
y
)
);
if
(
x
.
N
()
!=
M
())
DUNE_THROW
(
FMatrixError
,
"Index out of range"
);
if
(
y
.
N
()
!=
N
())
DUNE_THROW
(
FMatrixError
,
"Index out of range"
);
#endif
...
...
@@ -406,10 +407,7 @@ namespace Dune
void
mtv
(
const
X
&
x
,
Y
&
y
)
const
{
#ifdef DUNE_FMatrix_WITH_CHECKING
//assert( &x != &y );
//This assert did not work for me. Compile error:
// comparison between distinct pointer types ‘const
// Dune::FieldVector<double, 3>*’ and ‘Dune::FieldVector<double, 2>*’ lacks a cast
assert
(
(
void
*
)(
&
x
)
!=
(
void
*
)(
&
y
)
);
if
(
x
.
N
()
!=
N
()
)
DUNE_THROW
(
FMatrixError
,
"Index out of range."
);
if
(
y
.
N
()
!=
M
()
)
...
...
Steffen Müthing
@smuething
mentioned in issue
#17 (closed)
·
Feb 09, 2016
mentioned in issue
#17 (closed)
mentioned in issue #17
Toggle commit list
Steffen Müthing
@smuething
mentioned in commit
2a51936c
·
Feb 09, 2016
mentioned in commit
2a51936c
mentioned in commit 2a51936c4107ff076f238acb20f2cadcb19f2454
Toggle commit list
Write
Preview
Markdown
is supported
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