Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-common
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
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
Timo Koch
dune-common
Commits
329690b6
Commit
329690b6
authored
20 years ago
by
Peter Bastian
Browse files
Options
Downloads
Patches
Plain Diff
added ILU(n)
[[Imported from SVN: r975]]
parent
59973e9d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
istl/preconditioners.hh
+51
-0
51 additions, 0 deletions
istl/preconditioners.hh
with
51 additions
and
0 deletions
istl/preconditioners.hh
+
51
−
0
View file @
329690b6
...
...
@@ -207,6 +207,57 @@ namespace Dune {
};
/*! Wraps the naked ISTL generic ILU(n) preconditioner into the
solver framework.
*/
template
<
class
M
,
class
X
,
class
Y
>
class
SeqILUn
:
public
Preconditioner
<
X
,
Y
>
{
public:
//! export types, they come from the derived class
typedef
M
matrix_type
;
typedef
X
domain_type
;
typedef
Y
range_type
;
typedef
typename
X
::
field_type
field_type
;
//! constructor gets all parameters to operate the prec.
SeqILUn
(
const
M
&
A
,
int
n
)
:
ILU
(
A
.
N
(),
A
.
M
(),
M
::
row_wise
)
{
_n
=
n
;
bilu_decomposition
(
A
,
n
,
ILU
);
}
//! prepare: nothing to do here
virtual
void
pre
(
X
&
x
,
Y
&
b
)
{}
//! just calls the istl functions
virtual
void
apply
(
X
&
v
,
const
Y
&
d
)
{
bilu_backsolve
(
ILU
,
v
,
d
);
}
//! sequential case: just call vector function
virtual
field_type
dot
(
const
Y
&
y
,
const
Y
&
z
)
{
return
y
*
z
;
}
//! sequential case: just call vector function
virtual
double
norm
(
const
Y
&
y
)
{
return
y
.
two_norm
();
// my favourite norm
}
// nothing to do here
virtual
void
post
(
X
&
x
)
{}
private
:
M
ILU
;
int
_n
;
};
/** @} end documentation */
...
...
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