Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
dumux-repositories
dumux
Commits
f2753bdd
Commit
f2753bdd
authored
Dec 16, 2017
by
Bernd Flemisch
Committed by
Timo Koch
Dec 16, 2017
Browse files
[linear] replace typedef by using
parent
6b39d814
Changes
4
Hide whitespace changes
Inline
Side-by-side
dumux/linear/amgbackend.hh
View file @
f2753bdd
...
...
@@ -51,14 +51,14 @@ void scaleLinearSystem(Matrix& matrix, Vector& rhs)
typename
Matrix
::
RowIterator
row
=
matrix
.
begin
();
for
(;
row
!=
matrix
.
end
();
++
row
)
{
type
def
typename
Matrix
::
size_type
size_type
;
using
size_
type
=
typename
Matrix
::
size_type
;
size_type
rowIdx
=
row
.
index
();
typedef
typename
Matrix
::
block_type
MatrixBlock
;
using
MatrixBlock
=
typename
Matrix
::
block_type
;
MatrixBlock
diagonal
=
matrix
[
rowIdx
][
rowIdx
];
diagonal
.
invert
();
typedef
typename
Vector
::
block_type
VectorBlock
;
using
VectorBlock
=
typename
Vector
::
block_type
;
const
VectorBlock
b
=
rhs
[
rowIdx
];
diagonal
.
mv
(
b
,
rhs
[
rowIdx
]);
...
...
dumux/linear/amgparallelhelpers.hh
View file @
f2753bdd
...
...
@@ -71,7 +71,7 @@ class ParallelISTLHelper
public
Dune
::
CommDataHandleIF
<
ConsistencyBoxGatherScatter
<
V
>
,
typename
V
::
block_type
>
{
public:
typedef
typename
V
::
block_type
DataType
;
using
DataType
=
typename
V
::
block_type
;
ConsistencyBoxGatherScatter
(
V
&
container
,
const
DofMapper
&
mapper
)
:
BaseGatherScatter
(
mapper
),
container_
(
container
)
...
...
@@ -122,7 +122,7 @@ class ParallelISTLHelper
public
Dune
::
CommDataHandleIF
<
GhostGatherScatter
,
std
::
size_t
>
{
public:
typedef
std
::
size_t
DataType
;
using
DataType
=
std
::
size_t
;
GhostGatherScatter
(
std
::
vector
<
std
::
size_t
>&
ranks
,
const
DofMapper
&
mapper
)
:
BaseGatherScatter
(
mapper
),
ranks_
(
ranks
)
...
...
@@ -178,7 +178,7 @@ class ParallelISTLHelper
public
Dune
::
CommDataHandleIF
<
InteriorBorderGatherScatter
,
std
::
size_t
>
{
public:
typedef
std
::
size_t
DataType
;
using
DataType
=
std
::
size_t
;
InteriorBorderGatherScatter
(
std
::
vector
<
std
::
size_t
>&
ranks
,
const
DofMapper
&
mapper
)
:
BaseGatherScatter
(
mapper
),
ranks_
(
ranks
)
...
...
@@ -236,7 +236,7 @@ class ParallelISTLHelper
:
public
BaseGatherScatter
,
public
Dune
::
CommDataHandleIF
<
NeighbourGatherScatter
,
int
>
{
typedef
in
t
DataType
;
us
in
g
DataType
=
int
;
NeighbourGatherScatter
(
const
DofMapper
&
mapper
,
int
rank_
,
std
::
set
<
int
>&
neighbours_
)
:
BaseGatherScatter
(
mapper
),
myrank
(
rank_
),
neighbours
(
neighbours_
)
...
...
@@ -285,7 +285,7 @@ class ParallelISTLHelper
:
public
BaseGatherScatter
,
public
Dune
::
CommDataHandleIF
<
SharedGatherScatter
,
int
>
{
typedef
in
t
DataType
;
us
in
g
DataType
=
int
;
SharedGatherScatter
(
std
::
vector
<
int
>&
shared
,
const
DofMapper
&
mapper
)
:
BaseGatherScatter
(
mapper
),
shared_
(
shared
)
...
...
@@ -336,7 +336,7 @@ class ParallelISTLHelper
:
public
BaseGatherScatter
,
public
Dune
::
CommDataHandleIF
<
GlobalIndexGatherScatter
<
GI
>
,
GI
>
{
typedef
GI
DataType
;
using
DataType
=
GI
;
GlobalIndexGatherScatter
(
std
::
vector
<
GI
>&
gindices
,
const
DofMapper
&
mapper
)
:
BaseGatherScatter
(
mapper
),
gindices_
(
gindices
)
{}
...
...
@@ -783,10 +783,10 @@ public:
A
.
setSize
(
tmp
.
N
(),
tmp
.
N
(),
nnz
);
A
.
setBuildMode
(
Matrix
::
row_wise
);
typename
Matrix
::
CreateIterator
citer
=
A
.
createbegin
();
typedef
typename
std
::
vector
<
std
::
set
<
int
>
>::
const_iterator
Iter
;
using
Iter
=
typename
std
::
vector
<
std
::
set
<
int
>
>::
const_iterator
;
for
(
Iter
i
=
sparsity
.
begin
(),
end
=
sparsity
.
end
();
i
!=
end
;
++
i
,
++
citer
)
{
typedef
typename
std
::
set
<
int
>::
const_iterator
SIter
;
using
SIter
=
typename
std
::
set
<
int
>::
const_iterator
;
for
(
SIter
si
=
i
->
begin
(),
send
=
i
->
end
();
si
!=
send
;
++
si
)
citer
.
insert
(
*
si
);
}
...
...
@@ -857,9 +857,9 @@ void EntityExchanger<TypeTag>::getExtendedMatrix (Matrix& A) const
A
.
setSize
(
tmp
.
N
(),
tmp
.
N
(),
nnz
);
A
.
setBuildMode
(
Matrix
::
row_wise
);
typename
Matrix
::
CreateIterator
citer
=
A
.
createbegin
();
typedef
typename
std
::
vector
<
std
::
set
<
int
>
>::
const_iterator
Iter
;
using
Iter
=
typename
std
::
vector
<
std
::
set
<
int
>
>::
const_iterator
;
for
(
Iter
i
=
sparsity
.
begin
(),
end
=
sparsity
.
end
();
i
!=
end
;
++
i
,
++
citer
){
typedef
typename
std
::
set
<
int
>::
const_iterator
SIter
;
using
SIter
=
typename
std
::
set
<
int
>::
const_iterator
;
for
(
SIter
si
=
i
->
begin
(),
send
=
i
->
end
();
si
!=
send
;
++
si
)
citer
.
insert
(
*
si
);
}
...
...
dumux/linear/linearsolveracceptsmultitypematrix.hh
View file @
f2753bdd
...
...
@@ -32,7 +32,7 @@ template<typename TypeTag, typename LinearSolver>
struct
LinearSolverAcceptsMultiTypeMatrixImpl
{
static
constexpr
bool
value
=
true
;
};
//! Convenience
typedef
//! Convenience
using declaration
template
<
typename
TypeTag
>
using
LinearSolverAcceptsMultiTypeMatrix
=
LinearSolverAcceptsMultiTypeMatrixImpl
<
TypeTag
,
typename
GET_PROP_TYPE
(
TypeTag
,
LinearSolver
)
>
;
...
...
@@ -77,4 +77,4 @@ struct LinearSolverAcceptsMultiTypeMatrixImpl<TypeTag, UMFPackBackend<TypeTag>>
}
// end namespace Dumux
#endif
\ No newline at end of file
#endif
dumux/linear/vectorexchange.hh
View file @
f2753bdd
...
...
@@ -37,7 +37,7 @@ class VectorExchange
{
public:
//! export type of data for message buffer
typedef
typename
Vector
::
value_type
DataType
;
using
DataType
=
typename
Vector
::
value_type
;
//! returns true if data for this codim should be communicated
bool
contains
(
int
dim
,
int
codim
)
const
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment