forked from igfuw/libcloudphxx
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'kernel_efficiencies_fix' of https://github.com/pdziekan…
…/libcloudphxx into kernel_efficiencies_fix
- Loading branch information
Showing
15 changed files
with
139 additions
and
8,289 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
110 changes: 110 additions & 0 deletions
110
src/detail/kernel_definitions/hall_efficiencies_like_in_EFM.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
#pragma once | ||
namespace libcloudphxx | ||
{ | ||
namespace lgrngn | ||
{ | ||
namespace detail | ||
{ | ||
template<class real_t> | ||
real_t hall_r_max() | ||
{ | ||
return 300.e-6; // not used? | ||
} | ||
|
||
const int hall_n_rad = 15; | ||
const int hall_n_rat = 21; | ||
|
||
template<class real_t> | ||
void hall_efficiencies(std::vector<real_t> &vec) | ||
{ | ||
//NVCC doesn't support extended initializer list. First make an array, then copy it to a vector. | ||
const real_t arr[hall_n_rat][hall_n_rad] = | ||
{ | ||
{0, 0, 0, 0, 0, | ||
0, 0, 0, 0, 0, | ||
0, 0, 0, 0, 0}, | ||
{0, 0, 0.0001, 0.0001, 0.0001, | ||
0, 0.000733, 0.001, 0.084, 0.05, | ||
0.2543, 0.5, 0.7807, 0.87, 0.97}, | ||
{0, 0, 0.0001, 0.001733, 0.0001, | ||
0.00563, 0.002, 0.07, 0.4, 0.43, | ||
0.58, 0.79, 0.93, 0.96, 1}, | ||
{0, 0, 0.014, 0.001733, 0.005, | ||
0.0156, 0.02667, 0.28, 0.62, 0.64, | ||
0.7629, 0.91, 0.9687, 0.98, 1}, | ||
{0, 0, 0.014, 0.015, 0.016, | ||
0.028, 0.04, 0.5, 0.7, 0.77, | ||
0.84, 0.95, 0.95, 1, 1}, | ||
{0, 0, 0.019, 0.02117, 0.022, | ||
0.0484, 0.1133, 0.62, 0.79, 0.84, | ||
0.8829, 0.95, 1, 1, 1}, | ||
{0, 0, 0.019, 0.02983, 0.03, | ||
0.1226, 0.17, 0.68, 0.83, 0.87, | ||
0.9, 1, 1, 1, 1}, | ||
{0, 0, 0.027, 0.02983, 0.043, | ||
0.1704, 0.3133, 0.74, 0.864, 0.89, | ||
0.9229, 1, 1, 1, 1}, | ||
{0, 0, 0.027, 0.0395, 0.052, | ||
0.226, 0.4, 0.78, 0.88, 0.9, | ||
0.94, 1, 1, 1, 1}, | ||
{0, 0, 0.033, 0.04883, 0.064, | ||
0.2708, 0.5167, 0.8, 0.9, 0.91, | ||
0.95, 1, 1, 1, 1}, | ||
{0, 0, 0.033, 0.0555, 0.072, | ||
0.3184, 0.55, 0.8, 0.9, 0.91, | ||
0.95, 1, 1, 1, 1}, | ||
{0, 0, 0.037, 0.0555, 0.079, | ||
0.3308, 0.5833, 0.8, 0.9, 0.91, | ||
0.95, 1, 1, 1, 1}, | ||
{0, 0, 0.037, 0.0595, 0.082, | ||
0.336, 0.59, 0.78, 0.9, 0.91, | ||
0.95, 1, 1, 1, 1}, | ||
{0, 0, 0.038, 0.05833, 0.08, | ||
0.3312, 0.5667, 0.77, 0.888, 0.91, | ||
0.95, 1, 1, 1, 1}, | ||
{0, 0, 0.038, 0.05367, 0.076, | ||
0.3002, 0.54, 0.76, 0.88, 0.92, | ||
0.95, 1, 1, 1, 1}, | ||
{0, 0, 0.036, 0.05367, 0.067, | ||
0.2855, 0.5033, 0.77, 0.882, 0.93, | ||
0.9743, 1, 1, 1, 1}, | ||
{0, 0, 0.036, 0.0465, 0.057, | ||
0.2735, 0.49, 0.77, 0.89, 0.95, | ||
1, 1, 1, 1, 1}, | ||
{0, 0, 0.032, 0.03967, 0.048, | ||
0.2619, 0.4633, 0.78, 0.938, 1, | ||
1.023, 1, 1, 1, 1}, | ||
{0, 0, 0.032, 0.03267, 0.04, | ||
0.2476, 0.45, 0.79, 1.01, 1.03, | ||
1.04, 1, 1, 1, 1}, | ||
{0, 0, 0.027, 0.03267, 0.033, | ||
0.2559, 0.4867, 0.95, 1.5, 1.7, | ||
2.543, 1, 1, 1, 1}, | ||
{0, 0, 0.027, 0.027, 0.027, | ||
0.2735, 0.52, 1.4, 2.3, 3, | ||
4, 1, 1, 1, 1} | ||
}; | ||
|
||
vec = std::vector<real_t>(&(arr[0][0]), &(arr[hall_n_rat][hall_n_rad])); | ||
} | ||
|
||
template<class real_t> | ||
void hall_radii(std::vector<real_t> &vec) | ||
{ | ||
//NVCC doesn't support extended initializer list. First make an array, then copy it to a vector. | ||
const real_t arr[hall_n_rad] = {6.e-6,8.e-6,10.e-6,15.e-6,20.e-6,25.e-6,30.e-6,40.e-6,50.e-6,60.e-6,70.e-6,100.e-6,150.e-6,200.e-6,300.e-6}; | ||
|
||
vec = std::vector<real_t>(arr, arr + hall_n_rad ); | ||
} | ||
|
||
template<class real_t> | ||
void hall_ratios(std::vector<real_t> &vec) | ||
{ | ||
//NVCC doesn't support extended initializer list. First make an array, then copy it to a vector. | ||
const real_t arr[hall_n_rat] = {0.,0.05,0.1,0.15,0.2,0.25,0.3,0.35,0.4,0.45,0.5, 0.55,0.6,0.65,0.7,0.75,0.8,0.85,0.9,0.95,1.0}; | ||
|
||
vec = std::vector<real_t>(arr, arr + hall_n_rat ); | ||
} | ||
} | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.