#include <vector>
#include <limits>
#include <dccrg.hpp>
#include <dccrg_cartesian_geometry.hpp>
#include "../definitions.h"
#include "../common.h"
#include "../spatial_cells/spatial_cell_wrapper.hpp"
Go to the source code of this file.
|
| template<typename REAL, uint SIZE> |
| void | blockVelocityFirstMoments (vmesh::VelocityBlockContainer *blockContainer, REAL(&array)[SIZE], uint nBlocks) |
| template<typename REAL, uint SIZE> |
| void | blockVelocitySecondMoments (vmesh::VelocityBlockContainer *blockContainer, const REAL averageVX, const REAL averageVY, const REAL averageVZ, REAL(&array)[SIZE], uint nBlocks) |
| void | calculateMoments_R (dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid, const std::vector< CellID > &cells, const bool &computeSecond, const bool initialCompute=false) |
| void | calculateMoments_V (dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid, const std::vector< CellID > &cells, const bool &computeSecond, const bool initialCompute=false) |
◆ nMom1
◆ nMom2
◆ blockVelocityFirstMoments()
template<typename REAL, uint SIZE>
Calculate the zeroth and first velocity moments for the given velocity block and add results to 'array', which must have at least size four. After this function returns, the contents of 'array' are as follows: array[0]=n; array[1]=n*Vx; array[2]=nVy; array[3]=nVz; Here n is the scaled number density, i.e., number density times population mass / proton mass. This function is AMR safe.
- Parameters
-
Definition at line 83 of file arch_moments.h.
◆ blockVelocitySecondMoments()
template<typename REAL, uint SIZE>
| void blockVelocitySecondMoments |
( |
vmesh::VelocityBlockContainer * | blockContainer, |
|
|
const REAL | averageVX, |
|
|
const REAL | averageVY, |
|
|
const REAL | averageVZ, |
|
|
REAL(&) | array[SIZE], |
|
|
uint | nBlocks ) |
|
inline |
Calculate the second velocity moments for the velocity blocks, and add results to 'array', which must have at least size three. After this function returns, the contents of 'array' are as follows: array[0]=n(Vx-Vx0); array[1]=n(Vy-Vy0); array[2]=n(Vz-Vz0); Here Vx0,Vy0,Vz0 are the components of the bulk velocity (calculated over all species). This function is AMR safe.
- Parameters
-
| data | Distribution functions |
| blockParameters | Parameters for the velocity blocks |
| averageVX | Bulk velocity x |
| averageVY | Bulk velocity y |
| averageVZ | Bulk velocity z |
| array | Array where the calculated moments are added |
| nBlocks | The number of blocks |
Definition at line 123 of file arch_moments.h.
◆ calculateMoments_R()
| void calculateMoments_R |
( |
dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > & | mpiGrid, |
|
|
const std::vector< CellID > & | cells, |
|
|
const bool & | computeSecond, |
|
|
const bool | initialCompute ) |
Calculate zeroth, first, and (possibly) second bulk velocity moments for the given spatial cell. The calculated moments include contributions from all existing particle populations. The calculated moments are stored to SpatialCell::parameters in _R variables.
- Parameters
-
| mpiGrid | Parallel grid library. |
| cells | Vector containing the spatial cells to be calculated. |
| computeSecond | If true, second velocity moments are calculated. |
| initialCompute | If true, force re-calculation of outflow L1 sysboundary cell moments. (otherwise skipped as their VDF contents are not kept up to date) |
Definition at line 178 of file arch_moments.cpp.
◆ calculateMoments_V()
| void calculateMoments_V |
( |
dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > & | mpiGrid, |
|
|
const std::vector< CellID > & | cells, |
|
|
const bool & | computeSecond, |
|
|
const bool | initialCompute ) |
Calculate zeroth, first, and (possibly) second bulk velocity moments for the given spatial cell. Additionally, for each species, calculate the maximum spatial time step so that CFL(spatial)=1. The calculated moments include contributions from all existing particle populations. The calculated moments are stored to SpatialCell::parameters in _V variables.
- Parameters
-
| mpiGrid | Parallel grid library. |
| cells | Vector containing the spatial cells to be calculated. |
| computeSecond | If true, second velocity moments are calculated. |
| initialCompute | If true, force re-calculation of outflow L1 sysboundary cell moments. (otherwise skipped as their VDF contents are not kept up to date) |
Definition at line 342 of file arch_moments.cpp.