Compadre
1.2.0
|
Lightweight Evaluator Helper This class is a lightweight wrapper for extracting and applying all relevant data from a GMLS class in order to transform data into a form that can be acted on by the GMLS operator, apply the action of the GMLS operator, and then transform data again (only if on a manifold) More...
Lightweight Evaluator Helper This class is a lightweight wrapper for extracting and applying all relevant data from a GMLS class in order to transform data into a form that can be acted on by the GMLS operator, apply the action of the GMLS operator, and then transform data again (only if on a manifold)
Definition at line 115 of file Compadre_Evaluator.hpp.
#include <Compadre_Evaluator.hpp>
Public Member Functions | |
Evaluator (GMLS *gmls) | |
~Evaluator () | |
template<typename view_type_data > | |
double | applyAlphasToDataSingleComponentSingleTargetSite (view_type_data sampling_input_data, const int column_of_input, TargetOperation lro, const int target_index, const int evaluation_site_local_index, const int output_component_axis_1, const int output_component_axis_2, const int input_component_axis_1, const int input_component_axis_2, bool scalar_as_vector_if_needed=true) const |
Dot product of alphas with sampling data, FOR A SINGLE target_index, where sampling data is in a 1D/2D Kokkos View. More... | |
template<typename view_type_data_out , typename view_type_data_in > | |
void | applyAlphasToDataSingleComponentAllTargetSitesWithPreAndPostTransform (view_type_data_out output_data_single_column, view_type_data_in sampling_data_single_column, TargetOperation lro, const SamplingFunctional sro, const int evaluation_site_local_index, const int output_component_axis_1, const int output_component_axis_2, const int input_component_axis_1, const int input_component_axis_2, const int pre_transform_local_index=-1, const int pre_transform_global_index=-1, const int post_transform_local_index=-1, const int post_transform_global_index=-1, bool vary_on_target=false, bool vary_on_neighbor=false) const |
Dot product of alphas with sampling data where sampling data is in a 1D/2D Kokkos View and output view is also a 1D/2D Kokkos View, however THE SAMPLING DATA and OUTPUT VIEW MUST BE ON THE DEVICE! More... | |
template<typename view_type_data_out , typename view_type_data_in > | |
void | applyLocalChartToAmbientSpaceTransform (view_type_data_out output_data_single_column, view_type_data_in sampling_data_single_column, const int local_dim_index, const int global_dim_index) const |
Postprocessing for manifolds. More... | |
template<typename output_data_type = double**, typename output_memory_space , typename view_type_input_data , typename output_array_layout = typename view_type_input_data::array_layout> | |
Kokkos::View< output_data_type, output_array_layout, output_memory_space > | applyAlphasToDataAllComponentsAllTargetSites (view_type_input_data sampling_data, TargetOperation lro, const SamplingFunctional sro_in=PointSample, bool scalar_as_vector_if_needed=true, const int evaluation_site_local_index=0) const |
Transformation of data under GMLS. More... | |
template<typename view_type_data_out , typename view_type_data_in > | |
void | applyFullPolynomialCoefficientsBasisToDataSingleComponent (view_type_data_out output_data_block_column, view_type_data_in sampling_data_single_column, const SamplingFunctional sro, const int output_component_axis_1, const int output_component_axis_2, const int input_component_axis_1, const int input_component_axis_2, const int pre_transform_local_index=-1, const int pre_transform_global_index=-1, const int post_transform_local_index=-1, const int post_transform_global_index=-1, bool vary_on_target=false, bool vary_on_neighbor=false) const |
Dot product of data with full polynomial coefficient basis where sampling data is in a 1D/2D Kokkos View and output view is also a 1D/2D Kokkos View, however THE SAMPLING DATA and OUTPUT VIEW MUST BE ON THE DEVICE! More... | |
template<typename output_data_type = double**, typename output_memory_space , typename view_type_input_data , typename output_array_layout = typename view_type_input_data::array_layout> | |
Kokkos::View< output_data_type, output_array_layout, output_memory_space > | applyFullPolynomialCoefficientsBasisToDataAllComponents (view_type_input_data sampling_data, bool scalar_as_vector_if_needed=true) const |
Generation of polynomial reconstruction coefficients by applying to data in GMLS. More... | |
Private Attributes | |
GMLS * | _gmls |
|
inline |
Definition at line 124 of file Compadre_Evaluator.hpp.
|
inline |
Definition at line 128 of file Compadre_Evaluator.hpp.
|
inline |
Transformation of data under GMLS.
This function is the go to function to be used when the alpha values have already been calculated and stored for use. The sampling functional provided instructs how a data transformation tensor is to be used on source data before it is provided to the GMLS operator. Once the sampling functional (if applicable) and the GMLS operator have been applied, this function also handles mapping the local vector back to the ambient space if working on a manifold problem and a target functional who has rank 1 output.
Produces a Kokkos View as output with a Kokkos memory_space provided as a template tag by the caller. The data type (double* or double**) must also be specified as a template type if one wish to get a 1D Kokkos View back that can be indexed into with only one ordinal.
Assumptions on input data:
sampling_data | [in] - 1D or 2D Kokkos View that has the layout #targets * columns of data. Memory space for data can be host or device. |
lro | [in] - Target operation from the TargetOperation enum |
sro_in | [in] - Sampling functional from the SamplingFunctional enum |
scalar_as_vector_if_needed | [in] - If a 1D view is given, where a 2D view is expected (scalar values given where a vector was expected), then the scalar will be repeated for as many components as the vector has |
evaluation_site_local_index | [in] - 0 corresponds to evaluating at the target site itself, while a number larger than 0 indicates evaluation at a site other than the target, and specified by calling setAdditionalEvaluationSitesData on the GMLS class |
Definition at line 361 of file Compadre_Evaluator.hpp.
|
inline |
Dot product of alphas with sampling data where sampling data is in a 1D/2D Kokkos View and output view is also a 1D/2D Kokkos View, however THE SAMPLING DATA and OUTPUT VIEW MUST BE ON THE DEVICE!
This function is to be used when the alpha values have already been calculated and stored for use.
Only supports one output component / input component at a time. The user will need to loop over the output components in order to fill a vector target or matrix target.
Assumptions on input data:
output_data_single_column | [out] - 1D Kokkos View (memory space must be device_memory_space()) |
sampling_data_single_column | [in] - 1D Kokkos View (memory space must match output_data_single_column) |
lro | [in] - Target operation from the TargetOperation enum |
sro | [in] - Sampling functional from the SamplingFunctional enum |
evaluation_site_location | [in] - local column index of site from additional evaluation sites list or 0 for the target site |
output_component_axis_1 | [in] - Row for a rank 2 tensor or rank 1 tensor, 0 for a scalar output |
output_component_axis_2 | [in] - Columns for a rank 2 tensor, 0 for rank less than 2 output tensor |
input_component_axis_1 | [in] - Row for a rank 2 tensor or rank 1 tensor, 0 for a scalar input |
input_component_axis_2 | [in] - Columns for a rank 2 tensor, 0 for rank less than 2 input tensor |
pre_transform_local_index | [in] - For manifold problems, this is the local coordinate direction that sampling data may need to be transformed to before the application of GMLS |
pre_transform_global_index | [in] - For manifold problems, this is the global coordinate direction that sampling data can be represented in |
post_transform_local_index | [in] - For manifold problems, this is the local coordinate direction that vector output target functionals from GMLS will output into |
post_transform_global_index | [in] - For manifold problems, this is the global coordinate direction that the target functional output from GMLS will be transformed into |
transform_output_ambient | [in] - Whether or not a 1D output from GMLS is on the manifold and needs to be mapped to ambient space |
vary_on_target | [in] - Whether the sampling functional has a tensor to act on sampling data that varies with each target site |
vary_on_neighbor | [in] - Whether the sampling functional has a tensor to act on sampling data that varies with each neighbor site in addition to varying wit each target site |
Definition at line 205 of file Compadre_Evaluator.hpp.
|
inline |
Dot product of alphas with sampling data, FOR A SINGLE target_index, where sampling data is in a 1D/2D Kokkos View.
This function is to be used when the alpha values have already been calculated and stored for use
Only supports one output component / input component at a time. The user will need to loop over the output components in order to fill a vector target or matrix target.
Assumptions on input data:
sampling_input_data | [in] - 1D/2D Kokkos View (no restriction on memory space) |
column_of_input | [in] - Column of sampling_input_data to use for this input component |
lro | [in] - Target operation from the TargetOperation enum |
target_index | [in] - Target # user wants to reconstruct target functional at, corresponds to row number of neighbor_lists |
output_component_axis_1 | [in] - Row for a rank 2 tensor or rank 1 tensor, 0 for a scalar output |
output_component_axis_2 | [in] - Columns for a rank 2 tensor, 0 for rank less than 2 output tensor |
input_component_axis_1 | [in] - Row for a rank 2 tensor or rank 1 tensor, 0 for a scalar input |
input_component_axis_2 | [in] - Columns for a rank 2 tensor, 0 for rank less than 2 input tensor |
scalar_as_vector_if_needed | [in] - If a 1D view is given, where a 2D view is expected (scalar values given where a vector was expected), then the scalar will be repeated for as many components as the vector has |
Definition at line 148 of file Compadre_Evaluator.hpp.
|
inline |
Generation of polynomial reconstruction coefficients by applying to data in GMLS.
Polynomial reconstruction coefficients exist for each target, but there are coefficients for each neighbor (a basis for all potentional input data). This function uses a particular choice of data to contract over this basis and return the polynomial reconstructions coefficients specific to this data.
Produces a Kokkos View as output with a Kokkos memory_space provided as a template tag by the caller. The data type (double* or double**) must also be specified as a template type if one wish to get a 1D Kokkos View back that can be indexed into with only one ordinal.
Assumptions on input data:
sampling_data | [in] - 1D or 2D Kokkos View that has the layout #targets * columns of data. Memory space for data can be host or device. |
sro | [in] - Sampling functional from the SamplingFunctional enum |
scalar_as_vector_if_needed | [in] - If a 1D view is given, where a 2D view is expected (scalar values given where a vector was expected), then the scalar will be repeated for as many components as the vector has |
Definition at line 630 of file Compadre_Evaluator.hpp.
|
inline |
Dot product of data with full polynomial coefficient basis where sampling data is in a 1D/2D Kokkos View and output view is also a 1D/2D Kokkos View, however THE SAMPLING DATA and OUTPUT VIEW MUST BE ON THE DEVICE!
This function is to be used when the polynomial coefficient basis has already been calculated and stored for use.
Only supports one output component / input component at a time. The user will need to loop over the output components in order to fill a vector target or matrix target.
Assumptions on input data:
output_data_block_column | [out] - 2D Kokkos View (memory space must be device_memory_space()) |
sampling_data_single_column | [in] - 1D Kokkos View (memory space must match output_data_single_column) |
sro | [in] - Sampling functional from the SamplingFunctional enum |
target_index | [in] - Target # user wants to reconstruct target functional at, corresponds to row number of neighbor_lists |
output_component_axis_1 | [in] - Row for a rank 2 tensor or rank 1 tensor, 0 for a scalar output |
output_component_axis_2 | [in] - Columns for a rank 2 tensor, 0 for rank less than 2 output tensor |
input_component_axis_1 | [in] - Row for a rank 2 tensor or rank 1 tensor, 0 for a scalar input |
input_component_axis_2 | [in] - Columns for a rank 2 tensor, 0 for rank less than 2 input tensor |
pre_transform_local_index | [in] - For manifold problems, this is the local coordinate direction that sampling data may need to be transformed to before the application of GMLS |
pre_transform_global_index | [in] - For manifold problems, this is the global coordinate direction that sampling data can be represented in |
post_transform_local_index | [in] - For manifold problems, this is the local coordinate direction that vector output target functionals from GMLS will output into |
post_transform_global_index | [in] - For manifold problems, this is the global coordinate direction that the target functional output from GMLS will be transformed into |
vary_on_target | [in] - Whether the sampling functional has a tensor to act on sampling data that varies with each target site |
vary_on_neighbor | [in] - Whether the sampling functional has a tensor to act on sampling data that varies with each neighbor site in addition to varying wit each target site |
Definition at line 510 of file Compadre_Evaluator.hpp.
|
inline |
Postprocessing for manifolds.
Maps local chart vector solutions to ambient space. THE SAMPLING DATA and OUTPUT VIEW MUST BE ON THE DEVICE!
Only supports one output component / input component at a time. The user will need to loop over the output components in order to transform a vector target.
Assumptions on input data:
output_data_single_column | [out] - 1D Kokkos View (memory space must be device_memory_space()) |
sampling_data_single_column | [in] - 1D Kokkos View (memory space must match output_data_single_column) |
local_dim_index | [in] - For manifold problems, this is the local coordinate direction that sampling data may need to be transformed to before the application of GMLS |
global_dim_index | [in] - For manifold problems, this is the global coordinate direction that sampling data can be represented in |
Definition at line 308 of file Compadre_Evaluator.hpp.
|
private |
Definition at line 119 of file Compadre_Evaluator.hpp.