9 #ifndef _COMPADRE_EVALUATOR_HPP_
10 #define _COMPADRE_EVALUATOR_HPP_
19 template<
typename T,
typename T2,
typename T3=
void>
26 SubviewND(T data_in, T2 data_original_view,
bool scalar_as_vector_if_needed) {
35 &&
"Subview asked for column > second dimension of input data.");
37 if ((
size_t)column_num<
_data_in.extent(1))
38 return Kokkos::subview(
_data_in, Kokkos::ALL, column_num);
40 return Kokkos::subview(
_data_in, Kokkos::ALL, 0);
44 Kokkos::make_pair(column_num*block_size, (column_num+1)*block_size))) {
47 &&
"Subview asked for column > second dimension of input data.");
49 if ((
size_t)((column_num+1)*block_size-1)<
_data_in.extent(1)) {
50 return Kokkos::subview(
_data_in, Kokkos::ALL, Kokkos::make_pair(column_num*block_size, (column_num+1)*block_size));
53 return Kokkos::subview(
_data_in, Kokkos::ALL, Kokkos::make_pair(0,block_size));
66 template<
typename T,
typename T2>
74 SubviewND(T data_in, T2 data_original_view,
bool scalar_as_vector_if_needed) {
85 compadre_assert_debug((column_num==0) &&
"Subview asked for column column_num!=0, but _data_in is rank 1.");
87 return Kokkos::subview(
_data_in, Kokkos::ALL);
92 return Kokkos::subview(
_data_in, Kokkos::ALL);
105 template <
typename T>
110 auto sampling_input_data_device = Kokkos::create_mirror_view(
112 Kokkos::deep_copy(sampling_input_data_device, sampling_input_data_host_or_device);
116 sampling_input_data_host_or_device, scalar_as_vector_if_needed);
155 template <
typename view_type_data>
156 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 {
161 output_component_axis_2, input_component_axis_1, input_component_axis_2, evaluation_site_local_index);
169 auto sampling_data_device = sampling_subview_maker.get1DView(column_of_input);
174 Kokkos::parallel_reduce(
"applyAlphasToData::Device",
175 Kokkos::RangePolicy<device_execution_space>(0,nla.getNumberOfNeighborsHost(target_index)),
176 KOKKOS_LAMBDA(
const int i,
double& t_value) {
178 t_value += sampling_data_device(nla.getNeighborDevice(target_index, i))
179 *alphas(alpha_index + i);
212 template <
typename view_type_data_out,
typename view_type_data_in>
213 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 {
216 output_component_axis_2, input_component_axis_1, input_component_axis_2, evaluation_site_local_index);
217 const int alpha_input_output_component_index2 = alpha_input_output_component_index;
223 "application of alphas called before generateAlphas() was called.");
226 const int num_targets = nla.getNumberOfTargets();
229 compadre_assert_debug((std::is_same<typename view_type_data_out::memory_space, typename view_type_data_in::memory_space>::value) &&
230 "output_data_single_column view and input_data_single_column view have difference memory spaces.");
232 bool weight_with_pre_T = (pre_transform_local_index>=0 && pre_transform_global_index>=0) ?
true :
false;
236 Kokkos::parallel_for(
team_policy(num_targets, Kokkos::AUTO),
239 const int target_index = teamMember.league_rank();
240 teamMember.team_barrier();
243 const double previous_value = output_data_single_column(target_index);
246 auto alpha_index = solution_set.getAlphaIndex(target_index, alpha_input_output_component_index);
247 double gmls_value = 0;
248 Kokkos::parallel_reduce(Kokkos::TeamThreadRange(teamMember, nla.getNumberOfNeighborsDevice(target_index)), [&](
const int i,
double& t_value) {
249 const double neighbor_varying_pre_T = (weight_with_pre_T && vary_on_neighbor) ?
250 prestencil_weights(0, target_index, i, pre_transform_local_index, pre_transform_global_index)
253 t_value += neighbor_varying_pre_T * sampling_data_single_column(nla.getNeighborDevice(target_index, i))
254 *solution_set._alphas(alpha_index + i);
260 if (weight_with_pre_T) {
261 if (!vary_on_neighbor && vary_on_target) {
262 pre_T = prestencil_weights(0, target_index, 0, pre_transform_local_index,
263 pre_transform_global_index);
264 }
else if (!vary_on_target) {
265 pre_T = prestencil_weights(0, 0, 0, pre_transform_local_index,
266 pre_transform_global_index);
270 double staggered_value_from_targets = 0;
271 double pre_T_staggered = 1.0;
272 auto alpha_index2 = solution_set.getAlphaIndex(target_index, alpha_input_output_component_index2);
274 if (target_plus_neighbor_staggered_schema) {
275 Kokkos::parallel_reduce(Kokkos::TeamThreadRange(teamMember, nla.getNumberOfNeighborsDevice(target_index)), [&](
const int i,
double& t_value) {
276 const double neighbor_varying_pre_T_staggered = (weight_with_pre_T && vary_on_neighbor) ?
277 prestencil_weights(1, target_index, i, pre_transform_local_index, pre_transform_global_index)
280 t_value += neighbor_varying_pre_T_staggered * sampling_data_single_column(nla.getNeighborDevice(target_index, 0))
281 *solution_set._alphas(alpha_index2 + i);
283 }, staggered_value_from_targets );
286 if (weight_with_pre_T) {
287 if (!vary_on_neighbor && vary_on_target) {
288 pre_T_staggered = prestencil_weights(1, target_index, 0, pre_transform_local_index,
289 pre_transform_global_index);
290 }
else if (!vary_on_target) {
291 pre_T_staggered = prestencil_weights(1, 0, 0, pre_transform_local_index,
292 pre_transform_global_index);
297 double added_value = pre_T*gmls_value + pre_T_staggered*staggered_value_from_targets;
298 Kokkos::single(Kokkos::PerTeam(teamMember), [&] () {
299 output_data_single_column(target_index) = previous_value + added_value;
316 template <
typename view_type_data_out,
typename view_type_data_in>
324 const int num_targets = nla.getNumberOfTargets();
329 compadre_assert_debug((std::is_same<typename view_type_data_out::memory_space, typename view_type_data_in::memory_space>::value) &&
330 "output_data_single_column view and input_data_single_column view have difference memory spaces.");
333 Kokkos::parallel_for(
team_policy(num_targets, Kokkos::AUTO),
336 const int target_index = teamMember.league_rank();
340 global_dimensions, global_dimensions);
341 teamMember.team_barrier();
344 const double previous_value = output_data_single_column(target_index);
346 double added_value = T(local_dim_index, global_dim_index)*sampling_data_single_column(target_index);
347 Kokkos::single(Kokkos::PerTeam(teamMember), [&] () {
348 output_data_single_column(target_index) = previous_value + added_value;
368 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>
369 Kokkos::View<output_data_type, output_array_layout, output_memory_space>
380 typedef Kokkos::View<output_data_type, output_array_layout, output_memory_space> output_view_type;
382 output_view_type target_output = createView<output_view_type>(
"output of target operation",
383 nla.getNumberOfTargets(), output_dimensions);
385 output_view_type ambient_target_output;
387 if (transform_gmls_output_to_ambient) {
388 ambient_target_output = createView<output_view_type>(
"output of transform to ambient space",
389 nla.getNumberOfTargets(), global_dimensions);
394 if (transform_gmls_output_to_ambient) {
395 return ambient_target_output;
397 return target_output;
416 template <
typename view_type_output_data,
typename view_type_input_data,
typename output_array_layout =
typename view_type_input_data::array_layout>
442 &&
"First dimension of target_output is incorrect size.\n");
444 &&
"Second dimension of target_output is incorrect size.\n");
447 compadre_assert_debug(((output_dimensions==1 && view_type_output_data::rank==1) || view_type_output_data::rank!=1) &&
448 "Output view is requested as rank 1, but the target requires a rank larger than 1. Try double** as template argument.");
459 bool vary_on_target =
false, vary_on_neighbor =
false;
460 auto sro_style = sro.transform_type;
461 bool loop_global_dimensions = sro.input_rank>0 && sro_style!=
Identity;
464 &&
"SamplingFunctional requested for Evaluator does not match GMLS data sampling functional or is not of type 'Identity'.");
467 vary_on_target =
false;
468 vary_on_neighbor =
false;
470 vary_on_target =
true;
471 vary_on_neighbor =
false;
473 vary_on_target =
true;
474 vary_on_neighbor =
true;
480 for (
int axes1=0; axes1<output_dimension1_of_operator; ++axes1) {
481 const int output_component_axis_1 = axes1;
482 for (
int axes2=0; axes2<output_dimension2_of_operator; ++axes2) {
483 const int output_component_axis_2 = axes2;
485 for (
int j=0; j<input_dimension_of_operator; ++j) {
486 const int input_component_axis_1 = j;
487 const int input_component_axis_2 = 0;
489 if (loop_global_dimensions) {
490 for (
int k=0; k<global_dimensions; ++k) {
492 output_subview_maker.get1DView(axes1*output_dimension2_of_operator+axes2),
493 sampling_subview_maker.get1DView(k), lro, sro,
494 evaluation_site_local_index, output_component_axis_1, output_component_axis_2, input_component_axis_1,
495 input_component_axis_2, j, k, -1, -1,
496 vary_on_target, vary_on_neighbor);
500 output_subview_maker.get1DView(axes1*output_dimension2_of_operator+axes2),
501 sampling_subview_maker.get1DView(j), lro, sro,
502 evaluation_site_local_index, output_component_axis_1, output_component_axis_2, input_component_axis_1,
503 input_component_axis_2, 0, 0, -1, -1,
504 vary_on_target, vary_on_neighbor);
507 output_subview_maker.get1DView(axes1*output_dimension2_of_operator+axes2),
508 sampling_subview_maker.get1DView(j), lro, sro,
509 evaluation_site_local_index, output_component_axis_1, output_component_axis_2, input_component_axis_1,
510 input_component_axis_2);
517 if (transform_gmls_output_to_ambient) {
521 &&
"First dimension of target_output is incorrect size.\n");
523 &&
"Second dimension of target_output is incorrect size.\n");
526 for (
int i=0; i<global_dimensions; ++i) {
527 for (
int j=0; j<output_dimensions; ++j) {
529 transformed_output_subview_maker.get1DView(i), output_subview_maker.get1DView(j), j, i);
533 Kokkos::deep_copy(ambient_target_output, transformed_output_subview_maker.copyToAndReturnOriginalView());
537 Kokkos::deep_copy(target_output, output_subview_maker.copyToAndReturnOriginalView());
564 template <
typename view_type_data_out,
typename view_type_data_in>
565 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 {
571 auto coefficient_memory_layout_dims_device =
572 Kokkos::create_mirror_view_and_copy(
device_memory_space(), coefficient_memory_layout_dims);
581 const int num_targets = nla.getNumberOfTargets();
584 compadre_assert_debug((std::is_same<typename view_type_data_out::memory_space, typename view_type_data_in::memory_space>::value) &&
585 "output_data_block_column view and input_data_single_column view have difference memory spaces.");
587 bool weight_with_pre_T = (pre_transform_local_index>=0 && pre_transform_global_index>=0) ?
true :
false;
591 for (
int j=0; j<coefficient_matrix_dims(0); ++j) {
592 Kokkos::parallel_for(
team_policy(num_targets, Kokkos::AUTO),
595 const int target_index = teamMember.league_rank();
599 global_dimensions, global_dimensions);
604 *
TO_GLOBAL(coefficient_memory_layout_dims_device(1)),
605 coefficient_memory_layout_dims_device(0), coefficient_memory_layout_dims_device(1));
607 teamMember.team_barrier();
610 const double previous_value = output_data_block_column(target_index, j);
613 double gmls_value = 0;
614 Kokkos::parallel_reduce(Kokkos::TeamThreadRange(teamMember, nla.getNumberOfNeighborsDevice(target_index)), [&](
const int i,
double& t_value) {
615 const double neighbor_varying_pre_T = (weight_with_pre_T && vary_on_neighbor) ?
616 prestencil_weights(0, target_index, i, pre_transform_local_index, pre_transform_global_index)
619 t_value += neighbor_varying_pre_T * sampling_data_single_column(nla.getNeighborDevice(target_index, i))
620 *Coeffs(j, i+input_component_axis_1*nla.getNumberOfNeighborsDevice(target_index));
626 if (weight_with_pre_T) {
627 if (!vary_on_neighbor && vary_on_target) {
628 pre_T = prestencil_weights(0, target_index, 0, pre_transform_local_index,
629 pre_transform_global_index);
630 }
else if (!vary_on_target) {
631 pre_T = prestencil_weights(0, 0, 0, pre_transform_local_index,
632 pre_transform_global_index);
636 double staggered_value_from_targets = 0;
637 double pre_T_staggered = 1.0;
639 if (target_plus_neighbor_staggered_schema) {
640 Kokkos::parallel_reduce(Kokkos::TeamThreadRange(teamMember, nla.getNumberOfNeighborsDevice(target_index)), [&](
const int i,
double& t_value) {
641 const double neighbor_varying_pre_T_staggered = (weight_with_pre_T && vary_on_neighbor) ?
642 prestencil_weights(1, target_index, i, pre_transform_local_index, pre_transform_global_index)
645 t_value += neighbor_varying_pre_T_staggered * sampling_data_single_column(nla.getNeighborDevice(target_index, 0))
646 *Coeffs(j, i+input_component_axis_1*nla.getNumberOfNeighborsDevice(target_index));
648 }, staggered_value_from_targets );
651 if (weight_with_pre_T) {
652 if (!vary_on_neighbor && vary_on_target) {
653 pre_T_staggered = prestencil_weights(1, target_index, 0, pre_transform_local_index,
654 pre_transform_global_index);
655 }
else if (!vary_on_target) {
656 pre_T_staggered = prestencil_weights(1, 0, 0, pre_transform_local_index,
657 pre_transform_global_index);
662 double added_value = (pre_T*gmls_value + pre_T_staggered*staggered_value_from_targets);
663 Kokkos::single(Kokkos::PerTeam(teamMember), [&] () {
664 output_data_block_column(target_index, j) = previous_value + added_value;
683 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>
684 Kokkos::View<output_data_type, output_array_layout, output_memory_space>
695 int output_dimensions = output_dimension_of_reconstruction_space;
697 typedef Kokkos::View<output_data_type, output_array_layout, output_memory_space> output_view_type;
699 output_view_type coefficient_output(
"output coefficients", nla.getNumberOfTargets(),
704 return coefficient_output;
721 template <
typename view_type_coefficient_output,
typename view_type_input_data>
723 view_type_input_data sampling_data,
bool scalar_as_vector_if_needed =
true)
const {
741 &&
"First dimension of coefficient_output is incorrect size.\n");
745 &&
"Second dimension of coefficient_output is incorrect size.\n");
748 compadre_assert_debug(((output_dimension_of_reconstruction_space==1 && view_type_coefficient_output::rank==1) || view_type_coefficient_output::rank!=1) &&
749 "Output view is requested as rank 1, but the target requires a rank larger than 1. Try double** as template argument.");
760 bool vary_on_target =
false, vary_on_neighbor =
false;
766 vary_on_target =
false;
767 vary_on_neighbor =
false;
769 vary_on_target =
true;
770 vary_on_neighbor =
false;
772 vary_on_target =
true;
773 vary_on_neighbor =
true;
778 for (
int i=0; i<output_dimension_of_reconstruction_space; ++i) {
779 const int output_component_axis_1 = i;
780 const int output_component_axis_2 = 0;
782 for (
int j=0; j<input_dimension_of_reconstruction_space; ++j) {
783 const int input_component_axis_1 = j;
784 const int input_component_axis_2 = 0;
786 if (loop_global_dimensions) {
787 for (
int k=0; k<global_dimensions; ++k) {
790 sampling_subview_maker.get1DView(k), sro,
791 output_component_axis_1, output_component_axis_2, input_component_axis_1,
792 input_component_axis_2, j, k, -1, -1,
793 vary_on_target, vary_on_neighbor);
798 sampling_subview_maker.get1DView(j), sro,
799 output_component_axis_1, output_component_axis_2, input_component_axis_1,
800 input_component_axis_2, 0, 0, -1, -1,
801 vary_on_target, vary_on_neighbor);
805 sampling_subview_maker.get1DView(j), sro,
806 output_component_axis_1, output_component_axis_2, input_component_axis_1,
807 input_component_axis_2);
813 Kokkos::deep_copy(coefficient_output, output_subview_maker.copyToAndReturnOriginalView());
SamplingFunctional getDataSamplingFunctional() const
Get the data sampling functional specified at instantiation (often the same as the polynomial samplin...
T2 copyToAndReturnOriginalView()
Each neighbor for each target all apply the same transform.
ReconstructionSpace getReconstructionSpace() const
Get the reconstruction space specified at instantiation.
SolutionSet< host_memory_space > _h_ss
Solution Set (contains all alpha values from solution and alpha layout methods)
Lightweight Evaluator Helper This class is a lightweight wrapper for extracting and applying all rele...
constexpr SamplingFunctional ManifoldVectorPointSample
Point evaluations of the entire vector source function (but on a manifold, so it includes a transform...
decltype(_prestencil_weights) getPrestencilWeights() const
Get a view (device) of all rank 2 preprocessing tensors This is a rank 5 tensor that is able to provi...
team_policy::member_type member_type
KOKKOS_INLINE_FUNCTION int calculateSamplingMultiplier(const ReconstructionSpace rs, const SamplingFunctional sro, const int local_dimensions)
Calculate sampling_multiplier.
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 vie...
decltype(_d_ss)* getSolutionSetDevice(bool alpha_validity_check=true)
Get solution set on device.
bool _scalar_as_vector_if_needed
bool use_target_site_weights
Whether or not the SamplingTensor acts on the target site as well as the neighbors.
ProblemType getProblemType() const
Get problem type.
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 (allocates memory fo...
KOKKOS_INLINE_FUNCTION global_index_type getAlphaIndex(const int target_index, const int alpha_column_offset) const
Gives index into alphas given two axes, which when incremented by the neighbor number transforms acce...
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/2...
Kokkos::TeamPolicy< device_execution_space > team_policy
void applyAlphasToDataAllComponentsAllTargetSites(view_type_output_data target_output, view_type_output_data ambient_target_output, 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 (does not allocate memory for output)
neighbor_lists_type * getNeighborLists() const
Get neighbor list accessor.
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.
TargetOperation
Available target functionals.
Each target applies a different transform for each neighbor.
Solve GMLS problem on a manifold (will use QR or SVD to solve the resultant GMLS problem dependent on...
#define TO_GLOBAL(variable)
device_execution_space::memory_space device_memory_space
int input_rank
Rank of sampling functional input for each SamplingFunctional.
void applyFullPolynomialCoefficientsBasisToDataAllComponents(view_type_coefficient_output coefficient_output, 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 (does not allocate m...
int getPolynomialCoefficientsSize() const
Returns size of the basis used in instance's polynomial reconstruction.
typename std::enable_if< B, T >::type enable_if_t
KOKKOS_INLINE_FUNCTION int getAlphaColumnOffset(TargetOperation lro, 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 evaluation_site_local_index=0) const
Retrieves the offset for an operator based on input and output component, generic to row (but still m...
auto get1DView(const int column_num) -> decltype(Kokkos::subview(_data_in, Kokkos::ALL, column_num))
Kokkos::View< double **, layout_right, Kokkos::MemoryTraits< Kokkos::Unmanaged > > scratch_matrix_right_type
SubviewND(T data_in, T2 data_original_view, bool scalar_as_vector_if_needed)
int getLocalDimensions() const
Local dimension of the GMLS problem (less than global dimension if on a manifold), set only at class instantiation.
auto CreateNDSliceOnDeviceView(T sampling_input_data_host_or_device, bool scalar_as_vector_if_needed) -> SubviewND< decltype(Kokkos::create_mirror_view(device_memory_space(), sampling_input_data_host_or_device)), T >
Copies data_in to the device, and then allows for access to 1D columns of data on device...
decltype(_RHS) getFullPolynomialCoefficientsBasis() const
Get a view (device) of all polynomial coefficients basis.
SamplingFunctional _data_sampling_functional
generally the same as _polynomial_sampling_functional, but can differ if specified at ...
int getGlobalDimensions() const
Dimension of the GMLS problem's point data (spatial description of points in ambient space)...
Generalized Moving Least Squares (GMLS)
decltype(_T)* getTangentDirections()
Get a view (device) of all tangent direction bundles.
No action performed on data before GMLS target operation.
KOKKOS_INLINE_FUNCTION int getTargetOutputTensorRank(const int &index)
Rank of target functional output for each TargetOperation Rank of target functional input for each Ta...
int transform_type
Describes the SamplingFunction relationship to targets, neighbors.
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 (allocates memory for output)
auto get2DView(const int column_num, const int block_size) -> decltype(Kokkos::subview(_data_in, Kokkos::ALL, Kokkos::make_pair(column_num *block_size,(column_num+1)*block_size)))
constexpr SamplingFunctional PointSample
Available sampling functionals.
host_managed_local_index_type getPolynomialCoefficientsDomainRangeSize() const
Returns (size of the basis used in instance's polynomial reconstruction) x (data input dimension) ...
struct SubviewND< T, T2, enable_if_t<(T::rank< 2)> >{T _data_in;T2 _data_original_view;bool _scalar_as_vector_if_needed;SubviewND(T data_in, T2 data_original_view, bool scalar_as_vector_if_needed){_data_in=data_in;_data_original_view=data_original_view;_scalar_as_vector_if_needed=scalar_as_vector_if_needed;}auto get1DView(const int column_num) -> decltype(Kokkos::subview(_data_in, Kokkos::ALL))
Creates 1D subviews of data from a 1D view, generally constructed with CreateNDSliceOnDeviceView.
KOKKOS_INLINE_FUNCTION int getInputDimensionOfOperation(TargetOperation lro, SamplingFunctional sro, const int local_dimensions)
Dimensions ^ input rank for target operation (always in local chart if on a manifold, never ambient space)
Each target applies a different data transform, but the same to each neighbor.
#define compadre_assert_debug(condition)
compadre_assert_debug is used for assertions that are checked in loops, as these significantly impact...
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 V...
SamplingFunctional getPolynomialSamplingFunctional() const
Get the polynomial sampling functional specified at instantiation.
KOKKOS_INLINE_FUNCTION int getOutputDimensionOfOperation(TargetOperation lro, const int local_dimensions)
Dimensions ^ output rank for target operation.
#define compadre_assert_release(condition)
compadre_assert_release is used for assertions that should always be checked, but generally are not e...
Creates 1D subviews of data from a 2D view, generally constructed with CreateNDSliceOnDeviceView.
host_managed_local_index_type getPolynomialCoefficientsMemorySize() const
Returns 2D array size in memory on which coefficients are stored.
constexpr SamplingFunctional VectorPointSample
Point evaluations of the entire vector source function.
KOKKOS_INLINE_FUNCTION int calculateBasisMultiplier(const ReconstructionSpace rs, const int local_dimensions)
Calculate basis_multiplier.