|
SpECTRE
v2025.08.19
|
Interpolator to be used for interpolating boundary data from (to) a Neighbor onto a mortar between nonconforming Blocks. More...
#include <MortarInterpolator.hpp>
Public Member Functions | |
| MortarInterpolator (const ElementId< Dim > &host_id, const DirectionalId< Dim > &neighbor_id, const Domain< Dim > &domain, const Mesh< Dim - 1 > &host_mortar_mesh, const Mesh< Dim - 1 > &neighbor_mortar_mesh) | |
| The Element with host_id is one of the multiple nonconforming Elements abutting the single Element with neighbor_id. The host_mortar_mesh and neighbor_mortar_mesh are simply the appropriate face Mesh of the host and neighbor. | |
| const std::vector< size_t > & | interpolated_neighbor_data_offsets () const |
| The offsets of the data returned by interpolate_to_neighbor into the full data on the neighbor_mortar_mesh. More... | |
| const Mesh< Dim - 1 > & | neighbor_mortar_mesh () const |
| The neighbor mortar mesh that is used to compute the target points and offsets when interpolating to the neighbor. | |
| void | reset_if_necessary (const Domain< Dim > &domain, const Mesh< Dim - 1 > &host_mortar_mesh, const Mesh< Dim - 1 > &neighbor_mortar_mesh) |
| Updates the interpolator if either of the mortar Mesh change. | |
| void | pup (PUP::er &p) |
| void | interpolate_to_host (gsl::not_null< DataVector * > result, const DataVector &neighbor_data) const |
| Interpolates the boundary data of the neighbor to the host mortar. More... | |
| DataVector | interpolate_to_host (const DataVector &neighbor_data) const |
| Interpolates the boundary data of the neighbor to the host mortar. More... | |
| void | interpolate_to_neighbor (gsl::not_null< DataVector * > result, const DataVector &host_data) const |
| Interpolates the boundary data of the host to a subset of the points of the neighbor mortar. More... | |
| DataVector | interpolate_to_neighbor (const DataVector &host_data) const |
| Interpolates the boundary data of the host to a subset of the points of the neighbor mortar. More... | |
Friends | |
| template<size_t LocalDim> | |
| bool | operator== (const MortarInterpolator< LocalDim > &lhs, const MortarInterpolator< LocalDim > &rhs) |
Interpolator to be used for interpolating boundary data from (to) a Neighbor onto a mortar between nonconforming Blocks.
This interpolator is designed to be used when multiple nonconforming elements are neighbors with a single element (e.g deformed cubes of a cubed sphere next to a single S2 spherical shell). Each of the multiple elements (the hosts) should create this class to both interpolate neighbor boundary data to the mortar of the host as well as interpolate the host boundary data onto the subset of points of the mortar of the neighbor.
| DataVector dg::MortarInterpolator< Dim >::interpolate_to_host | ( | const DataVector & | neighbor_data | ) | const |
Interpolates the boundary data of the neighbor to the host mortar.
neighbor_data is a type-erased Variables so will have a size equal to the product of the number of components and the number of grid points of the neighbor_mortar_mesh. The returned DataVector will have a size equal to the number of components and the number of grid points of the host_mortar_mesh.
| void dg::MortarInterpolator< Dim >::interpolate_to_host | ( | gsl::not_null< DataVector * > | result, |
| const DataVector & | neighbor_data | ||
| ) | const |
Interpolates the boundary data of the neighbor to the host mortar.
neighbor_data is a type-erased Variables so will have a size equal to the product of the number of components and the number of grid points of the neighbor_mortar_mesh. The returned DataVector will have a size equal to the number of components and the number of grid points of the host_mortar_mesh.
| DataVector dg::MortarInterpolator< Dim >::interpolate_to_neighbor | ( | const DataVector & | host_data | ) | const |
Interpolates the boundary data of the host to a subset of the points of the neighbor mortar.
host_data is a type-erased Variables so will have a size equal to the product of the number of components and the number of grid points of the host_mortar_mesh. The returned DataVector will have a size equal to the number of components and the number of grid points of the neighbor_mortar_mesh that the host is able to interpolate to.
| void dg::MortarInterpolator< Dim >::interpolate_to_neighbor | ( | gsl::not_null< DataVector * > | result, |
| const DataVector & | host_data | ||
| ) | const |
Interpolates the boundary data of the host to a subset of the points of the neighbor mortar.
host_data is a type-erased Variables so will have a size equal to the product of the number of components and the number of grid points of the host_mortar_mesh. The returned DataVector will have a size equal to the number of components and the number of grid points of the neighbor_mortar_mesh that the host is able to interpolate to.
|
inline |
The offsets of the data returned by interpolate_to_neighbor into the full data on the neighbor_mortar_mesh.
The DataVectors of type-erased Variables store data such that the grid point index varies fastest (as opposed to the component index). The size of the returned vector is equal to the number of grid points of the neighbor_mortar_mesh that the host is able to interpolate to, and the values of the returned vector map the grid point index of the partial DataVector returned by interpolate_to_neighbor to the grid point index of the full DataVector on the neighbor_mortar_mesh