Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TurTLE
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TurTLE
TurTLE
Commits
166ea083
Commit
166ea083
authored
Jan 14, 2020
by
Cristian Lalescu
Browse files
Options
Downloads
Plain Diff
Merge branch 'feature/more-interpolations' into develop
parents
03c08dac
8ba63441
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Pipeline
#66965
passed
Jan 14, 2020
Stage: build
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
cpp/particles/particles_generic_interp.hpp
+65
-1
65 additions, 1 deletion
cpp/particles/particles_generic_interp.hpp
cpp/particles/particles_system_builder.hpp
+2
-2
2 additions, 2 deletions
cpp/particles/particles_system_builder.hpp
with
67 additions
and
3 deletions
cpp/particles/particles_generic_interp.hpp
+
65
−
1
View file @
166ea083
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
#ifndef PARTICLES_GENERIC_INTERP_HPP
#ifndef PARTICLES_GENERIC_INTERP_HPP
#define PARTICLES_GENERIC_INTERP_HPP
#define PARTICLES_GENERIC_INTERP_HPP
template
<
class
real_number
,
int
interp_neighbours
,
int
mo
de
>
template
<
class
real_number
,
int
interp_neighbours
,
int
s
mo
othness
>
class
particles_generic_interp
;
class
particles_generic_interp
;
#include
"Lagrange_polys.hpp"
#include
"Lagrange_polys.hpp"
...
@@ -350,6 +350,28 @@ public:
...
@@ -350,6 +350,28 @@ public:
/*****************************************************************************/
/*****************************************************************************/
/* spline C3 */
/* spline C3 */
template
<
>
class
particles_generic_interp
<
double
,
1
,
3
>
{
// no such thing as C3 interpolant with just a 4-point kernel, so we just use C2
// this specialisation must exist, otherwise the template_double_for_if will fail
public:
using
real_number
=
double
;
void
compute_beta
(
const
int
in_derivative
,
const
double
in_part_val
,
double
poly_val
[])
const
{
beta_n1_m2
(
in_derivative
,
in_part_val
,
poly_val
);
}
};
template
<
>
class
particles_generic_interp
<
double
,
2
,
3
>
{
public:
using
real_number
=
double
;
void
compute_beta
(
const
int
in_derivative
,
const
double
in_part_val
,
double
poly_val
[])
const
{
beta_n2_m3
(
in_derivative
,
in_part_val
,
poly_val
);
}
};
template
<
>
template
<
>
class
particles_generic_interp
<
double
,
3
,
3
>
{
class
particles_generic_interp
<
double
,
3
,
3
>
{
public:
public:
...
@@ -435,6 +457,48 @@ public:
...
@@ -435,6 +457,48 @@ public:
/*****************************************************************************/
/*****************************************************************************/
/* spline C4 */
/* spline C4 */
template
<
>
class
particles_generic_interp
<
double
,
1
,
4
>
{
// no such thing as C4 interpolant with just a 4-point kernel, so we just use C2
// this specialisation must exist, otherwise the template_double_for_if will fail
public:
using
real_number
=
double
;
void
compute_beta
(
const
int
in_derivative
,
const
double
in_part_val
,
double
poly_val
[])
const
{
beta_n1_m2
(
in_derivative
,
in_part_val
,
poly_val
);
}
};
template
<
>
class
particles_generic_interp
<
double
,
2
,
4
>
{
public:
using
real_number
=
double
;
void
compute_beta
(
const
int
in_derivative
,
const
double
in_part_val
,
double
poly_val
[])
const
{
beta_n2_m4
(
in_derivative
,
in_part_val
,
poly_val
);
}
};
template
<
>
class
particles_generic_interp
<
double
,
3
,
4
>
{
public:
using
real_number
=
double
;
void
compute_beta
(
const
int
in_derivative
,
const
double
in_part_val
,
double
poly_val
[])
const
{
beta_n3_m4
(
in_derivative
,
in_part_val
,
poly_val
);
}
};
template
<
>
class
particles_generic_interp
<
double
,
4
,
4
>
{
public:
using
real_number
=
double
;
void
compute_beta
(
const
int
in_derivative
,
const
double
in_part_val
,
double
poly_val
[])
const
{
beta_n4_m4
(
in_derivative
,
in_part_val
,
poly_val
);
}
};
template
<
>
template
<
>
class
particles_generic_interp
<
double
,
5
,
4
>
{
class
particles_generic_interp
<
double
,
5
,
4
>
{
public:
public:
...
...
...
...
This diff is collapsed.
Click to expand it.
cpp/particles/particles_system_builder.hpp
+
2
−
2
View file @
166ea083
...
@@ -291,7 +291,7 @@ inline std::unique_ptr<abstract_particles_system<partsize_t, particles_rnumber>>
...
@@ -291,7 +291,7 @@ inline std::unique_ptr<abstract_particles_system<partsize_t, particles_rnumber>>
const
int
in_current_iteration
){
const
int
in_current_iteration
){
return
Template_double_for_if
::
evaluate
<
std
::
unique_ptr
<
abstract_particles_system
<
partsize_t
,
particles_rnumber
>>
,
return
Template_double_for_if
::
evaluate
<
std
::
unique_ptr
<
abstract_particles_system
<
partsize_t
,
particles_rnumber
>>
,
int
,
1
,
11
,
1
,
// interpolation_size
int
,
1
,
11
,
1
,
// interpolation_size
int
,
0
,
3
,
1
,
// spline_mode
int
,
0
,
5
,
1
,
// spline_mode
particles_system_build_container
<
partsize_t
,
field_rnumber
,
be
,
fc
,
particles_rnumber
,
particles_system_build_container
<
partsize_t
,
field_rnumber
,
be
,
fc
,
particles_rnumber
,
p2p_computer_empty
<
particles_rnumber
,
partsize_t
>
,
p2p_computer_empty
<
particles_rnumber
,
partsize_t
>
,
particles_inner_computer_empty
<
particles_rnumber
,
partsize_t
>
,
particles_inner_computer_empty
<
particles_rnumber
,
partsize_t
>
,
...
@@ -321,7 +321,7 @@ inline std::unique_ptr<abstract_particles_system_with_p2p<partsize_t, particles_
...
@@ -321,7 +321,7 @@ inline std::unique_ptr<abstract_particles_system_with_p2p<partsize_t, particles_
const
particles_rnumber
cutoff
){
const
particles_rnumber
cutoff
){
return
Template_double_for_if
::
evaluate
<
std
::
unique_ptr
<
abstract_particles_system_with_p2p
<
partsize_t
,
particles_rnumber
,
p2p_computer_class
>>
,
return
Template_double_for_if
::
evaluate
<
std
::
unique_ptr
<
abstract_particles_system_with_p2p
<
partsize_t
,
particles_rnumber
,
p2p_computer_class
>>
,
int
,
1
,
11
,
1
,
// interpolation_size
int
,
1
,
11
,
1
,
// interpolation_size
int
,
0
,
3
,
1
,
// spline_mode
int
,
0
,
5
,
1
,
// spline_mode
particles_system_build_container
<
partsize_t
,
field_rnumber
,
be
,
fc
,
particles_rnumber
,
particles_system_build_container
<
partsize_t
,
field_rnumber
,
be
,
fc
,
particles_rnumber
,
p2p_computer_class
,
p2p_computer_class
,
particles_inner_computer_class
,
particles_inner_computer_class
,
...
...
...
...
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
sign in
to comment