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
76ebe81a
Commit
76ebe81a
authored
5 months ago
by
Olivier COULAUD
Browse files
Options
Downloads
Patches
Plain Diff
Added kernel 2 et 3
parent
c89eae53
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
checks/check_1d.cpp
+40
-70
40 additions, 70 deletions
checks/check_1d.cpp
with
40 additions
and
70 deletions
checks/check_1d.cpp
+
40
−
70
View file @
76ebe81a
...
@@ -244,6 +244,9 @@ auto run(const int& tree_height, const int& group_size, const std::size_t order,
...
@@ -244,6 +244,9 @@ auto run(const int& tree_height, const int& group_size, const std::size_t order,
auto
total_height
=
tree_height
;
auto
total_height
=
tree_height
;
interpolator_type
interpolator
(
mk_far
,
order
,
total_height
,
box_width
);
interpolator_type
interpolator
(
mk_far
,
order
,
total_height
,
box_width
);
// auto memory = interpolator.memory_usage();
// std::cout << "memory " << memory << std::endl;
typename
FMM_OPERATOR_TYPE
::
far_field_type
far_field
(
interpolator
);
typename
FMM_OPERATOR_TYPE
::
far_field_type
far_field
(
interpolator
);
//
//
near_matrix_kernel_type
mk_near
{};
near_matrix_kernel_type
mk_near
{};
...
@@ -325,58 +328,45 @@ auto run_general(const int& tree_height, const int& group_size, const std::size_
...
@@ -325,58 +328,45 @@ auto run_general(const int& tree_height, const int& group_size, const std::size_
return
run
<
Dimension
,
value_type
,
fmm_operators_type
>
(
tree_height
,
group_size
,
order
,
input_file
,
output_file
,
return
run
<
Dimension
,
value_type
,
fmm_operators_type
>
(
tree_height
,
group_size
,
order
,
input_file
,
output_file
,
check
,
displayCells
,
displayParticles
);
check
,
displayCells
,
displayParticles
);
}
}
else
if
(
kernel
==
2
)
{
// shift_ln_r
// using far_matrix_kernel_type = scalfmm::matrix_kernels::laplace::ln_2d;
// using near_matrix_kernel_type = scalfmm::matrix_kernels::laplace::grad_ln_2d;
// using near_field_type = scalfmm::operators::near_field_operator<near_matrix_kernel_type>;
// //
// using interpolation_type = interpolator_alias<double, Dimension, far_matrix_kernel_type>;
// // using interpolation_type =
// // scalfmm::interpolation::uniform_interpolator<value_type, Dimension, far_matrix_kernel_type>;
// using far_field_type = scalfmm::operators::far_field_operator<interpolation_type, true>;
// using fmm_operators_type = scalfmm::operators::fmm_operators<near_field_type, far_field_type>;
// return run<Dimension, value_type, fmm_operators_type>(tree_height, group_size, order, input_file, output_file,
// check, displayCells, displayParticles);
}
else
if
(
kernel
==
3
)
{
// val_grad_one_over_r
using
far_matrix_kernel_type
=
scalfmm
::
matrix_kernels
::
laplace
::
val_grad_one_over_r
<
2
>
;
using
near_matrix_kernel_type
=
scalfmm
::
matrix_kernels
::
laplace
::
val_grad_one_over_r
<
2
>
;
using
near_field_type
=
scalfmm
::
operators
::
near_field_operator
<
near_matrix_kernel_type
>
;
//
using
interpolation_type
=
interpolator_alias
<
double
,
Dimension
,
far_matrix_kernel_type
>
;
// using interpolation_type =
// scalfmm::interpolation::uniform_interpolator<value_type, Dimension, far_matrix_kernel_type>;
using
far_field_type
=
scalfmm
::
operators
::
far_field_operator
<
interpolation_type
,
false
>
;
using
fmm_operators_type
=
scalfmm
::
operators
::
fmm_operators
<
near_field_type
,
far_field_type
>
;
return
run
<
Dimension
,
value_type
,
fmm_operators_type
>
(
tree_height
,
group_size
,
order
,
input_file
,
output_file
,
check
,
displayCells
,
displayParticles
);
}
else
else
{
{
return
0
;
std
::
cout
<<
" kernel < 4"
<<
std
::
endl
;
std
::
exit
(
EXIT_FAILURE
);
}
}
// else if (kernel == 2)
// { // shift_ln_r
// using far_matrix_kernel_type =
// scalfmm::matrix_kernels::laplace::ln_2d;
// using near_matrix_kernel_type =
// scalfmm::matrix_kernels::laplace::grad_ln_2d;
// using near_field_type = scalfmm::operators::near_field_operator<
// near_matrix_kernel_type>;
// //
// using interpolation_type =
// scalfmm::interpolation::uniform_interpolator<
// value_type, Dimension, far_matrix_kernel_type>;
// using far_field_type =
// scalfmm::operators::far_field_operator<interpolation_type,
// true>;
// using fmm_operators_type =
// scalfmm::operators::fmm_operators<near_field_type,
// far_field_type>;
// return run<Dimension, value_type, fmm_operators_type>(
// tree_height, group_size, order, input_file, output_file, check,
// displayCells, displayParticles);
// }
// else if (kernel == 3)
// { // val_grad_one_over_r
// using far_matrix_kernel_type =
// scalfmm::matrix_kernels::laplace::val_grad_one_over_r<2>;
// using near_matrix_kernel_type =
// scalfmm::matrix_kernels::laplace::val_grad_one_over_r<2>;
// using near_field_type = scalfmm::operators::near_field_operator<
// near_matrix_kernel_type>;
// //
// using interpolation_type =
// scalfmm::interpolation::uniform_interpolator<
// value_type, Dimension, far_matrix_kernel_type>;
// using far_field_type =
// scalfmm::operators::far_field_operator<interpolation_type,
// false>;
// using fmm_operators_type =
// scalfmm::operators::fmm_operators<near_field_type,
// far_field_type>;
// return run<Dimension, value_type, fmm_operators_type>(
// tree_height, group_size, order, input_file, output_file, check,
// displayCells, displayParticles);
return
0
;
}
}
// scalfmm::matrix_kernels::laplace::one_over_r;
// scalfmm::matrix_kernels::laplace::one_over_r;
...
@@ -426,24 +416,4 @@ auto main([[maybe_unused]] int argc, [[maybe_unused]] char* argv[]) -> int
...
@@ -426,24 +416,4 @@ auto main([[maybe_unused]] int argc, [[maybe_unused]] char* argv[]) -> int
auto
ret
=
run_general
<
dimension
,
value_type
>
(
tree_height
,
group_size
,
order
,
kernel
,
input_file
,
output_file
,
auto
ret
=
run_general
<
dimension
,
value_type
>
(
tree_height
,
group_size
,
order
,
kernel
,
input_file
,
output_file
,
check
,
displayCells
,
displayParticles
);
check
,
displayCells
,
displayParticles
);
return
ret
;
return
ret
;
}
}
\ No newline at end of file
/*
faux 3d
0 p_tree [0.254212, 0.574017, 0] p_ref [0.254212, 0.574017, 0]
(8108.38 18.5173) 0 p_tree [0.926114, 0.470606, 0] p_ref [0.926114, 0.470606,
0](6937.27 7.06436 ) 0 p_tree [0.725386, 0.777877, 0] p_ref [0.725386,
0.777877,0] (4583.97 15.7301 ) 0 p_tree [0.411987, 0.622132, 0] p_ref
[0.411987,0.622132, 0] (9935.72 16.7617 )
2d
0 p_tree [0.307883, 0.668131] p_ref [0.307883, 0.668131] (5414.29 13.8412 )
0 p_tree [0.173692, 0.734691] p_ref [0.173692, 0.734691] (4656.34 20.3212 )
0 p_tree [0.254212, 0.574017] p_ref [0.254212, 0.574017] (8108.38 18.5173 )
0 p_tree [0.926114, 0.470606] p_ref [0.926114, 0.470606] (6937.27 7.06436 )
0 p_tree [0.725386, 0.777877] p_ref [0.725386, 0.777877] (4583.97 15.7301 )
0 p_tree [0.411987, 0.622132] p_ref [0.411987, 0.622132] (9935.72 16.7617 )
*/
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