32 template <
unsigned int dim>
36 std::shared_ptr<BulkIntegral> bulk_integral = std::make_shared<BulkIntegral>(shared_from_this(), dim);
42 template <
unsigned int dim>
46 unsigned int old_data_size=this->
size(dim), new_data_size;
50 std::shared_ptr<EdgeIntegral> edge_integral = std::make_shared<EdgeIntegral>(shared_from_this(), dim, n_side_permutations, points_per_side);
51 unsigned int*** perm_indices = edge_integral->perm_indices_;
54 for (
unsigned int i=0; i<dim+1; ++i) {
59 new_data_size = this->
size(dim);
60 unsigned int i_data=old_data_size;
61 for (
unsigned int i_side=0; i_side<dim+1; ++i_side) {
62 for (
unsigned int i_point=0; i_point<points_per_side; ++i_point) {
63 perm_indices[i_side][0][i_point] = i_data;
69 for (
unsigned int i_perm=1; i_perm<n_side_permutations; ++i_perm) {
70 for (
unsigned int i_side=0; i_side<dim+1; ++i_side) {
73 for (
unsigned int i_point=0; i_point<quad_points.size(); ++i_point) {
74 perm_indices[i_side][i_perm][i_point] =
dim_eval_points_[dim-1].find_permute_point<dim>( quad_points.vec<dim>(i_point), old_data_size, new_data_size );
82 template <
unsigned int dim>
86 std::shared_ptr<BulkIntegral> bulk_integral = this->
add_bulk<dim-1>(quad);
87 std::shared_ptr<EdgeIntegral> edge_integral = this->add_edge<dim>(quad);
88 return std::make_shared<CouplingIntegral>(edge_integral, bulk_integral);
91 template <
unsigned int dim>
94 return std::make_shared<BoundaryIntegral>(this->add_edge<dim>(quad));
98 : local_points_(dim), n_subsets_(0), dim_(dim)
104 template <
unsigned int dim>
108 for (
unsigned int i=0; i<quad_points.
size(); ++i) {
113 template <
unsigned int dim>
115 for (
unsigned int loc_idx=data_begin; loc_idx<data_end; ++loc_idx) {
117 if ( arma::norm(coords-
local_points_.
vec<dim>(loc_idx), 2) < 4*std::numeric_limits<double>::epsilon() )
return loc_idx;
132 template std::shared_ptr<BulkIntegral> EvalPoints::add_bulk<1>(
const Quadrature &);
133 template std::shared_ptr<BulkIntegral> EvalPoints::add_bulk<2>(
const Quadrature &);
134 template std::shared_ptr<BulkIntegral> EvalPoints::add_bulk<3>(
const Quadrature &);
135 template std::shared_ptr<EdgeIntegral> EvalPoints::add_edge<1>(
const Quadrature &);
136 template std::shared_ptr<EdgeIntegral> EvalPoints::add_edge<2>(
const Quadrature &);
137 template std::shared_ptr<EdgeIntegral> EvalPoints::add_edge<3>(
const Quadrature &);
138 template std::shared_ptr<CouplingIntegral> EvalPoints::add_coupling<2>(
const Quadrature &);
139 template std::shared_ptr<CouplingIntegral> EvalPoints::add_coupling<3>(
const Quadrature &);
140 template std::shared_ptr<BoundaryIntegral> EvalPoints::add_boundary<1>(
const Quadrature &);
141 template std::shared_ptr<BoundaryIntegral> EvalPoints::add_boundary<2>(
const Quadrature &);
142 template std::shared_ptr<BoundaryIntegral> EvalPoints::add_boundary<3>(
const Quadrature &);
146 template unsigned int EvalPoints::DimEvalPoints::find_permute_point<1>(
arma::vec,
unsigned int,
unsigned int);
147 template unsigned int EvalPoints::DimEvalPoints::find_permute_point<2>(
arma::vec,
unsigned int,
unsigned int);
148 template unsigned int EvalPoints::DimEvalPoints::find_permute_point<3>(
arma::vec,
unsigned int,
unsigned int);
static constexpr unsigned int max_subsets
Maximal number of hold subsets.
std::shared_ptr< BulkIntegral > add_bulk(const Quadrature &)
Armor::Array< double > local_points_
Local coords of points vector.
unsigned int size() const
unsigned int n_subsets_
Number of subset.
const Armor::Array< double > & get_points() const
Return a reference to the whole array of quadrature points.
Quadrature make_from_side(unsigned int sid, unsigned int pid) const
static const unsigned int max_subset_points
Maximal average number of points hold in subset.
DimEvalPoints(unsigned int dim)
Constructor.
#define ASSERT(expr)
Allow use shorter versions of macro names if these names is not used with external library...
ArmaVec< Type, nr > vec(uint mat_index) const
static const unsigned int undefined_dim
Undefined dimension of new (empty) object.
Base class for quadrature rules on simplices in arbitrary dimensions.
std::shared_ptr< EdgeIntegral > add_edge(const Quadrature &)
The same as add_bulk but for edge points on sides.
std::array< DimEvalPoints, 3 > dim_eval_points_
Sub objects of dimensions 1,2,3.
std::shared_ptr< CouplingIntegral > add_coupling(const Quadrature &)
The same as add_bulk but for points between side points of element of dim and bulk points of element ...
unsigned int find_permute_point(arma::vec coords, unsigned int data_begin, unsigned int data_end)
Find position of local point (coords) in subvector of local points given by limits <data_begin...
Basic definitions of numerical quadrature rules.
ArrayMatSet set(uint index)
unsigned int size() const
Return size of evaluation points object (number of points).
unsigned int size(unsigned int dim) const
Return size of evaluation points object (number of points).
void add_local_points(const Armor::Array< double > &quad_points)
Adds set of local point to local_points_ (bulk or side of given permutation).
Class RefElement defines numbering of vertices, sides, calculation of normal vectors etc...
std::shared_ptr< BoundaryIntegral > add_boundary(const Quadrature &)
The same as add_bulk but for edge points on boundary sides.
std::array< int, EvalPoints::max_subsets+1 > subset_starts_
Indices of subsets data in local_points_ vector, used size is n_subsets_ + 1.
unsigned int size() const
Returns number of quadrature points.
void add_subset()
Adds new subset and its end size to subset_starts_ array.
#define ASSERT_EQ(a, b)
Definition of comparative assert macro (EQual)
#define ASSERT_LT_DBG(a, b)
Definition of comparative assert macro (Less Than) only for debug mode.