|
ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
|
#include <string>#include <vector>#include <random>#include <AMReX_ParmParse.H>#include <AMReX_Enum.H>#include <AMReX_REAL.H>#include <AMReX_RealBox.H>#include <AMReX_Geometry.H>#include <AMReX_Random.H>#include <AMReX_GpuContainers.H>#include <limits>#include <cmath>#include "ERF_NumericalConstants.H"#include "ERF_MaterialProperties.H"

Go to the source code of this file.
Classes | |
| struct | SDInputs |
| GPU-compatible structure holding distribution parameters. More... | |
| struct | SDDistributionParams |
| struct | SDSampledWeight |
| Sampled-multiplicity weight of a super-droplet over its independently sampled components: the weights of the varying components multiply, and the constant components set the weight only when no component varies. Callers leave out constant species, as before. More... | |
| struct | SDCellCounts |
| Numbers of super-droplets and of physical particles that an initialization, or one per-cell injection step, places in a cell of volume a_dv. More... | |
| class | SDInitProperties |
| Super-droplets initial properties. More... | |
| class | SDInjection |
| Super-droplets initialization structure. More... | |
| class | SDInitialization |
| Super-droplets initialization structure. More... | |
Namespaces | |
| SupDropInit | |
| List of super-droplet initializations. | |
Functions | |
| AMREX_ENUM (SDInitShape, uniform, bubble, null) | |
| Initial distribution shape for super-droplets. More... | |
| AMREX_ENUM (SDDistributionType, mass_constant, mass_exponential, radius_log_normal, radius_lognormal_autorange) | |
| Distribution type enum for GPU compatibility. More... | |
| AMREX_ENUM (SDMultiplicityType, constant, sampled) | |
| Multiplicity type for super-droplet initialization. More... | |
| AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real | SD_erfinv_gpu (const amrex::Real x) |
| Inverse error function approximation for GPU. More... | |
| AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real | SD_sample_mass_gpu (const SDDistributionParams ¶ms, const amrex::RandomEngine &engine, amrex::Real &mult_contribution) |
| Generate mass from distribution parameters on GPU. More... | |
| AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool | SD_sampled_scale (const amrex::Real a_sum, const amrex::Real a_num, amrex::Real &a_scale) noexcept |
| Factor that maps the sampled weights of a cell, adding up to a_sum, onto a_num particles. Injection weights are negative (an injection reads no number density), and the sign cancels. Returns false, for an even split, when the weights are so small that the factor would overflow, as when they all underflow to zero. More... | |
| AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real | SD_init_multiplicity (const SDCellCounts *a_counts, const int a_num, const amrex::Real a_dv) noexcept |
| Mean multiplicity that a set of initializations gives in a cell of volume a_dv. More... | |
Variables | |
| const int | SupDropInit::num_species_max = 10 |
| const int | SupDropInit::num_aerosols_max = 8 |
| AMREX_ENUM | ( | SDDistributionType | , |
| mass_constant | , | ||
| mass_exponential | , | ||
| radius_log_normal | , | ||
| radius_lognormal_autorange | |||
| ) |
Distribution type enum for GPU compatibility.
| AMREX_ENUM | ( | SDInitShape | , |
| uniform | , | ||
| bubble | , | ||
| null | |||
| ) |
Initial distribution shape for super-droplets.
| AMREX_ENUM | ( | SDMultiplicityType | , |
| constant | , | ||
| sampled | |||
| ) |
Multiplicity type for super-droplet initialization.
| AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real SD_erfinv_gpu | ( | const amrex::Real | x | ) |
Inverse error function approximation for GPU.
| [in] | x | Input value in (-1, 1) |
Referenced by SD_sample_mass_gpu().


|
noexcept |
Mean multiplicity that a set of initializations gives in a cell of volume a_dv.
| AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real SD_sample_mass_gpu | ( | const SDDistributionParams & | params, |
| const amrex::RandomEngine & | engine, | ||
| amrex::Real & | mult_contribution | ||
| ) |
Generate mass from distribution parameters on GPU.
| [in] | params | Distribution parameters |
| [in] | engine | Random engine |
| [out] | mult_contribution | Weight of the sampled value in the sampled-multiplicity mode |

|
noexcept |
Factor that maps the sampled weights of a cell, adding up to a_sum, onto a_num particles. Injection weights are negative (an injection reads no number density), and the sign cancels. Returns false, for an even split, when the weights are so small that the factor would overflow, as when they all underflow to zero.