Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
dumux
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
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
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
dumux-repositories
dumux
Commits
f7000d03
Commit
f7000d03
authored
2 years ago
by
Bernd Flemisch
Committed by
Timo Koch
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[linear] add norm to base class
parent
f13c1791
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!3386
New istl linear solvers
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dumux/linear/solver.hh
+11
-0
11 additions, 0 deletions
dumux/linear/solver.hh
with
11 additions
and
0 deletions
dumux/linear/solver.hh
+
11
−
0
View file @
f7000d03
...
@@ -24,7 +24,9 @@
...
@@ -24,7 +24,9 @@
#ifndef DUMUX_LINEAR_SOLVER_HH
#ifndef DUMUX_LINEAR_SOLVER_HH
#define DUMUX_LINEAR_SOLVER_HH
#define DUMUX_LINEAR_SOLVER_HH
#include
<dune/common/parallel/mpihelper.hh>
#include
<dune/common/exceptions.hh>
#include
<dune/common/exceptions.hh>
#include
<dune/istl/scalarproducts.hh>
#include
<dumux/common/parameters.hh>
#include
<dumux/common/parameters.hh>
namespace
Dumux
{
namespace
Dumux
{
...
@@ -71,6 +73,15 @@ public:
...
@@ -71,6 +73,15 @@ public:
DUNE_THROW
(
Dune
::
NotImplemented
,
"Linear solver doesn't implement a solve method!"
);
DUNE_THROW
(
Dune
::
NotImplemented
,
"Linear solver doesn't implement a solve method!"
);
}
}
template
<
class
Vector
>
auto
norm
(
const
Vector
&
x
)
const
{
if
(
Dune
::
MPIHelper
::
getCommunication
().
size
()
>
1
)
DUNE_THROW
(
Dune
::
NotImplemented
,
"norm in parallel"
);
return
Dune
::
SeqScalarProduct
<
Vector
>
().
norm
(
x
);
}
//! the name of the linear solver
//! the name of the linear solver
std
::
string
name
()
const
std
::
string
name
()
const
{
return
"unknown solver"
;
}
{
return
"unknown solver"
;
}
...
...
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