SpECTRE  v2024.04.12
ElementLogicalCoordHolder< Dim > Struct Template Reference

Holds element logical coordinates of an arbitrary set of points on a single Element. The arbitrary set of points is assumed to be a subset of a larger set of points spanning multiple Elements, and this class holds offsets that index into that larger set of points. More...

#include <ElementLogicalCoordinates.hpp>

Public Attributes

tnsr::I< DataVector, Dim, Frame::ElementLogicalelement_logical_coords
 
std::vector< size_t > offsets
 

Detailed Description

template<size_t Dim>
struct ElementLogicalCoordHolder< Dim >

Holds element logical coordinates of an arbitrary set of points on a single Element. The arbitrary set of points is assumed to be a subset of a larger set of points spanning multiple Elements, and this class holds offsets that index into that larger set of points.

Details

offsets.size() is the same as the size of the DataVector inside element_logical_coords.

This is used during the process of interpolating volume quantities on the Elements (e.g. the spatial metric) onto an arbitrary set of points (e.g. the points on an apparent horizon or a wave-extraction surface) expressed in some frame. Here is an outline of how this interpolation proceeds, and where element_logical_coordinates and block_logical_coordinates fit into the picture:

Assume some component (e.g. HorizonA) has a Tensor<DataVector> of target coordinate points in some coordinate frame. The goal is to determine the Element and logical coordinates of each point, have each Element interpolate volume data onto the points contained inside that Element, and send the interpolated data back to the component. The first step of this process is to determine the block_id and block_logical_coordinates of each point; this is done by the component (e.g. HorizonA), which calls the function block_logical_coordinates on its full set of target points. The result of block_logical_coordinates is then communicated to the members of a NodeGroup component (e.g. HorizonManager). Each node of the NodeGroup then calls element_logical_coordinates, which returns a map of ElementId to ElementLogicalCoordHolder for all the Elements on that node that contain one or more of the target points. The NodeGroup (which already has received the volume data from the Elements on that node), interpolates the volume data to the element logical coordinates for all of these ElementIds. The offsets in the ElementLogicalCoordHolder are the indices into the DataVectors of the original target coordinates and will be used to assemble the interpolated data into Tensor<DataVector>s that have the same ordering as the original target coordinates. The NodeGroups perform a reduction to get the data back to the original component.


The documentation for this struct was generated from the following file: