Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-common
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
Package registry
Model registry
Operate
Environments
Terraform modules
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-common
Commits
e55ca181
Commit
e55ca181
authored
20 years ago
by
Peter Bastian
Browse files
Options
Downloads
Patches
Plain Diff
added K11Matrix to printmatrix
[[Imported from SVN: r973]]
parent
2d596ee0
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
istl/io.hh
+26
-14
26 additions, 14 deletions
istl/io.hh
with
26 additions
and
14 deletions
istl/io.hh
+
26
−
14
View file @
e55ca181
...
...
@@ -104,20 +104,6 @@ namespace Dune {
}
}
//! print one row of a matrix
template
<
class
K
,
int
n
,
int
m
>
void
print_row
(
std
::
ostream
&
s
,
FieldMatrix
<
K
,
n
,
m
>&
A
,
int
I
,
int
J
,
int
therow
,
int
width
,
int
precision
)
{
for
(
int
i
=
0
;
i
<
n
;
i
++
)
if
(
I
+
i
==
therow
)
for
(
int
j
=
0
;
j
<
m
;
j
++
)
{
s
<<
" "
;
// space in front of each entry
s
.
width
(
width
);
// set width for each entry anew
s
<<
A
[
i
][
j
];
// yeah, the number !
}
}
//! print one row of a matrix
template
<
class
M
>
void
print_row
(
std
::
ostream
&
s
,
M
&
A
,
int
I
,
int
J
,
int
therow
,
int
width
,
int
precision
)
...
...
@@ -149,6 +135,32 @@ namespace Dune {
}
}
//! print one row of a matrix, specialization for FieldMatrix
template
<
class
K
,
int
n
,
int
m
>
void
print_row
(
std
::
ostream
&
s
,
FieldMatrix
<
K
,
n
,
m
>&
A
,
int
I
,
int
J
,
int
therow
,
int
width
,
int
precision
)
{
for
(
int
i
=
0
;
i
<
n
;
i
++
)
if
(
I
+
i
==
therow
)
for
(
int
j
=
0
;
j
<
m
;
j
++
)
{
s
<<
" "
;
// space in front of each entry
s
.
width
(
width
);
// set width for each entry anew
s
<<
A
[
i
][
j
];
// yeah, the number !
}
}
//! print one row of a matrix, specialization for K11Matrix
template
<
class
K
>
void
print_row
(
std
::
ostream
&
s
,
K11Matrix
<
K
>&
A
,
int
I
,
int
J
,
int
therow
,
int
width
,
int
precision
)
{
if
(
I
==
therow
)
{
s
<<
" "
;
// space in front of each entry
s
.
width
(
width
);
// set width for each entry anew
s
<<
A
();
// yeah, the number !
}
}
template
<
class
M
>
void
printmatrix
(
std
::
ostream
&
s
,
M
&
A
,
std
::
string
title
,
std
::
string
rowtext
,
int
width
=
10
,
int
precision
=
2
)
...
...
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