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
66034f9f
Commit
66034f9f
authored
10 years ago
by
Jonathan Youett
Browse files
Options
Downloads
Patches
Plain Diff
OperatorType -> MatrixType
DiscFuncType -> VectorType
parent
ae0a4d1d
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/truncateddensemgtransfer.cc
+16
-16
16 additions, 16 deletions
dune/solvers/transferoperators/truncateddensemgtransfer.cc
with
16 additions
and
16 deletions
dune/solvers/transferoperators/truncateddensemgtransfer.cc
+
16
−
16
View file @
66034f9f
template
<
class
DiscFunc
Type
,
class
BitVectorType
,
class
Operator
Type
>
template
<
class
Vector
Type
,
class
BitVectorType
,
class
Matrix
Type
>
void
TruncatedDenseMGTransfer
<
DiscFunc
Type
,
BitVectorType
,
Operator
Type
>::
prolong
(
const
DiscFunc
Type
&
f
,
DiscFunc
Type
&
t
)
const
void
TruncatedDenseMGTransfer
<
Vector
Type
,
BitVectorType
,
Matrix
Type
>::
prolong
(
const
Vector
Type
&
f
,
Vector
Type
&
t
)
const
{
{
// If the critical bitfield is not set, call the base class method
// If the critical bitfield is not set, call the base class method
if
(
this
->
critical_
==
nullptr
)
{
if
(
this
->
critical_
==
nullptr
)
{
...
@@ -21,10 +21,10 @@ void TruncatedDenseMGTransfer<DiscFuncType, BitVectorType, OperatorType>::prolon
...
@@ -21,10 +21,10 @@ void TruncatedDenseMGTransfer<DiscFuncType, BitVectorType, OperatorType>::prolon
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
Operator
Type
::
row_type
RowType
;
typedef
typename
Matrix
Type
::
row_type
RowType
;
typedef
typename
RowType
::
ConstIterator
ColumnIterator
;
typedef
typename
RowType
::
ConstIterator
ColumnIterator
;
Iterator
tIt
=
t
.
begin
();
Iterator
tIt
=
t
.
begin
();
...
@@ -60,8 +60,8 @@ void TruncatedDenseMGTransfer<DiscFuncType, BitVectorType, OperatorType>::prolon
...
@@ -60,8 +60,8 @@ void TruncatedDenseMGTransfer<DiscFuncType, BitVectorType, OperatorType>::prolon
}
}
template
<
class
DiscFunc
Type
,
class
BitVectorType
,
class
Operator
Type
>
template
<
class
Vector
Type
,
class
BitVectorType
,
class
Matrix
Type
>
void
TruncatedDenseMGTransfer
<
DiscFunc
Type
,
BitVectorType
,
Operator
Type
>::
restrict
(
const
DiscFunc
Type
&
f
,
DiscFunc
Type
&
t
)
const
void
TruncatedDenseMGTransfer
<
Vector
Type
,
BitVectorType
,
Matrix
Type
>::
restrict
(
const
Vector
Type
&
f
,
Vector
Type
&
t
)
const
{
{
// If the critical bitfield is not set, call the base class method
// If the critical bitfield is not set, call the base class method
...
@@ -84,10 +84,10 @@ void TruncatedDenseMGTransfer<DiscFuncType, BitVectorType, OperatorType>::restri
...
@@ -84,10 +84,10 @@ void TruncatedDenseMGTransfer<DiscFuncType, BitVectorType, OperatorType>::restri
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
Operator
Type
::
row_type
RowType
;
typedef
typename
Matrix
Type
::
row_type
RowType
;
typedef
typename
RowType
::
ConstIterator
ColumnIterator
;
typedef
typename
RowType
::
ConstIterator
ColumnIterator
;
Iterator
tIt
=
t
.
begin
();
Iterator
tIt
=
t
.
begin
();
...
@@ -104,7 +104,7 @@ void TruncatedDenseMGTransfer<DiscFuncType, BitVectorType, OperatorType>::restri
...
@@ -104,7 +104,7 @@ void TruncatedDenseMGTransfer<DiscFuncType, BitVectorType, OperatorType>::restri
// 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
++
)
{
for
(
int
j
=
0
;
j
<
blocksize
;
j
++
)
{
for
(
int
j
=
0
;
j
<
blocksize
;
j
++
)
{
...
@@ -123,9 +123,9 @@ void TruncatedDenseMGTransfer<DiscFuncType, BitVectorType, OperatorType>::restri
...
@@ -123,9 +123,9 @@ void TruncatedDenseMGTransfer<DiscFuncType, BitVectorType, OperatorType>::restri
}
}
template
<
class
DiscFunc
Type
,
class
BitVectorType
,
class
Operator
Type
>
template
<
class
Vector
Type
,
class
BitVectorType
,
class
Matrix
Type
>
void
TruncatedDenseMGTransfer
<
DiscFunc
Type
,
BitVectorType
,
Operator
Type
>::
void
TruncatedDenseMGTransfer
<
Vector
Type
,
BitVectorType
,
Matrix
Type
>::
galerkinRestrict
(
const
Operator
Type
&
fineMat
,
Operator
Type
&
coarseMat
)
const
galerkinRestrict
(
const
Matrix
Type
&
fineMat
,
Matrix
Type
&
coarseMat
)
const
{
{
// If the critical bitfield is not set, call the base class method
// If the critical bitfield is not set, call the base class method
...
@@ -141,7 +141,7 @@ galerkinRestrict(const OperatorType& fineMat, OperatorType& coarseMat) const
...
@@ -141,7 +141,7 @@ galerkinRestrict(const OperatorType& fineMat, OperatorType& coarseMat) const
// ////////////////////////
// ////////////////////////
// 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
;
...
@@ -199,7 +199,7 @@ galerkinRestrict(const OperatorType& fineMat, OperatorType& coarseMat) const
...
@@ -199,7 +199,7 @@ galerkinRestrict(const OperatorType& fineMat, OperatorType& coarseMat) const
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