Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-solvers
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Patrick Jaap
dune-solvers
Commits
126d0898
Commit
126d0898
authored
7 years ago
by
Max Kahnt
Browse files
Options
Downloads
Patches
Plain Diff
Use resize from dune-matrix-vector module.
parent
631447e5
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
dune/solvers/common/genericvectortools.hh
+3
-34
3 additions, 34 deletions
dune/solvers/common/genericvectortools.hh
with
3 additions
and
34 deletions
dune/solvers/common/genericvectortools.hh
+
3
−
34
View file @
126d0898
...
...
@@ -22,6 +22,7 @@
#include
<dune/istl/bvector.hh>
#include
<dune/matrix-vector/genericvectortools.hh>
#include
<dune/matrix-vector/resize.hh>
#include
<dune/solvers/operators/sumoperator.hh>
...
...
@@ -49,44 +50,12 @@ struct GenericVector
//! Resize vector recursivly to size of given vector/matrix
template
<
class
VectorTypeA
,
class
VectorTypeB
>
DUNE_DEPRECATED_MSG
(
"Please use Dune::MatrixVector::resize instead."
)
static
void
resize
(
VectorTypeA
&
a
,
const
VectorTypeB
&
b
)
{
a
.
resize
(
b
.
size
());
typename
VectorTypeB
::
const_iterator
it
=
b
.
begin
();
typename
VectorTypeB
::
const_iterator
end
=
b
.
end
();
for
(;
it
!=
end
;
++
it
)
GenericVector
::
resize
(
a
[
it
.
index
()],
*
it
);
Dune
::
MatrixVector
::
resize
(
a
,
b
);
}
template
<
class
VectorTypeA
,
class
T
,
class
A
>
static
void
resize
(
VectorTypeA
&
a
,
const
Dune
::
BCRSMatrix
<
T
,
A
>&
b
)
{
a
.
resize
(
b
.
N
());
typedef
typename
Dune
::
BCRSMatrix
<
T
,
A
>
VectorTypeB
;
typename
VectorTypeB
::
const_iterator
it
=
b
.
begin
();
typename
VectorTypeB
::
const_iterator
end
=
b
.
end
();
for
(;
it
!=
end
;
++
it
)
GenericVector
::
resize
(
a
[
it
.
index
()],
*
(
it
->
begin
()));
}
template
<
class
VectorTypeA
,
class
SparseMatrixType
,
class
LowRankMatrixType
>
static
void
resize
(
VectorTypeA
&
a
,
const
SumOperator
<
SparseMatrixType
,
LowRankMatrixType
>&
b
)
{
a
.
resize
(
b
.
N
());
typename
SparseMatrixType
::
const_iterator
it
=
b
.
sparseMatrix
().
begin
();
typename
SparseMatrixType
::
const_iterator
end
=
b
.
sparseMatrix
().
end
();
for
(;
it
!=
end
;
++
it
)
GenericVector
::
resize
(
a
[
it
.
index
()],
*
(
it
->
begin
()));
}
template
<
class
field_type
,
int
n
,
class
VectorTypeB
>
static
void
resize
(
Dune
::
FieldVector
<
field_type
,
n
>&
a
DUNE_UNUSED
,
const
VectorTypeB
&
b
DUNE_UNUSED
)
{}
template
<
int
n
,
class
VectorTypeB
>
static
void
resize
(
std
::
bitset
<
n
>&
a
DUNE_UNUSED
,
const
VectorTypeB
&
b
DUNE_UNUSED
)
{}
//! Set vector to zero at indices that are true in bitvector recursivly
template
<
class
VectorType
,
class
BitVectorType
>
DUNE_DEPRECATED_MSG
(
"Please use Dune::MatrixVector::Generic::truncate instead."
)
...
...
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