Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
ScalFMM
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
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
solverstack
ScalFMM
Commits
bb3675f7
Commit
bb3675f7
authored
11 years ago
by
Olivier COULAUD
Browse files
Options
Downloads
Patches
Plain Diff
Add getRelativeInfNorm and getRelativeL2Norm in accumulator.
parent
0274a156
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
Src/Utils/FMath.hpp
+11
-3
11 additions, 3 deletions
Src/Utils/FMath.hpp
with
11 additions
and
3 deletions
Src/Utils/FMath.hpp
+
11
−
3
View file @
bb3675f7
...
...
@@ -209,11 +209,11 @@ struct FMath{
FReal
max
;
FReal
maxDiff
;
public:
FAccurater
()
:
l2Dot
(
0
),
l2Diff
(
0
),
max
(
0
),
maxDiff
(
0
)
{
FAccurater
()
:
l2Dot
(
0
.0
),
l2Diff
(
0
.0
),
max
(
0
.0
),
maxDiff
(
0
.0
)
{
}
/** with inital values */
FAccurater
(
const
FReal
inGood
[],
const
FReal
inBad
[],
const
int
nbValues
)
:
l2Dot
(
0
),
l2Diff
(
0
),
max
(
0
),
maxDiff
(
0
)
{
:
l2Dot
(
0
.0
),
l2Diff
(
0
.0
),
max
(
0
.0
),
maxDiff
(
0
.0
)
{
add
(
inGood
,
inBad
,
nbValues
);
}
/** Add value to the current list */
...
...
@@ -232,10 +232,18 @@ struct FMath{
}
/** Get the L2 norm */
FReal
getL2Norm
()
const
{
return
Sqrt
(
l2Diff
/
l2Dot
);
return
Sqrt
(
l2Diff
);
}
/** Get the inf norm */
FReal
getInfNorm
()
const
{
return
maxDiff
;
}
/** Get the L2 norm */
FReal
getRelativeL2Norm
()
const
{
return
Sqrt
(
l2Diff
/
l2Dot
);
}
/** Get the inf norm */
FReal
getRelativeInfNorm
()
const
{
return
maxDiff
/
max
;
}
/** Print */
...
...
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