: Galerkin coarse approximation (GCA). TwoGridGCA takes a coarser and a finer operator. Each thread assembles a coarse-grid gca matrix in the coarser operator on a single hex. To do this, it loops the finer hexes of the coarse hex and its respective wedges. It computes the interpolation matrix P mapping from coarse wedge to the current fine wedge, computes the triple-product P^TAP with the fine-operator local matrix A and adds the resulting gca matrix up for all fine wedges comprising the coarse wedge. Finally, it stores the result in the wedge-wise matrix storage of the coarse operator. More...
#include <gca.hpp>
Public Types | |
| using | SrcVectorType = linalg::VectorQ1Scalar< double > |
| using | DstVectorType = linalg::VectorQ1Scalar< double > |
| using | ScalarType = ScalarT |
Public Member Functions | |
| TwoGridGCA (Operator fine_op, Operator coarse_op, int level_range, grid::Grid4DDataScalar< ScalarType > GCAElements, bool treat_boundary=true, InterpolationMode interpolation_mode=InterpolationMode::Constant) | |
| GCA Ctor Assembles Galerkin coarse-grid operators in the coarse-op passed. | |
| void | wedge_vertex_indices (dense::Vec< int, 4 > hex_idx, int wedge, dense::Vec< int, 4 >(&wedge_local_vertex_indices)[6]) const |
| Computes indices of vertices associated to a wedge in a hex cell. | |
| void | operator() (const int local_subdomain_id, const int x_coarse_idx, const int y_coarse_idx, const int r_coarse_idx) const |
: Galerkin coarse approximation (GCA). TwoGridGCA takes a coarser and a finer operator. Each thread assembles a coarse-grid gca matrix in the coarser operator on a single hex. To do this, it loops the finer hexes of the coarse hex and its respective wedges. It computes the interpolation matrix P mapping from coarse wedge to the current fine wedge, computes the triple-product P^TAP with the fine-operator local matrix A and adds the resulting gca matrix up for all fine wedges comprising the coarse wedge. Finally, it stores the result in the wedge-wise matrix storage of the coarse operator.
| using terra::linalg::solvers::TwoGridGCA< ScalarT, Operator >::DstVectorType = linalg::VectorQ1Scalar< double > |
| using terra::linalg::solvers::TwoGridGCA< ScalarT, Operator >::ScalarType = ScalarT |
| using terra::linalg::solvers::TwoGridGCA< ScalarT, Operator >::SrcVectorType = linalg::VectorQ1Scalar< double > |
|
inlineexplicit |
GCA Ctor Assembles Galerkin coarse-grid operators in the coarse-op passed.
| fine_op | operator on the finer grid to derive the coarse-grid operators from |
| coarse_op | operator on the coarser grid to store the coarse-grid operators in |
| level_range | max_level - min_level range used in the app: required check whether a certain element is a child of a GCA element. |
| GCAElements | map of coarsest-grid elements, on which GCA should be used. Using this and level_range, the GCA can check for a certain element whether it is a child of a marked coarsest-grid element. If that is the case, GCA is applied to it. |
|
inline |
|
inline |
Computes indices of vertices associated to a wedge in a hex cell.
| coarse_hex_idx | [in] global index of the hex cell |
| wedge | [in] wedge index (local index 0 or 1) |
| wedge_local_vertex_indices | [out] global indices of the vertices located on the wedge |