Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pugs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
code
pugs
Merge requests
!90
Add access to cells' volume of a mesh in the script file
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
Add access to cells' volume of a mesh in the script file
feature/discrete-functions
into
develop
Overview
0
Commits
8
Pipelines
0
Changes
26
Merged
Add access to cells' volume of a mesh in the script file
Stéphane Del Pino
requested to merge
feature/discrete-functions
into
develop
May 25, 2021
Overview
0
Commits
8
Pipelines
0
Changes
26
0
0
Merge request reports
Compare
develop
develop (base)
and
latest version
latest version
a2683e80
8 commits,
May 25, 2021
26 files
+
1001
−
436
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
26
src/algebra/BiCGStab.hpp
+
5
−
5
View file @ a2683e80
Edit in single-file editor
Open in Web IDE
Show full file
@@ -27,7 +27,7 @@ struct BiCGStab
r_k_1
=
b
-
A
*
x
;
double
residu
=
std
::
sqrt
((
r_k_1
,
r_k_1
));
// Norm(r_k_1);
double
residu
=
std
::
sqrt
(
dot
(
r_k_1
,
r_k_1
));
// Norm(r_k_1);
if
(
residu
!=
0
)
{
double
resid0
=
residu
;
@@ -53,23 +53,23 @@ struct BiCGStab
Ap_k
=
A
*
p_k
;
const
double
alpha_k
=
(
r_k_1
,
rTilda_0
)
/
(
Ap_k
,
rTilda_0
);
const
double
alpha_k
=
dot
(
r_k_1
,
rTilda_0
)
/
dot
(
Ap_k
,
rTilda_0
);
s_k
=
r_k_1
-
alpha_k
*
Ap_k
;
As_k
=
A
*
s_k
;
const
double
w_k
=
(
As_k
,
s_k
)
/
(
As_k
,
As_k
);
const
double
w_k
=
dot
(
As_k
,
s_k
)
/
dot
(
As_k
,
As_k
);
x
+=
alpha_k
*
p_k
+
w_k
*
s_k
;
r_k
=
s_k
-
w_k
*
As_k
;
const
double
beta_k
=
(
r_k
,
rTilda_0
)
/
(
r_k_1
,
rTilda_0
)
*
(
alpha_k
/
w_k
);
const
double
beta_k
=
dot
(
r_k
,
rTilda_0
)
/
dot
(
r_k_1
,
rTilda_0
)
*
(
alpha_k
/
w_k
);
p_k
-=
w_k
*
Ap_k
;
p_k
*=
beta_k
;
p_k
+=
r_k
;
if
((
residu
=
std
::
sqrt
((
r_k
,
r_k
)))
/
resid0
<
epsilon
)
{
if
((
residu
=
std
::
sqrt
(
dot
(
r_k
,
r_k
)))
/
resid0
<
epsilon
)
{
break
;
}
Loading