|
Vlasiator ebf0dd394 on dev (v5.4.0 + 1054 commits)
|
#include <algorithm>#include <cmath>#include <utility>#include <Eigen/Geometry>#include "../common.h"#include "cpu_acc_intersections.hpp"#include "cpu_acc_transform.hpp"
Go to the source code of this file.
Functions | |
| void | compute_cell_intersections (spatial_cell::SpatialCell *spatial_cell, const uint popID, const uint map_order, const Real &dt, int intersections_id) |
| Eigen::Matrix< Real, 3, 1 > | line_plane_intersection (const Eigen::Matrix< Real, 3, 1 > &l_point, const Eigen::Matrix< Real, 3, 1 > &l_direction, const Eigen::Matrix< Real, 3, 1 > &p_point, const Eigen::Matrix< Real, 3, 1 > &p_normal) |
| void | compute_intersections_1st (const vmesh::VelocityMesh *vmesh, const Transform< Real, 3, Affine > &bwd_transform, const Transform< Real, 3, Affine > &fwd_transform, const uint dimension, Real &intersection, Real &intersection_di, Real &intersection_dj, Real &intersection_dk) |
| void | compute_intersections_2nd (const vmesh::VelocityMesh *vmesh, const Transform< Real, 3, Affine > &bwd_transform, const Transform< Real, 3, Affine > &fwd_transform, const uint dimension, Real &intersection, Real &intersection_di, Real &intersection_dj, Real &intersection_dk) |
| void | compute_intersections_3rd (const vmesh::VelocityMesh *vmesh, const Transform< Real, 3, Affine > &bwd_transform, const Transform< Real, 3, Affine > &fwd_transform, const uint dimension, Real &intersection, Real &intersection_di, Real &intersection_dj, Real &intersection_dk) |
| void compute_cell_intersections | ( | spatial_cell::SpatialCell * | spatial_cell, |
| const uint | popID, | ||
| const uint | map_order, | ||
| const Real & | dt, | ||
| int | intersections_id ) |
Wrapper for computing all rotation intersections for a single cycle of acceleration for a given spatial cell
| spatial_cell | Spatial cell to compute |
| popID | Active population |
| map_order | order in which to perform Cartesian shears, randomized from time step |
| dt | Length of current time step or substep |
| intersections_id | Phiprof identifier for timer inside parallel region |
Definition at line 44 of file cpu_acc_intersections.cpp.


| void compute_intersections_1st | ( | const vmesh::VelocityMesh * | vmesh, |
| const Transform< Real, 3, Affine > & | bwd_transform, | ||
| const Transform< Real, 3, Affine > & | fwd_transform, | ||
| const uint | dimension, | ||
| Real & | intersection, | ||
| Real & | intersection_di, | ||
| Real & | intersection_dj, | ||
| Real & | intersection_dk ) |
Computes the first intersection data; this is z~ in section 2.4 in Zerroukat et al (2012). We assume all velocity cells have the same dimensions. Intersection z coordinate for (i,j,k) is: intersection + i * intersection_di + j * intersection_dj + k * intersection_dk
| spatial_cell | spatial cell that is accelerated |
| fwd_transform | Transform that describes acceleration forward in time |
| bwd_transform | Transform that describes acceleration backward in time, used to compute the lagrangian departure gri |
| dimension | Along which dimension is this intersection/mapping computation done. It is assumed the three mappings are in order 012, 120 or 201 |
| intersection | Intersection z coordinate at i,j,k=0 |
| intersection_di | Change in z-coordinate for a change in i index of 1 |
| intersection_dj | Change in z-coordinate for a change in j index of 1 |
| intersection_dk | Change in z-coordinate for a change in k index of 1 |
Definition at line 132 of file cpu_acc_intersections.cpp.


| void compute_intersections_2nd | ( | const vmesh::VelocityMesh * | vmesh, |
| const Transform< Real, 3, Affine > & | bwd_transform, | ||
| const Transform< Real, 3, Affine > & | fwd_transform, | ||
| const uint | dimension, | ||
| Real & | intersection, | ||
| Real & | intersection_di, | ||
| Real & | intersection_dj, | ||
| Real & | intersection_dk ) |
Computes the second intersection data; this is x~ in section 2.4 in Zerroukat et al (2012). We assume all velocity cells have the same dimensions. Intersection x coordinate for (i,j,k) is: intersection + i * intersection_di + j * intersection_dj + k * intersection_dk
| spatial_cell | spatial cell that is accelerated |
| fwd_transform | Transform that describes acceleration forward in time |
| bwd_transform | Transform that describes acceleration backward in time, used to compute the lagrangian departure grid |
| dimension | Along which dimension is this intersection/mapping computation done. It is assumed the three mappings are in order 012, 120 or 201 |
| intersection | Intersection x-coordinate at i,j,k=0 |
| intersection_di | Change in x-coordinate for a change in i index of 1 |
| intersection_dj | Change in x-coordinate for a change in j index of 1 |
| intersection_dk | Change in x-coordinate for a change in k index of 1 |
Definition at line 246 of file cpu_acc_intersections.cpp.


| void compute_intersections_3rd | ( | const vmesh::VelocityMesh * | vmesh, |
| const Transform< Real, 3, Affine > & | bwd_transform, | ||
| const Transform< Real, 3, Affine > & | fwd_transform, | ||
| const uint | dimension, | ||
| Real & | intersection, | ||
| Real & | intersection_di, | ||
| Real & | intersection_dj, | ||
| Real & | intersection_dk ) |
Computes the third intersection data; this is y intersections in Zerroukat et al (2012). We assume all velocity cells have the same dimensions. Intersection y-coordinate for (i,j,k) is: intersection + i * intersection_di + j * intersection_dj + k * intersection_dk
| spatial_cell | spatial cell that is accelerated |
| fwd_transform | Transform that describes acceleration forward in time |
| bwd_transform | Transform that describes acceleration backward in time, used to compute the lagrangian departure grid |
| dimension | Along which dimension is this intersection/mapping computation done. It is assumed the three mappings are in order 012, 120 or 201 |
| intersection | Intersection y-coordinate at i,j,k=0 |
| intersection_di | Change in y-coordinate for a change in i index of 1 |
| intersection_dj | Change in y-coordinate for a change in j index of 1 |
| intersection_dk | Change in y-coordinate for a change in k index of 1 |
euclidian y goes from vy_min to vy_max, this is mapped to wherever y plane is in lagrangian.
Definition at line 376 of file cpu_acc_intersections.cpp.

| Eigen::Matrix< Real, 3, 1 > line_plane_intersection | ( | const Eigen::Matrix< Real, 3, 1 > & | l_point, |
| const Eigen::Matrix< Real, 3, 1 > & | l_direction, | ||
| const Eigen::Matrix< Real, 3, 1 > & | p_point, | ||
| const Eigen::Matrix< Real, 3, 1 > & | p_normal ) |
Computes the intersection point of a plane and a line
| l_point | Point on the line |
| l_direction | Vector in the direction of the line |
| p_point | Point on plane |
| p_normal | Normal vector to plane |
| intersection | The function will set this to the intersection point. |
Definition at line 112 of file cpu_acc_intersections.cpp.
