Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-codegen
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
Container Registry
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Christian Heinigk
dune-codegen
Commits
fb321d96
Commit
fb321d96
authored
6 years ago
by
René Heß
Browse files
Options
Downloads
Patches
Plain Diff
[skip ci] Fourth solution and asbolute fuzzy factor
parent
83255ed2
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
test/sumfact/poisson/facedir-facemod-variation/sumfact_poisson_dg_3d_facedir_facemod_variation_driver.cc
+10
-2
10 additions, 2 deletions
...sumfact_poisson_dg_3d_facedir_facemod_variation_driver.cc
with
10 additions
and
2 deletions
test/sumfact/poisson/facedir-facemod-variation/sumfact_poisson_dg_3d_facedir_facemod_variation_driver.cc
+
10
−
2
View file @
fb321d96
...
@@ -100,7 +100,7 @@ bool isclose(T a, T b, double rel_tol=1e-9, double abs_tol=0.0){
...
@@ -100,7 +100,7 @@ bool isclose(T a, T b, double rel_tol=1e-9, double abs_tol=0.0){
}
}
template
<
typename
T
>
template
<
typename
T
>
bool
fuzzy_is_permutation
(
T
a
,
T
b
,
double
rel_tol
=
1e-9
,
double
abs_tol
=
0.0
){
bool
fuzzy_is_permutation
(
T
a
,
T
b
,
double
rel_tol
=
1e-9
,
double
abs_tol
=
1e-14
){
assert
(
a
.
size
()
==
b
.
size
());
assert
(
a
.
size
()
==
b
.
size
());
std
::
sort
(
a
.
begin
(),
a
.
end
());
std
::
sort
(
a
.
begin
(),
a
.
end
());
std
::
sort
(
b
.
begin
(),
b
.
end
());
std
::
sort
(
b
.
begin
(),
b
.
end
());
...
@@ -255,6 +255,8 @@ int main(int argc, char** argv){
...
@@ -255,6 +255,8 @@ int main(int argc, char** argv){
std
::
vector
<
RangeType
>
solution_3
{
-
0.21436796383145873
,
-
0.23383260730195662
,
-
0.28383755411465533
,
-
0.29526590985481704
,
-
0.0045507639649666034
,
-
0.0034803883238202818
,
-
0.0036071199470257055
,
-
0.0024060631441813391
,
0.22702984288940109
,
0.0045507639649666042
,
0.27429663847448937
,
0.0036071199470257059
,
0.23989650875067281
,
0.0034803883238202818
,
0.28608104498832443
,
0.0024060631441813391
};
std
::
vector
<
RangeType
>
solution_3
{
-
0.21436796383145873
,
-
0.23383260730195662
,
-
0.28383755411465533
,
-
0.29526590985481704
,
-
0.0045507639649666034
,
-
0.0034803883238202818
,
-
0.0036071199470257055
,
-
0.0024060631441813391
,
0.22702984288940109
,
0.0045507639649666042
,
0.27429663847448937
,
0.0036071199470257059
,
0.23989650875067281
,
0.0034803883238202818
,
0.28608104498832443
,
0.0024060631441813391
};
std
::
vector
<
RangeType
>
solution_4
{
2.3589302088734218e-17
,
6.3207344446901369e-18
,
6.32073444469013e-18
,
1.693635690026303e-18
,
-
0.24497506595070379
,
-
0.29846897291910235
,
-
0.25528824297544883
,
-
0.30346218805770897
,
0.24497506595070367
,
-
3.8844456896567597e-17
,
0.2984689729191024
,
-
1.0408340855860846e-17
,
0.25528824297544883
,
-
1.0408340855860843e-17
,
0.30346218805770903
,
-
2.7889065268757736e-18
};
std
::
cout
.
precision
(
17
);
std
::
cout
.
precision
(
17
);
std
::
vector
<
RangeType
>
residual
(
16
);
std
::
vector
<
RangeType
>
residual
(
16
);
for
(
std
::
size_t
i
=
0
;
i
<
16
;
++
i
){
for
(
std
::
size_t
i
=
0
;
i
<
16
;
++
i
){
...
@@ -272,7 +274,13 @@ int main(int argc, char** argv){
...
@@ -272,7 +274,13 @@ int main(int argc, char** argv){
<<
fuzzy_is_permutation
(
solution_2
,
residual
)
<<
std
::
endl
;
<<
fuzzy_is_permutation
(
solution_2
,
residual
)
<<
std
::
endl
;
std
::
cout
<<
"palpo is_permuation to solution_3: "
std
::
cout
<<
"palpo is_permuation to solution_3: "
<<
fuzzy_is_permutation
(
solution_3
,
residual
)
<<
std
::
endl
;
<<
fuzzy_is_permutation
(
solution_3
,
residual
)
<<
std
::
endl
;
if
(
!
fuzzy_is_permutation
(
solution_1
,
residual
)
and
!
fuzzy_is_permutation
(
solution_2
,
residual
)
and
!
fuzzy_is_permutation
(
solution_3
,
residual
))
std
::
cout
<<
"palpo is_permuation to solution_4: "
<<
fuzzy_is_permutation
(
solution_4
,
residual
)
<<
std
::
endl
;
if
(
!
fuzzy_is_permutation
(
solution_1
,
residual
)
and
!
fuzzy_is_permutation
(
solution_2
,
residual
)
and
!
fuzzy_is_permutation
(
solution_3
,
residual
)
and
!
fuzzy_is_permutation
(
solution_4
,
residual
)
)
return
1
;
return
1
;
}
}
if
(
initree
.
get
<
bool
>
(
"printmatrix"
,
false
))
{
if
(
initree
.
get
<
bool
>
(
"printmatrix"
,
false
))
{
...
...
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