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
Commits
7fb6450c
Commit
7fb6450c
authored
Jul 25, 2024
by
Stéphane Del Pino
Browse files
Options
Downloads
Patches
Plain Diff
Add a bunch of tests for quadratic PolynomialReconstruction
parent
3c849f51
No related branches found
No related tags found
1 merge request
!205
High-order polynomial reconstruction
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/scheme/test_reconstruction.cpp
+30
-4
30 additions, 4 deletions
src/scheme/test_reconstruction.cpp
tests/test_QuadraticPolynomialReconstruction.cpp
+350
-504
350 additions, 504 deletions
tests/test_QuadraticPolynomialReconstruction.cpp
with
380 additions
and
508 deletions
src/scheme/test_reconstruction.cpp
+
30
−
4
View file @
7fb6450c
...
@@ -7,10 +7,36 @@ void
...
@@ -7,10 +7,36 @@ void
test_reconstruction
(
const
std
::
vector
<
std
::
shared_ptr
<
const
DiscreteFunctionVariant
>>&
discrete_function_variant_list
,
test_reconstruction
(
const
std
::
vector
<
std
::
shared_ptr
<
const
DiscreteFunctionVariant
>>&
discrete_function_variant_list
,
uint64_t
degree
)
uint64_t
degree
)
{
{
PolynomialReconstructionDescriptor
descriptor
{
PolynomialReconstructionDescriptor
::
IntegrationMethod
::
element
,
degree
};
std
::
vector
descriptor_list
=
{
{
PolynomialReconstructionDescriptor
{
PolynomialReconstructionDescriptor
::
IntegrationMethod
::
cell_center
,
degree
},
const
size_t
nb_loops
=
1
;
PolynomialReconstructionDescriptor
{
PolynomialReconstructionDescriptor
::
IntegrationMethod
::
element
,
degree
},
std
::
cout
<<
"** variable list at once ("
<<
nb_loops
<<
" times)
\n
"
;
PolynomialReconstructionDescriptor
{
PolynomialReconstructionDescriptor
::
IntegrationMethod
::
boundary
,
degree
}};
[[
maybe_unused
]]
auto
x
=
PolynomialReconstruction
{
PolynomialReconstructionDescriptor
{
PolynomialReconstructionDescriptor
::
IntegrationMethod
::
cell_center
,
degree
}}
.
build
(
discrete_function_variant_list
);
for
(
auto
&&
descriptor
:
descriptor_list
)
{
std
::
string
method_name
;
switch
(
descriptor
.
integrationMethod
())
{
case
PolynomialReconstructionDescriptor
::
IntegrationMethod
::
element
:
{
method_name
=
"element"
;
break
;
}
case
PolynomialReconstructionDescriptor
::
IntegrationMethod
::
boundary
:
{
method_name
=
"boundary"
;
break
;
}
case
PolynomialReconstructionDescriptor
::
IntegrationMethod
::
cell_center
:
{
method_name
=
"cell_center"
;
break
;
}
}
const
size_t
nb_loops
=
50
;
std
::
cout
<<
"** variable list at once ("
<<
nb_loops
<<
" times) using "
<<
rang
::
fgB
::
yellow
<<
method_name
<<
rang
::
fg
::
reset
<<
"
\n
"
;
PolynomialReconstruction
reconstruction
{
descriptor
};
PolynomialReconstruction
reconstruction
{
descriptor
};
Timer
t
;
Timer
t
;
...
...
This diff is collapsed.
Click to expand it.
tests/test_QuadraticPolynomialReconstruction.cpp
+
350
−
504
View file @
7fb6450c
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