Functions | |
| constexpr void | prolongation_constant_fine_grid_stencil_offsets_at_coarse_vertex (dense::Vec< int, 3 >(&offsets)[21]) |
| template<typename ScalarType > | |
| constexpr ScalarType | prolongation_constant_weight (const int x_fine, const int y_fine, const int r_fine, const int x_coarse, const int y_coarse, const int r_coarse) |
| template<typename ScalarType > | |
| constexpr dense::Vec< ScalarType, 2 > | prolongation_linear_weights (const dense::Vec< int, 4 > &idx_fine, const dense::Vec< int, 4 > &idx_coarse_bot, const grid::Grid3DDataVec< ScalarType, 3 > &subdomain_shell_coords_fine, const grid::Grid2DDataScalar< ScalarType > subdomain_radii_fine) |
| Computes prolongation weights for the spherical shell. | |
| template<typename ScalarType > | |
| constexpr dense::Vec< ScalarType, 2 > | prolongation_linear_weights (const dense::Vec< int, 4 > &idx_fine, const dense::Vec< int, 4 > &idx_coarse_bot_0, const dense::Vec< int, 4 > &idx_coarse_bot_1, const grid::Grid3DDataVec< ScalarType, 3 > &subdomain_shell_coords_fine, const grid::Grid2DDataScalar< ScalarType > subdomain_radii_fine) |
| Computes prolongation weights for the spherical shell. | |
|
constexpr |
|
constexpr |
|
constexpr |
Computes prolongation weights for the spherical shell.
This covers the (simpler) case that the fine node index and the corresponding coarse grid nodes are radially aligned.
|
constexpr |
Computes prolongation weights for the spherical shell.
Ensures that affine scalar functions (f(x) = a_1 * x_1 + a_2 * x_2 + a_3 * x_3 + c) are interpolated exactly.
Returns the non-zero columns of the prolongation matrix, i.e., the weights have to be multiplied with corresponding coarse grid values, summed, and written to the fine grid node. Therefore, this function is best used in a loop over the fine grid points.
A fine grid node is either located exactly at a coarse grid node, or between a pair of coarse grid nodes. There are three cases to consider overall:
a) fine grid node is at same position as coarse grid point => weight is 1.0 b) fine grid node is between two radially aligned coarse grid points (the projection of the two coarse grid points onto the unit sphere is equal) => call the other overload of this function c) otherwise => CALL THIS FUNCTION
We can in that last case find four (distinct) coarse grid nodes bot_0, bot_1, top_0, top_1 with top_j and bot_j being aligned on a radial layer for j = 0, 1, such that all these nodes are aligned on a plane that also contains the fine grid node.
(Technically, that fine grid node is located on one facet of a spherical wedge element. We can therefore ignore the contributions from the other two wedge nodes that are not part of that facet).
It is required to specify the two bottom indices of those coarse nodes. The top ones are computed within this function.
| idx_fine | index (local_subdomain_id, x, y, r) of the fine grid node |
| idx_coarse_bot_0 | coarse grid index (local_subdomain_id, x_coarse, y_coarse, r_coarse) of one of the nodes at the bottom of the wedge's plane that contains the fine-grid node. |
| idx_coarse_bot_1 | coarse grid index (local_subdomain_id, x_coarse, y_coarse, r_coarse) of the other node at the bottom of the wedge's plane that contains the fine-grid node. |
| subdomain_shell_coords_fine | the coords of the nodes on the unit sphere |
| subdomain_radii_fine | the node radii |