9 #ifndef _COMPADRE_FUNCTORS_HPP_
10 #define _COMPADRE_FUNCTORS_HPP_
20 #include "KokkosBatched_Gemm_Decl.hpp"
122 KOKKOS_INLINE_FUNCTION
125 const int local_index = teamMember.league_rank();
150 KOKKOS_INLINE_FUNCTION
156 const int local_index = teamMember.league_rank();
187 KOKKOS_INLINE_FUNCTION
195 const int local_index = teamMember.league_rank();
211 dimensions-1, dimensions);
216 for (
int j = 0; j < delta.extent_int(0); ++j) {
219 for (
int j = 0; j < thread_workspace.extent_int(0); ++j) {
220 thread_workspace(j) = 0;
232 dimensions, dimensions);
242 Kokkos::single(Kokkos::PerTeam(teamMember), [&] () {
243 Kokkos::single(Kokkos::PerThread(teamMember), [&] () {
249 Kokkos::single(Kokkos::PerTeam(teamMember), [&] () {
250 Kokkos::single(Kokkos::PerThread(teamMember), [&] () {
251 for (
int j=0; j<dimensions; ++j) {
252 for (
int k=0; k<dimensions-1; ++k) {
260 &&
"StaggeredEdgeIntegralSample prestencil weight only written for manifolds.");
261 Kokkos::parallel_for(Kokkos::TeamThreadRange(teamMember,
263 Kokkos::single(Kokkos::PerThread(teamMember), [&] () {
265 XYZ tangent_quadrature_coord_2d;
266 for (
int j=0; j<dimensions-1; ++j) {
270 double tangent_vector[3];
271 tangent_vector[0] = tangent_quadrature_coord_2d[0]*T(0,0) + tangent_quadrature_coord_2d[1]*T(1,0);
272 tangent_vector[1] = tangent_quadrature_coord_2d[0]*T(0,1) + tangent_quadrature_coord_2d[1]*T(1,1);
273 tangent_vector[2] = tangent_quadrature_coord_2d[0]*T(0,2) + tangent_quadrature_coord_2d[1]*T(1,2);
275 for (
int j=0; j<dimensions; ++j) {
284 Kokkos::parallel_for(Kokkos::TeamThreadRange(teamMember,
287 Kokkos::single(Kokkos::PerThread(teamMember), [&] () {
294 double grad_xi1 = 0, grad_xi2 = 0;
295 Kokkos::parallel_reduce(Kokkos::ThreadVectorRange(teamMember,
299 alpha_ij += delta(l)*Q(l,i);
302 double normal_coordinate = rel_coord[dimensions-1];
305 t_grad_xi1 += alpha_ij * normal_coordinate;
309 Kokkos::single(Kokkos::PerThread(teamMember), [&] () {
315 Kokkos::parallel_reduce(Kokkos::ThreadVectorRange(teamMember,
319 alpha_ij += delta(l)*Q(l,i);
322 double normal_coordinate = rel_coord[dimensions-1];
325 if (dimensions>2) t_grad_xi2 += alpha_ij * normal_coordinate;
330 teamMember.team_barrier();
332 Kokkos::parallel_for(Kokkos::TeamThreadRange(teamMember,
335 Kokkos::single(Kokkos::PerThread(teamMember), [&] () {
336 for (
int j=0; j<dimensions; ++j) {
337 tangent(0,j) = t1(m)*T(dimensions-1,j) + T(0,j);
338 tangent(1,j) = t2(m)*T(dimensions-1,j) + T(1,j);
343 for (
int j=0; j<dimensions; ++j) {
344 norm += tangent(0,j)*tangent(0,j);
348 norm = std::sqrt(norm);
349 for (
int j=0; j<dimensions; ++j) {
350 tangent(0,j) /= norm;
354 if (dimensions-1 == 2) {
355 double dot_product = tangent(0,0)*tangent(1,0)
356 + tangent(0,1)*tangent(1,1)
357 + tangent(0,2)*tangent(1,2);
358 for (
int j=0; j<dimensions; ++j) {
359 tangent(1,j) -= dot_product*tangent(0,j);
363 for (
int j=0; j<dimensions; ++j) {
364 norm += tangent(1,j)*tangent(1,j);
366 norm = std::sqrt(norm);
367 for (
int j=0; j<dimensions; ++j) {
368 tangent(1,j) /= norm;
373 for (
int j=0; j<dimensions; ++j) {
374 for (
int k=0; k<dimensions-1; ++k) {
381 teamMember.team_barrier();
392 KOKKOS_INLINE_FUNCTION
400 const int local_index = teamMember.league_rank();
434 double * rhs_data = RHS.data();
435 Kokkos::parallel_for(Kokkos::TeamVectorRange(teamMember, this_num_rows), [&] (
const int i) {
436 rhs_data[i] = std::sqrt(w(i));
444 KokkosBatched::TeamVectorGemm<member_type,KokkosBatched::Trans::Transpose,KokkosBatched::Trans::NoTranspose,KokkosBatched::Algo::Gemm::Unblocked>
451 teamMember.team_barrier();
454 Kokkos::parallel_for(Kokkos::TeamThreadRange(teamMember,
_data.
max_num_rows), [&] (
const int i) {
456 PsqrtW(i,j) = PsqrtW(i,j)*std::sqrt(w(i));
459 teamMember.team_barrier();
476 teamMember.team_barrier();
493 KOKKOS_INLINE_FUNCTION
500 const int target_index = _data._initial_index_for_batch + teamMember.league_rank();
501 const int local_index = teamMember.league_rank();
502 const int dimensions = _data._dimensions;
510 _data.P_dim_0, _data.P_dim_1);
516 dimensions, dimensions);
519 dimensions, dimensions);
523 _data.this_num_cols);
524 scratch_vector_type thread_workspace(teamMember.thread_scratch(_data._pm.getThreadScratchLevel(0)),
525 _data.thread_workspace_dim);
535 KokkosBatched::TeamVectorGemm<member_type,KokkosBatched::Trans::Transpose,KokkosBatched::Trans::NoTranspose,KokkosBatched::Algo::Gemm::Unblocked>
542 teamMember.team_barrier();
546 const_cast<pool_type&>(_random_number_pool));
548 teamMember.team_barrier();
559 KOKKOS_INLINE_FUNCTION
566 const int target_index = _data._initial_index_for_batch + teamMember.league_rank();
567 const int local_index = teamMember.league_rank();
568 const int this_num_neighbors = _data._pc._nla.getNumberOfNeighborsDevice(target_index);
576 _data.P_dim_0, _data.P_dim_1);
579 _data.RHS_dim_0, _data.RHS_dim_1);
584 _data._dimensions, _data._dimensions);
588 _data.this_num_cols);
589 scratch_vector_type thread_workspace(teamMember.thread_scratch(_data._pm.getThreadScratchLevel(0)),
590 _data.thread_workspace_dim);
598 _data._dimensions-1,
false , &T);
604 double * rhs_data = RHS.data();
605 Kokkos::parallel_for(Kokkos::TeamVectorRange(teamMember, this_num_neighbors), [&] (
const int i) {
606 rhs_data[i] = std::sqrt(w(i));
613 _data.RHS_dim_0, _data.RHS_dim_1);
615 KokkosBatched::TeamVectorGemm<
member_type,KokkosBatched::Trans::Transpose,
616 KokkosBatched::Trans::NoTranspose,KokkosBatched::Algo::Gemm::Unblocked>
623 teamMember.team_barrier();
626 Kokkos::parallel_for(Kokkos::TeamThreadRange(teamMember, this_num_neighbors), [&] (
const int i) {
627 for (
int j=0; j < _data.manifold_NP; j++) {
628 CurvaturePsqrtW(i, j) = CurvaturePsqrtW(i, j)*std::sqrt(w(i));
632 teamMember.team_barrier();
643 KOKKOS_INLINE_FUNCTION
650 const int target_index = _data._initial_index_for_batch + teamMember.league_rank();
651 const int local_index = teamMember.league_rank();
652 auto dimensions = _data._dimensions;
660 _data.Coeffs_dim_0, _data.Coeffs_dim_1);
663 dimensions, dimensions);
665 +
TO_GLOBAL(local_index)*
TO_GLOBAL(_data.P_target_row_dim_0*_data.P_target_row_dim_1),
666 _data.P_target_row_dim_0, _data.P_target_row_dim_1);
668 scratch_vector_type manifold_gradient(teamMember.team_scratch(_data._pm.getTeamScratchLevel(1)),
669 _data.manifold_gradient_dim);
673 _data.this_num_cols);
674 scratch_vector_type thread_workspace(teamMember.thread_scratch(_data._pm.getThreadScratchLevel(0)),
675 _data.thread_workspace_dim);
687 teamMember.team_barrier();
689 double grad_xi1 = 0, grad_xi2 = 0;
690 for (
int i=0; i<_data._pc._nla.getNumberOfNeighborsDevice(target_index); ++i) {
691 for (
int k=0; k<dimensions-1; ++k) {
693 int offset = _data._d_ss.getTargetOffsetIndex(0, 0, k, 0);
694 Kokkos::parallel_reduce(Kokkos::TeamThreadRange(teamMember,
695 _data.manifold_NP), [&] (
const int l,
double &talpha_ij) {
696 Kokkos::single(Kokkos::PerThread(teamMember), [&] () {
697 talpha_ij += P_target_row(offset,l)*Q(l,i);
700 teamMember.team_barrier();
701 Kokkos::single(Kokkos::PerTeam(teamMember), [&] () {
703 manifold_gradient(i*(dimensions-1) + k) = alpha_ij;
706 teamMember.team_barrier();
708 XYZ rel_coord = _data._pc.getRelativeCoord(target_index, i, dimensions, &T);
709 double normal_coordinate = rel_coord[dimensions-1];
712 grad_xi1 += manifold_gradient(i*(dimensions-1)) * normal_coordinate;
713 if (dimensions>2) grad_xi2 += manifold_gradient(i*(dimensions-1)+1) * normal_coordinate;
714 teamMember.team_barrier();
718 Kokkos::single(Kokkos::PerTeam(teamMember), [&] () {
720 double grad_xi[2] = {grad_xi1, grad_xi2};
724 for (
int i=0; i<dimensions-1; ++i) {
725 for (
int j=0; j<dimensions; ++j) {
729 for (
int j=0; j<dimensions; ++j) {
730 T(i,j) = grad_xi[i]*T(dimensions-1,j);
737 for (
int j=0; j<dimensions; ++j) {
738 norm += T(0,j)*T(0,j);
742 norm = std::sqrt(norm);
743 for (
int j=0; j<dimensions; ++j) {
748 if (dimensions-1 == 2) {
749 double dot_product = T(0,0)*T(1,0) + T(0,1)*T(1,1) + T(0,2)*T(1,2);
750 for (
int j=0; j<dimensions; ++j) {
751 T(1,j) -= dot_product*T(0,j);
755 for (
int j=0; j<dimensions; ++j) {
756 norm += T(1,j)*T(1,j);
758 norm = std::sqrt(norm);
759 for (
int j=0; j<dimensions; ++j) {
765 double norm_t_normal = 0;
767 T(dimensions-1,0) = T(0,1)*T(1,2) - T(1,1)*T(0,2);
768 norm_t_normal += T(dimensions-1,0)*T(dimensions-1,0);
769 T(dimensions-1,1) = -(T(0,0)*T(1,2) - T(1,0)*T(0,2));
770 norm_t_normal += T(dimensions-1,1)*T(dimensions-1,1);
771 T(dimensions-1,2) = T(0,0)*T(1,1) - T(1,0)*T(0,1);
772 norm_t_normal += T(dimensions-1,2)*T(dimensions-1,2);
774 T(dimensions-1,0) = T(1,1) - T(0,1);
775 norm_t_normal += T(dimensions-1,0)*T(dimensions-1,0);
776 T(dimensions-1,1) = T(0,0) - T(1,0);
777 norm_t_normal += T(dimensions-1,1)*T(dimensions-1,1);
779 norm_t_normal = std::sqrt(norm_t_normal);
780 for (
int i=0; i<dimensions-1; ++i) {
781 T(dimensions-1,i) /= norm_t_normal;
784 teamMember.team_barrier();
796 KOKKOS_INLINE_FUNCTION
803 const int target_index = _data._initial_index_for_batch + teamMember.league_rank();
804 auto dimensions = _data._dimensions;
816 Kokkos::single(Kokkos::PerTeam(teamMember), [&] () {
818 &&
"FixTangentDirectionOrder called on manifold with a dimension of 0.");
819 double dot_product = 0;
820 for (
int i=0; i<dimensions; ++i) {
821 dot_product += T(dimensions-1,i) * N(i);
824 if (dot_product < 0) {
826 for (
int i=0; i<dimensions; ++i) {
833 for (
int i=0; i<dimensions; ++i) {
835 T(dimensions-1,i) *= -1;
840 teamMember.team_barrier();
851 KOKKOS_INLINE_FUNCTION
858 const int target_index = _data._initial_index_for_batch + teamMember.league_rank();
859 const int local_index = teamMember.league_rank();
860 auto dimensions = _data._dimensions;
868 _data.Coeffs_dim_0, _data.Coeffs_dim_1);
872 dimensions, dimensions);
875 + target_index*
TO_GLOBAL(_data.manifold_NP), _data.manifold_NP);
878 +
TO_GLOBAL(local_index)*
TO_GLOBAL(_data.P_target_row_dim_0*_data.P_target_row_dim_1),
879 _data.P_target_row_dim_0, _data.P_target_row_dim_1);
884 _data.this_num_cols);
885 scratch_vector_type thread_workspace(teamMember.thread_scratch(_data._pm.getThreadScratchLevel(0)),
886 _data.thread_workspace_dim);
894 Kokkos::single(Kokkos::PerTeam(teamMember), [&] () {
895 for (
int j=0; j<_data.manifold_NP; ++j) {
896 manifold_coeffs(j) = 0;
899 teamMember.team_barrier();
900 for (
int i=0; i<_data._pc._nla.getNumberOfNeighborsDevice(target_index); ++i) {
901 XYZ rel_coord = _data._pc.getRelativeCoord(target_index, i, dimensions, &T);
902 double normal_coordinate = rel_coord[dimensions-1];
904 Kokkos::single(Kokkos::PerTeam(teamMember), [&] () {
905 Kokkos::single(Kokkos::PerTeam(teamMember), [&] () {
907 for (
int j=0; j<_data.manifold_NP; ++j) {
908 manifold_coeffs(j) += Q(j,i) * normal_coordinate;
912 teamMember.team_barrier();
924 KOKKOS_INLINE_FUNCTION
931 const int target_index = _data._initial_index_for_batch + teamMember.league_rank();
932 const int local_index = teamMember.league_rank();
933 auto dimensions = _data._dimensions;
934 const int this_num_rows = _data._sampling_multiplier*_data._pc._nla.getNumberOfNeighborsDevice(target_index);
942 _data.P_dim_0, _data.P_dim_1);
945 _data.RHS_dim_0, _data.RHS_dim_1);
953 _data.this_num_cols);
954 scratch_vector_type thread_workspace(teamMember.thread_scratch(_data._pm.getThreadScratchLevel(0)),
955 _data.thread_workspace_dim);
961 createWeightsAndP(_data, teamMember, delta, thread_workspace, PsqrtW, w, dimensions-1,
962 _data._poly_order,
true , &T, _data._reconstruction_space,
963 _data._polynomial_sampling_functional);
967 double * Q_data = Q.data();
968 Kokkos::parallel_for(Kokkos::TeamVectorRange(teamMember,this_num_rows), [&] (
const int i) {
969 Q_data[i] = std::sqrt(w(i));
976 _data.RHS_dim_0, _data.RHS_dim_1);
979 KokkosBatched::TeamVectorGemm<member_type,KokkosBatched::Trans::Transpose,KokkosBatched::Trans::NoTranspose,KokkosBatched::Algo::Gemm::Unblocked>
986 teamMember.team_barrier();
989 Kokkos::parallel_for(Kokkos::TeamThreadRange(teamMember, _data.max_num_rows), [&] (
const int i) {
990 Kokkos::parallel_for(Kokkos::ThreadVectorRange(teamMember, _data.this_num_cols), [&] (
const int j) {
991 PsqrtW(i, j) = PsqrtW(i, j)*std::sqrt(w(i));
995 teamMember.team_barrier();
1006 KOKKOS_INLINE_FUNCTION
1013 const int target_index = _data._initial_index_for_batch + teamMember.league_rank();
1014 const int local_index = teamMember.league_rank();
1015 auto dimensions = _data._dimensions;
1024 + target_index*
TO_GLOBAL(_data.manifold_NP), _data.manifold_NP);
1026 +
TO_GLOBAL(local_index)*
TO_GLOBAL(_data.P_target_row_dim_0*_data.P_target_row_dim_1),
1027 _data.P_target_row_dim_0, _data.P_target_row_dim_1);
1031 _data.this_num_cols);
1032 scratch_vector_type thread_workspace(teamMember.thread_scratch(_data._pm.getThreadScratchLevel(0)),
1033 _data.thread_workspace_dim);
KOKKOS_INLINE_FUNCTION void operator()(const member_type &teamMember) const
KOKKOS_INLINE_FUNCTION double getNeighborCoordinate(const int target_index, const int neighbor_list_num, const int dim, const scratch_matrix_right_type *V=NULL) const
Returns one component of the neighbor coordinate for a particular target.
KOKKOS_INLINE_FUNCTION int getTeamScratchLevel(const int level) const
Kokkos::View< double *****, layout_right > _prestencil_weights
ConstraintType
Constraint type.
KOKKOS_INLINE_FUNCTION int getNumberOfNeighborsDevice(int target_index) const
Get number of neighbors for a given target (device)
pool_type _random_number_pool
ComputePrestencilWeights(GMLSBasisData data)
Neumann Gradient Scalar Type.
Functor to evaluate curvature targets and apply to coefficients of curvature reconstruction.
ReconstructionSpace
Space in which to reconstruct polynomial.
KOKKOS_INLINE_FUNCTION void applyTargetsToCoefficients(const SolutionData &data, const member_type &teamMember, scratch_matrix_right_type Q, scratch_matrix_right_type P_target_row)
For applying the evaluations from a target functional to the polynomial coefficients.
EvaluateManifoldTargets(GMLSBasisData data)
constexpr SamplingFunctional ManifoldVectorPointSample
Point evaluations of the entire vector source function (but on a manifold, so it includes a transform...
team_policy::member_type member_type
WeightingFunctionType
Available weighting kernel function types.
Kokkos::View< double **, layout_right > _target_extra_data
SamplingFunctional _data_sampling_functional
KOKKOS_INLINE_FUNCTION void largestTwoEigenvectorsThreeByThreeSymmetric(const member_type &teamMember, scratch_matrix_right_type V, scratch_matrix_right_type PtP, const int dimensions, pool_type &random_number_pool)
Calculates two eigenvectors corresponding to two dominant eigenvalues.
AssembleStandardPsqrtW(GMLSBasisData data)
int _data_sampling_multiplier
Functor to assemble the P*sqrt(weights) matrix and construct sqrt(weights)*Identity.
ApplyTargets(GMLSSolutionData data)
int _dimension_of_quadrature_points
FixTangentDirectionOrdering(GMLSBasisData data)
Functor to evaluate curvature targets and construct accurate tangent direction approximation for mani...
constexpr SamplingFunctional VaryingManifoldVectorPointSample
For integrating polynomial dotted with normal over an edge.
KOKKOS_INLINE_FUNCTION void computeTargetFunctionals(const TargetData &data, const member_type &teamMember, scratch_vector_type delta, scratch_vector_type thread_workspace, scratch_matrix_right_type P_target_row)
Evaluates a polynomial basis with a target functional applied to each member of the basis...
GMLS::point_connections_type _pc
WeightingFunctionType _curvature_weighting_type
Kokkos::View< TargetOperation * > _curvature_support_operations
DenseSolverType
Dense solver type.
Functor to evaluate targets operations on the basis.
KOKKOS_INLINE_FUNCTION double getWeight(const int index) const
constexpr SamplingFunctional StaggeredEdgeAnalyticGradientIntegralSample
Analytical integral of a gradient source vector is just a difference of the scalar source at neighbor...
KOKKOS_INLINE_FUNCTION void operator()(const member_type &teamMember) const
KOKKOS_INLINE_FUNCTION void computeTargetFunctionalsOnManifold(const TargetData &data, const member_type &teamMember, scratch_vector_type delta, scratch_vector_type thread_workspace, scratch_matrix_right_type P_target_row, scratch_matrix_right_type V, scratch_vector_type curvature_coefficients)
Evaluates a polynomial basis with a target functional applied, using information from the manifold cu...
GMLS::point_connections_type _additional_pc
Kokkos::View< int * > number_of_neighbors_list
KOKKOS_INLINE_FUNCTION double getTargetCoordinate(const int target_index, const int dim, const scratch_matrix_right_type *V=NULL) const
Returns one component of the target coordinate for a particular target.
KOKKOS_INLINE_FUNCTION double getSite(const int index, const int component) const
int _initial_index_for_batch
GetAccurateTangentDirections(GMLSBasisData data)
KOKKOS_INLINE_FUNCTION void calcGradientPij(const BasisData &data, const member_type &teamMember, double *delta, double *thread_workspace, const int target_index, int neighbor_index, const double alpha, const int partial_direction, const int dimension, const int poly_order, bool specific_order_only, const scratch_matrix_right_type *V, const ReconstructionSpace reconstruction_space, const SamplingFunctional polynomial_sampling_functional, const int evaluation_site_local_index=0)
Evaluates the gradient of a polynomial basis under the Dirac Delta (pointwise) sampling function...
int _initial_index_for_batch
double * P_target_row_data
Kokkos::View< TargetOperation * > _operations
KOKKOS_INLINE_FUNCTION void operator()(const member_type &teamMember) const
Solve GMLS problem on a manifold (will use QR or SVD to solve the resultant GMLS problem dependent on...
ComputeCoarseTangentPlane(GMLSBasisData data)
KOKKOS_INLINE_FUNCTION void operator()(const member_type &teamMember) const
Kokkos::View< double * > _epsilons
Functor to evaluate targets on a manifold.
#define TO_GLOBAL(variable)
KOKKOS_INLINE_FUNCTION void operator()(const member_type &teamMember) const
KOKKOS_INLINE_FUNCTION void operator()(const member_type &teamMember) const
Functor to assemble the P*sqrt(weights) matrix and construct sqrt(weights)*Identity.
constexpr SamplingFunctional StaggeredEdgeIntegralSample
Samples consist of the result of integrals of a vector dotted with the tangent along edges between ne...
LU factorization performed on P^T*W*P matrix.
SolutionSet< device_memory_space > _d_ss
KOKKOS_INLINE_FUNCTION XYZ getRelativeCoord(const int target_index, const int neighbor_list_num, const int dimension, const scratch_matrix_right_type *V=NULL) const
Returns the relative coordinate as a vector between the target site and the neighbor site...
KOKKOS_INLINE_FUNCTION void computeCurvatureFunctionals(const TargetData &data, const member_type &teamMember, scratch_vector_type delta, scratch_vector_type thread_workspace, scratch_matrix_right_type P_target_row, const scratch_matrix_right_type *V, const local_index_type local_neighbor_index=-1)
Evaluates a polynomial basis for the curvature with a gradient target functional applied.
Kokkos::View< int * > additional_number_of_neighbors_list
Kokkos::View< double **, layout_right, Kokkos::MemoryTraits< Kokkos::Unmanaged > > scratch_matrix_right_type
Kokkos::View< double *, Kokkos::MemoryTraits< Kokkos::Unmanaged > > scratch_vector_type
ConstraintType _constraint_type
Scalar polynomial basis centered at the target site and scaled by sum of basis powers e...
int _order_of_quadrature_points
int _curvature_weighting_n
EvaluateStandardTargets(GMLSBasisData data)
ApplyCurvatureTargets(GMLSBasisData data)
double * P_target_row_data
int _curvature_poly_order
DenseSolverType _dense_solver_type
int _reconstruction_space_rank
ProblemType
Problem type, that optionally can handle manifolds.
AssembleManifoldPsqrtW(GMLSBasisData data)
int _curvature_weighting_p
KOKKOS_INLINE_FUNCTION void operator()(const member_type &teamMember) const
SolutionSet< device_memory_space > _d_ss
KOKKOS_INLINE_FUNCTION void createWeightsAndP(const BasisData &data, const member_type &teamMember, scratch_vector_type delta, scratch_vector_type thread_workspace, scratch_matrix_right_type P, scratch_vector_type w, const int dimension, int polynomial_order, bool weight_p=false, scratch_matrix_right_type *V=NULL, const ReconstructionSpace reconstruction_space=ReconstructionSpace::ScalarTaylorPolynomial, const SamplingFunctional polynomial_sampling_functional=PointSample)
Fills the _P matrix with either P or P*sqrt(w)
Functor to calculate prestencil weights to apply to data to transform into a format expected by a GML...
Functor to assemble the P*sqrt(weights) matrix and construct sqrt(weights)*Identity for curvature...
Functor to determine if tangent directions need reordered, and to reorder them if needed We require t...
ProblemType _problem_type
double * manifold_curvature_coefficients_data
KOKKOS_INLINE_FUNCTION void createWeightsAndPForCurvature(const BasisData &data, const member_type &teamMember, scratch_vector_type delta, scratch_vector_type thread_workspace, scratch_matrix_right_type P, scratch_vector_type w, const int dimension, bool only_specific_order, scratch_matrix_right_type *V=NULL)
Fills the _P matrix with P*sqrt(w) for use in solving for curvature.
KOKKOS_INLINE_FUNCTION int getNumberOfQuadraturePoints() const
AssembleCurvaturePsqrtW(GMLSBasisData data)
Kokkos::Random_XorShift64_Pool pool_type
KOKKOS_INLINE_FUNCTION void operator()(const member_type &teamMember) const
constexpr SamplingFunctional PointSample
Available sampling functionals.
ReconstructionSpace _reconstruction_space
KOKKOS_INLINE_FUNCTION void operator()(const member_type &teamMember) const
SamplingFunctional _polynomial_sampling_functional
Functor to apply target evaluation to polynomial coefficients to store in _alphas.
KOKKOS_INLINE_FUNCTION void evaluateConstraints(scratch_matrix_right_type M, scratch_matrix_right_type PsqrtW, const ConstraintType constraint_type, const ReconstructionSpace reconstruction_space, const int NP, const double cutoff_p, const int dimension, const int num_neighbors=0, scratch_matrix_right_type *T=NULL)
Functor to create a coarse tangent approximation from a given neighborhood of points.
Kokkos::View< double **, layout_right > _source_extra_data
int manifold_gradient_dim
KOKKOS_INLINE_FUNCTION void operator()(const member_type &teamMember) const
KOKKOS_INLINE_FUNCTION void operator()(const member_type &teamMember) const
#define compadre_kernel_assert_debug(condition)
WeightingFunctionType _weighting_type
KOKKOS_INLINE_FUNCTION int getThreadScratchLevel(const int level) const