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
af950964
Commit
af950964
authored
10 years ago
by
Marian Piatkowski
Committed by
Steffen Müthing
10 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[Bugfix] Exploit analytical properties in MINRES to avoid special-casing for complex case
parent
9641b514
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/istl/solvers.hh
+6
-12
6 additions, 12 deletions
dune/istl/solvers.hh
with
6 additions
and
12 deletions
dune/istl/solvers.hh
+
6
−
12
View file @
af950964
...
...
@@ -1033,16 +1033,6 @@ namespace Dune {
private
:
template
<
typename
T
>
typename
enable_if
<
is_same
<
field_type
,
real_type
>::
value
,
T
>::
type
conjugate
(
const
T
&
t
)
{
return
t
;
}
template
<
typename
T
>
typename
enable_if
<!
is_same
<
field_type
,
real_type
>::
value
,
T
>::
type
conjugate
(
const
T
&
t
)
{
return
conj
(
t
);
}
void
generateGivensRotation
(
field_type
&
dx
,
field_type
&
dy
,
real_type
&
cs
,
field_type
&
sn
)
{
real_type
norm_dx
=
std
::
abs
(
dx
);
...
...
@@ -1059,12 +1049,16 @@ namespace Dune {
sn
=
cs
;
cs
*=
temp
;
sn
*=
dx
/
norm_dx
;
sn
*=
conjugate
(
dy
)
/
norm_dy
;
// dy is real in exact arithmetic
// so we don't need to conjugate here
sn
*=
dy
/
norm_dy
;
}
else
{
real_type
temp
=
norm_dy
/
norm_dx
;
cs
=
1.0
/
std
::
sqrt
(
1.0
+
temp
*
temp
);
sn
=
cs
;
sn
*=
conjugate
(
dy
/
dx
);
sn
*=
dy
/
dx
;
// dy and dx is real in exact arithmetic
// so we don't have to conjugate both of them
}
}
...
...
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