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
2e9dda17
Commit
2e9dda17
authored
9 years ago
by
Christoph Grüninger
Browse files
Options
Downloads
Patches
Plain Diff
[cleanup] Use static_assert instead of BOOST_STATIC_ASSERT.
parent
691ac90c
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/multitypeblockmatrix.hh
+8
-8
8 additions, 8 deletions
dune/istl/multitypeblockmatrix.hh
with
8 additions
and
8 deletions
dune/istl/multitypeblockmatrix.hh
+
8
−
8
View file @
2e9dda17
...
...
@@ -236,8 +236,8 @@ namespace Dune {
*/
template
<
typename
X
,
typename
Y
>
void
mv
(
const
X
&
x
,
Y
&
y
)
const
{
BOOST_STATIC_ASSERT
(
mpl
::
size
<
X
>::
value
==
mpl
::
size
<
T1
>::
value
);
//make sure x's length
match
es
row length
BOOST_STATIC_ASSERT
(
mpl
::
size
<
Y
>::
value
==
mpl
::
size
<
type
>::
value
);
//make sure y's length
match
es
row count
static_assert
(
mpl
::
size
<
X
>::
value
==
mpl
::
size
<
T1
>::
value
,
"length of x does not
match row length
"
);
static_assert
(
mpl
::
size
<
Y
>::
value
==
mpl
::
size
<
type
>::
value
,
"length of y does not
match row count
"
);
y
=
0
;
//reset y (for mv uses umv)
MultiTypeBlockMatrix_VectMul
<
0
,
mpl
::
size
<
type
>::
value
,
0
,
mpl
::
size
<
T1
>::
value
,
Y
,
type
,
X
>::
umv
(
y
,
*
this
,
x
);
//iterate over all matrix elements
...
...
@@ -248,8 +248,8 @@ namespace Dune {
*/
template
<
typename
X
,
typename
Y
>
void
umv
(
const
X
&
x
,
Y
&
y
)
const
{
BOOST_STATIC_ASSERT
(
mpl
::
size
<
X
>::
value
==
mpl
::
size
<
T1
>::
value
);
//make sure x's length
match
es
row length
BOOST_STATIC_ASSERT
(
mpl
::
size
<
Y
>::
value
==
mpl
::
size
<
type
>::
value
);
//make sure y's length
match
es
row count
static_assert
(
mpl
::
size
<
X
>::
value
==
mpl
::
size
<
T1
>::
value
,
"length of x does not
match row length
"
);
static_assert
(
mpl
::
size
<
Y
>::
value
==
mpl
::
size
<
type
>::
value
,
"length of y does not
match row count
"
);
MultiTypeBlockMatrix_VectMul
<
0
,
mpl
::
size
<
type
>::
value
,
0
,
mpl
::
size
<
T1
>::
value
,
Y
,
type
,
X
>::
umv
(
y
,
*
this
,
x
);
//iterate over all matrix elements
}
...
...
@@ -259,8 +259,8 @@ namespace Dune {
*/
template
<
typename
X
,
typename
Y
>
void
mmv
(
const
X
&
x
,
Y
&
y
)
const
{
BOOST_STATIC_ASSERT
(
mpl
::
size
<
X
>::
value
==
mpl
::
size
<
T1
>::
value
);
//make sure x's length
match
es
row length
BOOST_STATIC_ASSERT
(
mpl
::
size
<
Y
>::
value
==
mpl
::
size
<
type
>::
value
);
//make sure y's length
match
es
row count
static_assert
(
mpl
::
size
<
X
>::
value
==
mpl
::
size
<
T1
>::
value
,
"length of x does not
match row length
"
);
static_assert
(
mpl
::
size
<
Y
>::
value
==
mpl
::
size
<
type
>::
value
,
"length of y does not
match row count
"
);
MultiTypeBlockMatrix_VectMul
<
0
,
mpl
::
size
<
type
>::
value
,
0
,
mpl
::
size
<
T1
>::
value
,
Y
,
type
,
X
>::
mmv
(
y
,
*
this
,
x
);
//iterate over all matrix elements
}
...
...
@@ -268,8 +268,8 @@ namespace Dune {
//! y += alpha A x
template
<
typename
AlphaType
,
typename
X
,
typename
Y
>
void
usmv
(
const
AlphaType
&
alpha
,
const
X
&
x
,
Y
&
y
)
const
{
BOOST_STATIC_ASSERT
(
mpl
::
size
<
X
>::
value
==
mpl
::
size
<
T1
>::
value
);
//make sure x's length
match
es
row length
BOOST_STATIC_ASSERT
(
mpl
::
size
<
Y
>::
value
==
mpl
::
size
<
type
>::
value
);
//make sure y's length
match
es
row count
static_assert
(
mpl
::
size
<
X
>::
value
==
mpl
::
size
<
T1
>::
value
,
"length of x does not
match row length
"
);
static_assert
(
mpl
::
size
<
Y
>::
value
==
mpl
::
size
<
type
>::
value
,
"length of y does not
match row count
"
);
MultiTypeBlockMatrix_VectMul
<
0
,
mpl
::
size
<
type
>::
value
,
0
,
mpl
::
size
<
T1
>::
value
,
Y
,
type
,
X
>::
usmv
(
alpha
,
y
,
*
this
,
x
);
//iterate over all matrix elements
...
...
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