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
c949657a
Commit
c949657a
authored
5 years ago
by
Simon Praetorius
Browse files
Options
Downloads
Patches
Plain Diff
Add specialization of ConstructionTraits for Richardson
parent
85fce383
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!304
Add specialization of ConstructionTraits for Richardson
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dune/istl/paamg/smoother.hh
+68
-7
68 additions, 7 deletions
dune/istl/paamg/smoother.hh
with
68 additions
and
7 deletions
dune/istl/paamg/smoother.hh
+
68
−
7
View file @
c949657a
...
...
@@ -67,19 +67,22 @@ namespace Dune
};
template
<
class
X
,
class
Y
,
class
C
,
class
T
>
struct
SmootherTraits
<
BlockPreconditioner
<
X
,
Y
,
C
,
T
>
>
template
<
class
X
,
class
Y
>
struct
SmootherTraits
<
Richardson
<
X
,
Y
>
>
{
typedef
DefaultSmootherArgs
<
typename
T
::
matrix_type
::
field_type
>
Arguments
;
typedef
DefaultSmootherArgs
<
typename
X
::
field_type
>
Arguments
;
};
template
<
class
X
,
class
Y
,
class
C
,
class
T
>
struct
SmootherTraits
<
BlockPreconditioner
<
X
,
Y
,
C
,
T
>
>
:
public
SmootherTraits
<
T
>
{};
template
<
class
C
,
class
T
>
struct
SmootherTraits
<
NonoverlappingBlockPreconditioner
<
C
,
T
>
>
{
typedef
DefaultSmootherArgs
<
typename
T
::
matrix_type
::
field_type
>
Arguments
;
};
:
public
SmootherTraits
<
T
>
{};
/**
* @brief Construction Arguments for the default smoothers
...
...
@@ -168,6 +171,49 @@ namespace Dune
};
template
<
class
X
,
class
Y
>
class
DefaultConstructionArgs
<
Richardson
<
X
,
Y
>>
{
typedef
Richardson
<
X
,
Y
>
T
;
typedef
typename
SmootherTraits
<
T
>::
Arguments
SmootherArgs
;
public:
virtual
~
DefaultConstructionArgs
()
{}
template
<
class
...
Args
>
void
setMatrix
(
const
Args
&
...)
{}
void
setArgs
(
const
SmootherArgs
&
args
)
{
args_
=&
args
;
}
template
<
class
T1
>
void
setComm
(
T1
&
comm
)
{
DUNE_UNUSED_PARAMETER
(
comm
);
}
const
SequentialInformation
&
getComm
()
{
return
comm_
;
}
const
SmootherArgs
getArgs
()
const
{
return
*
args_
;
}
private
:
const
SmootherArgs
*
args_
;
SequentialInformation
comm_
;
};
template
<
class
T
>
class
ConstructionTraits
;
...
...
@@ -217,6 +263,21 @@ namespace Dune
}
};
/**
* @brief Policy for the construction of the SeqJac smoother
*/
template
<
class
X
,
class
Y
>
struct
ConstructionTraits
<
Richardson
<
X
,
Y
>
>
{
typedef
DefaultConstructionArgs
<
Richardson
<
X
,
Y
>
>
Arguments
;
static
inline
std
::
shared_ptr
<
Richardson
<
X
,
Y
>>
construct
(
Arguments
&
args
)
{
return
std
::
make_shared
<
Richardson
<
X
,
Y
>>
(
args
.
getArgs
().
relaxationFactor
);
}
};
DUNE_NO_DEPRECATED_BEGIN
// for deprecated SeqILU0
/**
...
...
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