Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
dg
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
Package Registry
Model registry
Operate
Environments
Terraform modules
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
gmsh
dg
Commits
e8fc58f3
Commit
e8fc58f3
authored
1 year ago
by
Matteo Cicuttin
Browse files
Options
Downloads
Patches
Plain Diff
trivial fixes in tests.
parent
6ac047bc
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/test_basics.cpp
+12
-8
12 additions, 8 deletions
tests/test_basics.cpp
tests/test_curl.cpp
+2
-2
2 additions, 2 deletions
tests/test_curl.cpp
with
14 additions
and
10 deletions
tests/test_basics.cpp
+
12
−
8
View file @
e8fc58f3
...
...
@@ -104,10 +104,12 @@ test_basics(int geometric_order, int approximation_order)
{
double
dj
=
js
[
i
].
determinant
();
double
dg
=
dets
[
i
];
auto
rel
err
=
dj
/
dg
-
1
;
auto
err
=
dj
-
dg
;
if
(
std
::
abs
(
relerr
)
<
3e-14
)
if
(
std
::
abs
(
err
)
>
3e-16
)
{
std
::
cout
<<
std
::
abs
(
err
)
<<
std
::
endl
;
throw
std
::
logic_error
(
"Something went wrong with determinants"
);
}
vol_e0_j
+=
dj
*
rqps
[
i
].
weight
();
}
...
...
@@ -125,10 +127,12 @@ test_basics(int geometric_order, int approximation_order)
{
double
dj
=
js
[
i
].
determinant
();
double
dg
=
dets
[
i
];
auto
rel
err
=
dj
/
dg
-
1
;
auto
err
=
dj
-
dg
;
if
(
std
::
abs
(
relerr
)
<
3e-14
)
if
(
std
::
abs
(
err
)
>
3e-16
)
{
std
::
cout
<<
std
::
abs
(
err
)
<<
std
::
endl
;
throw
std
::
logic_error
(
"Something went wrong with determinants"
);
}
vol_e1_j
+=
dj
*
rqps
[
i
].
weight
();
}
...
...
@@ -302,16 +306,16 @@ int main(void)
int
failed_tests
=
0
;
/*
std
::
cout
<<
Bmagentafg
<<
" *** TESTING: BASIC OPERATIONS ***"
<<
reset
<<
std
::
endl
;
for (size_t go = 1; go <
5
; go++)
for
(
size_t
go
=
1
;
go
<
3
;
go
++
)
{
for (size_t ao = go; ao <
5
; ao++)
for
(
size_t
ao
=
go
;
ao
<
3
;
ao
++
)
{
failed_tests
+=
test_basics
(
go
,
ao
);
}
}
*/
//std::cout << Bmagentafg << " *** TESTING: NORMAL COMPUTATION ***" << reset << std::endl;
//for (size_t i = 1; i < 5; i++)
// test_normals(i,i);
...
...
This diff is collapsed.
Click to expand it.
tests/test_curl.cpp
+
2
−
2
View file @
e8fc58f3
...
...
@@ -243,8 +243,8 @@ int main(void)
int
failed_tests
=
0
;
std
::
cout
<<
Bmagentafg
<<
" *** TESTING: CURL ***"
<<
reset
<<
std
::
endl
;
for
(
size_t
go
=
1
;
go
<
2
;
go
++
)
for
(
size_t
ao
=
go
;
ao
<
6
;
ao
++
)
for
(
size_t
go
=
1
;
go
<
3
;
go
++
)
for
(
size_t
ao
=
go
;
ao
<
3
;
ao
++
)
failed_tests
+=
test_curl_convergence
(
go
,
ao
);
return
failed_tests
;
...
...
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