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
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
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
agnumpde
dune-solvers
Commits
e2abbb22
Commit
e2abbb22
authored
13 years ago
by
Uli Sack
Committed by
usack
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
harmonized template parameter names with those in the header
[[Imported from SVN: r5407]]
parent
b443f0cb
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/transferoperators/truncatedcompressedmgtransfer.cc
+14
-15
14 additions, 15 deletions
...olvers/transferoperators/truncatedcompressedmgtransfer.cc
with
14 additions
and
15 deletions
dune/solvers/transferoperators/truncatedcompressedmgtransfer.cc
+
14
−
15
View file @
e2abbb22
template
<
class
DiscFunc
Type
,
class
BitVectorType
,
class
Operator
Type
>
template
<
class
Vector
Type
,
class
BitVectorType
,
class
Matrix
Type
>
void
TruncatedCompressedMGTransfer
<
DiscFunc
Type
,
BitVectorType
,
Operator
Type
>::
prolong
(
const
DiscFunc
Type
&
f
,
DiscFunc
Type
&
t
,
void
TruncatedCompressedMGTransfer
<
Vector
Type
,
BitVectorType
,
Matrix
Type
>::
prolong
(
const
Vector
Type
&
f
,
Vector
Type
&
t
,
const
BitVectorType
&
critical
)
const
const
BitVectorType
&
critical
)
const
{
{
if
(
f
.
size
()
!=
this
->
matrix_
->
M
())
if
(
f
.
size
()
!=
this
->
matrix_
->
M
())
...
@@ -12,8 +12,8 @@ void TruncatedCompressedMGTransfer<DiscFuncType, BitVectorType, OperatorType>::p
...
@@ -12,8 +12,8 @@ void TruncatedCompressedMGTransfer<DiscFuncType, BitVectorType, OperatorType>::p
t
.
resize
(
this
->
matrix_
->
N
());
t
.
resize
(
this
->
matrix_
->
N
());
typedef
typename
DiscFunc
Type
::
Iterator
Iterator
;
typedef
typename
Vector
Type
::
Iterator
Iterator
;
typedef
typename
DiscFunc
Type
::
ConstIterator
ConstIterator
;
typedef
typename
Vector
Type
::
ConstIterator
ConstIterator
;
typedef
typename
TransferOperatorType
::
row_type
RowType
;
typedef
typename
TransferOperatorType
::
row_type
RowType
;
typedef
typename
RowType
::
ConstIterator
ColumnIterator
;
typedef
typename
RowType
::
ConstIterator
ColumnIterator
;
...
@@ -43,8 +43,8 @@ void TruncatedCompressedMGTransfer<DiscFuncType, BitVectorType, OperatorType>::p
...
@@ -43,8 +43,8 @@ void TruncatedCompressedMGTransfer<DiscFuncType, BitVectorType, OperatorType>::p
}
}
}
}
template
<
class
DiscFunc
Type
,
class
BitVectorType
,
class
Operator
Type
>
template
<
class
Vector
Type
,
class
BitVectorType
,
class
Matrix
Type
>
void
TruncatedCompressedMGTransfer
<
DiscFunc
Type
,
BitVectorType
,
Operator
Type
>::
restrict
(
const
DiscFunc
Type
&
f
,
DiscFunc
Type
&
t
,
void
TruncatedCompressedMGTransfer
<
Vector
Type
,
BitVectorType
,
Matrix
Type
>::
restrict
(
const
Vector
Type
&
f
,
Vector
Type
&
t
,
const
BitVectorType
&
critical
)
const
const
BitVectorType
&
critical
)
const
{
{
if
(
f
.
size
()
!=
this
->
matrix_
->
N
())
if
(
f
.
size
()
!=
this
->
matrix_
->
N
())
...
@@ -59,8 +59,8 @@ void TruncatedCompressedMGTransfer<DiscFuncType, BitVectorType, OperatorType>::r
...
@@ -59,8 +59,8 @@ void TruncatedCompressedMGTransfer<DiscFuncType, BitVectorType, OperatorType>::r
t
.
resize
(
this
->
matrix_
->
M
());
t
.
resize
(
this
->
matrix_
->
M
());
t
=
0
;
t
=
0
;
typedef
typename
DiscFunc
Type
::
Iterator
Iterator
;
typedef
typename
Vector
Type
::
Iterator
Iterator
;
typedef
typename
DiscFunc
Type
::
ConstIterator
ConstIterator
;
typedef
typename
Vector
Type
::
ConstIterator
ConstIterator
;
typedef
typename
TransferOperatorType
::
row_type
RowType
;
typedef
typename
TransferOperatorType
::
row_type
RowType
;
typedef
typename
RowType
::
ConstIterator
ColumnIterator
;
typedef
typename
RowType
::
ConstIterator
ColumnIterator
;
...
@@ -76,7 +76,7 @@ void TruncatedCompressedMGTransfer<DiscFuncType, BitVectorType, OperatorType>::r
...
@@ -76,7 +76,7 @@ void TruncatedCompressedMGTransfer<DiscFuncType, BitVectorType, OperatorType>::r
// The following lines are a matrix-vector loop, but rows belonging
// The following lines are a matrix-vector loop, but rows belonging
// to critical dofs are left out
// to critical dofs are left out
typename
DiscFunc
Type
::
block_type
&
tEntry
=
t
[
cIt
.
index
()];
typename
Vector
Type
::
block_type
&
tEntry
=
t
[
cIt
.
index
()];
for
(
int
i
=
0
;
i
<
blocksize
;
i
++
)
{
for
(
int
i
=
0
;
i
<
blocksize
;
i
++
)
{
if
(
!
critical
[
rowIdx
][
i
])
if
(
!
critical
[
rowIdx
][
i
])
...
@@ -86,10 +86,9 @@ void TruncatedCompressedMGTransfer<DiscFuncType, BitVectorType, OperatorType>::r
...
@@ -86,10 +86,9 @@ void TruncatedCompressedMGTransfer<DiscFuncType, BitVectorType, OperatorType>::r
}
}
}
}
template
<
class
VectorType
,
class
BitVectorType
,
class
MatrixType
>
template
<
class
DiscFuncType
,
class
BitVectorType
,
class
OperatorType
>
void
TruncatedCompressedMGTransfer
<
VectorType
,
BitVectorType
,
MatrixType
>::
void
TruncatedCompressedMGTransfer
<
DiscFuncType
,
BitVectorType
,
OperatorType
>::
galerkinRestrict
(
const
MatrixType
&
fineMat
,
MatrixType
&
coarseMat
,
galerkinRestrict
(
const
OperatorType
&
fineMat
,
OperatorType
&
coarseMat
,
const
BitVectorType
&
critical
)
const
const
BitVectorType
&
critical
)
const
{
{
if
(
this
->
recompute_
!=
NULL
&&
this
->
recompute_
->
size
()
!=
(
unsigned
int
)
this
->
matrix_
->
M
())
if
(
this
->
recompute_
!=
NULL
&&
this
->
recompute_
->
size
()
!=
(
unsigned
int
)
this
->
matrix_
->
M
())
...
@@ -99,7 +98,7 @@ galerkinRestrict(const OperatorType& fineMat, OperatorType& coarseMat,
...
@@ -99,7 +98,7 @@ galerkinRestrict(const OperatorType& fineMat, OperatorType& coarseMat,
// ////////////////////////
// ////////////////////////
// Nonsymmetric case
// Nonsymmetric case
// ////////////////////////
// ////////////////////////
typedef
typename
Operator
Type
::
row_type
RowType
;
typedef
typename
Matrix
Type
::
row_type
RowType
;
typedef
typename
RowType
::
Iterator
ColumnIterator
;
typedef
typename
RowType
::
Iterator
ColumnIterator
;
typedef
typename
RowType
::
ConstIterator
ConstColumnIterator
;
typedef
typename
RowType
::
ConstIterator
ConstColumnIterator
;
...
@@ -156,7 +155,7 @@ galerkinRestrict(const OperatorType& fineMat, OperatorType& coarseMat,
...
@@ -156,7 +155,7 @@ galerkinRestrict(const OperatorType& fineMat, OperatorType& coarseMat,
if
(
this
->
recompute_
&&
!
((
*
this
->
recompute_
)[
iv
][
0
])
&&
!
((
*
this
->
recompute_
)[
jv
][
0
]))
if
(
this
->
recompute_
&&
!
((
*
this
->
recompute_
)[
iv
][
0
])
&&
!
((
*
this
->
recompute_
)[
jv
][
0
]))
continue
;
continue
;
typename
Operator
Type
::
block_type
&
cm
=
coarseMat
[
iv
][
jv
];
typename
Matrix
Type
::
block_type
&
cm
=
coarseMat
[
iv
][
jv
];
// Compute im * m * jm, but omitting the critical entries
// Compute im * m * jm, but omitting the critical entries
for
(
int
i
=
0
;
i
<
blocksize
;
i
++
)
{
for
(
int
i
=
0
;
i
<
blocksize
;
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