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
83a9a49d
Commit
83a9a49d
authored
18 years ago
by
Oliver Sander
Browse files
Options
Downloads
Patches
Plain Diff
replaced explicit use of SimpleVector by member templates
[[Imported from SVN: r617]]
parent
a9e1c195
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
istl/matrix.hh
+6
-5
6 additions, 5 deletions
istl/matrix.hh
with
6 additions
and
5 deletions
istl/matrix.hh
+
6
−
5
View file @
83a9a49d
...
...
@@ -8,7 +8,6 @@
*/
#include
<vector>
#include
<dune/common/simplevector.hh>
namespace
Dune
{
...
...
@@ -110,12 +109,13 @@ namespace Dune {
}
//! Multiplication of the transposed matrix times a vector
SimpleVector
<
T
>
transposedMult
(
const
SimpleVector
<
T
>&
vec
)
{
template
<
class
X
,
class
Y
>
Y
transposedMult
(
const
Y
&
vec
)
{
#ifdef DUNE_ISTL_WITH_CHECKING
if
(
N
()
!=
vec
.
size
())
DUNE_THROW
(
ISTLError
,
"Vector size doesn't match the number of matrix rows!"
);
#endif
SimpleVector
<
T
>
out
(
M
());
Y
out
(
M
());
out
=
0
;
for
(
int
i
=
0
;
i
<
out
.
size
();
i
++
)
{
...
...
@@ -141,12 +141,13 @@ namespace Dune {
}
/// Generic matrix-vector multiplication.
friend
SimpleVector
<
T
>
operator
*
(
const
Matrix
<
T
>&
m
,
const
SimpleVector
<
T
>&
vec
)
{
template
<
class
X
,
class
Y
>
friend
Y
operator
*
(
const
Matrix
<
T
>&
m
,
const
X
&
vec
)
{
#ifdef DUNE_ISTL_WITH_CHECKING
if
(
M
()
!=
vec
.
size
())
DUNE_THROW
(
ISTLError
,
"Vector size doesn't match the number of matrix columns!"
);
#endif
SimpleVector
<
T
>
out
(
m
.
N
());
Y
out
(
m
.
N
());
out
=
0
;
for
(
int
i
=
0
;
i
<
out
.
size
();
i
++
)
{
...
...
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