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
a656b05f
Commit
a656b05f
authored
14 years ago
by
Oliver Sander
Committed by
sander
14 years ago
Browse files
Options
Downloads
Patches
Plain Diff
a preconditioned Richardson step
[[Imported from SVN: r3601]]
parent
1fd3c1cf
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dune/solvers/iterationsteps/Makefile.am
+3
-1
3 additions, 1 deletion
dune/solvers/iterationsteps/Makefile.am
dune/solvers/iterationsteps/richardsonstep.hh
+58
-0
58 additions, 0 deletions
dune/solvers/iterationsteps/richardsonstep.hh
with
61 additions
and
1 deletion
dune/solvers/iterationsteps/Makefile.am
+
3
−
1
View file @
a656b05f
...
...
@@ -4,7 +4,9 @@ iterationstepsdir = $(includedir)/dune/dune-solvers/iterationsteps
iterationsteps_HEADERS
=
amgstep.hh blockgsstep.hh blockgsstep.cc iterationstep.hh
\
lineariterationstep.hh linegsstep.hh linegsstep.cc mmgstep.hh mmgstep.cc
\
multigridstep.hh multigridstep.cc
\
projectedblockgsstep.hh projectedblockgsstep.cc projectedlinegsstep.cc projectedlinegsstep.hh truncatedblockgsstep.hh
\
projectedblockgsstep.hh projectedblockgsstep.cc projectedlinegsstep.cc projectedlinegsstep.hh
\
richardsonstep.hh
\
truncatedblockgsstep.hh
\
truncatedsaddlepointgsstep.hh trustregiongsstep.cc trustregiongsstep.hh
include
$(top_srcdir)/am/global-rules
This diff is collapsed.
Click to expand it.
dune/solvers/iterationsteps/richardsonstep.hh
0 → 100644
+
58
−
0
View file @
a656b05f
#ifndef DUNE_RICHARDSON_STEP_HH
#define DUNE_RICHARDSON_STEP_HH
#include
<dune/common/bitsetvector.hh>
#include
<dune/solvers/common/preconditioner.hh>
#include
<dune/solvers/iterationsteps/iterationstep.hh>
/** \brief A single preconditioned and damped Richardson step
*/
template
<
class
VectorType
,
class
BitVectorType
=
Dune
::
BitSetVector
<
VectorType
::
block_type
::
dimension
>
>
class
RichardsonStep
:
public
IterationStep
<
VectorType
,
BitVectorType
>
{
public:
/** \brief Constructor */
RichardsonStep
(
const
Preconditioner
<
VectorType
>*
preconditioner
,
double
damping
)
:
preconditioner_
(
preconditioner
),
damping_
(
damping
)
{}
//! Perform one iteration
virtual
void
iterate
();
/** \brief Retrieve the solution */
virtual
VectorType
getSol
();
const
Preconditioner
<
VectorType
>*
preconditioner_
;
double
damping_
;
};
template
<
class
VectorType
,
class
BitVectorType
>
inline
VectorType
RichardsonStep
<
VectorType
,
BitVectorType
>::
getSol
()
{
return
*
(
this
->
x_
);
}
template
<
class
VectorType
,
class
BitVectorType
>
inline
void
RichardsonStep
<
VectorType
,
BitVectorType
>::
iterate
()
{
VectorType
residual
;
preconditioner_
->
apply
(
*
this
->
x_
,
residual
);
this
->
x_
->
axpy
(
damping_
,
residual
);
}
#endif
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