30 #ifndef CORE_BASIS_PRISMSAMPLINGSCHEMES_H
31 #define CORE_BASIS_PRISMSAMPLINGSCHEMES_H 1
46 template <
class ARRAY1,
class ARRAY2>
49 typedef typename ARRAY1::value_type coords_type;
50 if (order == 1 || order == 0)
52 const double gaussian_weights[1] = {1.0};
53 const double gaussian_coords[1][3] = {{1./3.,1./3., 0.5}};
54 const unsigned int num_coords = 3;
55 const unsigned int num_points = 1;
57 coords.resize(num_points);
58 weights.resize(num_points);
59 for (
unsigned int i=0; i<num_points; i++)
61 coords[i].resize(num_coords);
62 for (
unsigned int j=0; j<num_coords; j++)
63 coords[i][j] = static_cast<typename coords_type::value_type>(gaussian_coords[i][j]);
64 weights[i] =
static_cast<typename ARRAY2::value_type
>(gaussian_weights[i]);
69 const double gaussian_weights[6] = {1./6., 1./6., 1./6.,
71 const double gaussian_coords[6][3] = {
72 {1./6.,1./6., 0.211324865405}, {2./3.,1./6., 0.211324865405},
73 {1./6.,2./3., 0.211324865405}, {1./6.,1./6., 0.788675134595},
74 {2./3.,1./6., 0.788675134595}, {1./6.,2./3., 0.788675134595}};
75 const unsigned int num_coords = 3;
76 const unsigned int num_points = 6;
78 coords.resize(num_points);
79 weights.resize(num_points);
80 for (
unsigned int i=0; i<num_points; i++)
82 coords[i].resize(num_coords);
83 for (
unsigned int j=0; j<num_coords; j++)
84 coords[i][j] = static_cast<typename coords_type::value_type>(gaussian_coords[i][j]);
85 weights[i] =
static_cast<typename ARRAY2::value_type
>(gaussian_weights[i]);
98 template <
class ARRAY1,
class ARRAY2>
101 typedef typename ARRAY1::value_type coords_type;
void get_regular_scheme(ARRAY1 &coords, ARRAY2 &weights, int)
Definition: PrismSamplingSchemes.h:99
#define SCISHARE
Definition: share.h:39
Utility for specifying data invariants (Assertions)
void get_gaussian_scheme(ARRAY1 &coords, ARRAY2 &weights, int order)
Definition: PrismSamplingSchemes.h:47
#define REPORT_NOT_IMPLEMENTED(message)
Definition: Exception.h:106
Definition: PrismSamplingSchemes.h:42