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
6d2cfceb
Commit
6d2cfceb
authored
6 years ago
by
Oliver Sander
Browse files
Options
Downloads
Patches
Plain Diff
Turn 'marker' into a std::vector
There is no reason why it should be a C-pointer.
parent
cf505513
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!270
Implement superlu for scalar valued matrices
Pipeline
#16025
failed
6 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dune/istl/colcompmatrix.hh
+10
-21
10 additions, 21 deletions
dune/istl/colcompmatrix.hh
with
10 additions
and
21 deletions
dune/istl/colcompmatrix.hh
+
10
−
21
View file @
6d2cfceb
...
...
@@ -272,8 +272,6 @@ namespace Dune
ColCompMatrixInitializer
();
virtual
~
ColCompMatrixInitializer
();
template
<
typename
Iter
>
void
addRowNnz
(
const
Iter
&
row
)
const
;
...
...
@@ -305,19 +303,20 @@ namespace Dune
void
allocateMarker
();
ColCompMatrix
*
mat
;
size_type
cols
;
// Number of rows/columns of the matrix entries
// (assumed to be scalars or dense matrices)
unsigned
int
n
,
m
;
ColCompMatrix
*
mat
;
size_type
cols
;
mutable
size_type
*
marker
;
mutable
std
::
vector
<
size_type
>
marker
;
};
template
<
class
M
>
template
<
class
Block
>
ColCompMatrixInitializer
<
M
>::
ColCompMatrixInitializer
(
ColCompMatrix
&
mat_
,
typename
std
::
enable_if_t
<
Dune
::
IsNumber
<
Block
>::
value
>*
sfinae
)
:
mat
(
&
mat_
),
cols
(
mat_
.
M
())
,
marker
(
0
)
:
mat
(
&
mat_
),
cols
(
mat_
.
M
())
{
n
=
1
;
m
=
1
;
...
...
@@ -328,7 +327,7 @@ namespace Dune
template
<
class
M
>
template
<
class
Block
>
ColCompMatrixInitializer
<
M
>::
ColCompMatrixInitializer
(
ColCompMatrix
&
mat_
,
typename
std
::
enable_if_t
<!
Dune
::
IsNumber
<
Block
>::
value
>*
sfinae
)
:
mat
(
&
mat_
),
cols
(
mat_
.
M
())
,
marker
(
0
)
:
mat
(
&
mat_
),
cols
(
mat_
.
M
())
{
// WARNING: This assumes that all blocks are dense and identical
n
=
M
::
block_type
::
rows
;
...
...
@@ -339,16 +338,9 @@ namespace Dune
template
<
class
M
>
ColCompMatrixInitializer
<
M
>::
ColCompMatrixInitializer
()
:
mat
(
0
),
cols
(
0
),
marker
(
0
),
n
(
0
),
m
(
0
)
:
mat
(
0
),
cols
(
0
),
n
(
0
),
m
(
0
)
{}
template
<
class
M
>
ColCompMatrixInitializer
<
M
>::~
ColCompMatrixInitializer
()
{
if
(
marker
)
delete
[]
marker
;
}
template
<
class
M
>
template
<
typename
Iter
>
void
ColCompMatrixInitializer
<
M
>::
addRowNnz
(
const
Iter
&
row
)
const
...
...
@@ -406,10 +398,8 @@ namespace Dune
template
<
class
M
>
void
ColCompMatrixInitializer
<
M
>::
allocateMarker
()
{
marker
=
new
typename
Matrix
::
size_type
[
cols
];
for
(
size_type
i
=
0
;
i
<
cols
;
++
i
)
marker
[
i
]
=
0
;
marker
.
resize
(
cols
);
std
::
fill
(
marker
.
begin
(),
marker
.
end
(),
0
);
}
template
<
class
M
>
...
...
@@ -471,8 +461,7 @@ namespace Dune
template
<
class
M
>
void
ColCompMatrixInitializer
<
M
>::
createMatrix
()
const
{
delete
[]
marker
;
marker
=
0
;
marker
.
clear
();
}
template
<
class
F
,
class
MRS
>
...
...
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