32 template <
unsigned int dim>
35 return get_bulk_integral<dim>(quad);
38 template <
unsigned int dim>
41 return get_edge_integral<dim>(quad);;
44 template <
unsigned int dim>
48 std::shared_ptr<BulkIntegral> bulk_integral = this->
get_bulk_integral<dim-1>(quad);
49 DebugOut() <<
"coupling bulk subset" << bulk_integral->get_subset_idx();
50 std::shared_ptr<EdgeIntegral> edge_integral = this->get_edge_integral<dim>(quad);
51 DebugOut() <<
"coupling edge subset" << edge_integral->get_subset_idx();
52 return std::make_shared<CouplingIntegral>(edge_integral, bulk_integral);
55 template <
unsigned int dim>
59 std::shared_ptr<BulkIntegral> bulk_integral = this->
get_bulk_integral<dim-1>(quad);
60 DebugOut() <<
"boundary bulk subset: " << bulk_integral->get_subset_idx()
61 <<
"begin: " <<
subset_begin(dim-1, bulk_integral->get_subset_idx());
62 std::shared_ptr<EdgeIntegral> edge_integral = this->get_edge_integral<dim>(quad);
63 DebugOut() <<
"boundary edge subset" << edge_integral->get_subset_idx();
64 return std::make_shared<BoundaryIntegral>(edge_integral, bulk_integral);
67 template <
unsigned int dim>
74 bulk_integrals_[dim] = std::make_shared<BulkIntegral>(shared_from_this(), dim, i_subset);
81 std::shared_ptr<BulkIntegral> EvalPoints::get_bulk_integral<0>(
const Quadrature &quad)
87 bulk_integrals_[0] = std::make_shared<BulkIntegral>(shared_from_this(), 0, i_subset);
93 template <
unsigned int dim>
98 for (
unsigned int i=0; i<dim+1; ++i) {
103 edge_integrals_[dim-1] = std::make_shared<EdgeIntegral>(shared_from_this(), dim, i_subset);
110 : local_points_(dim), n_subsets_(0), dim_(dim)
116 template <
unsigned int dim>
118 ASSERT_GT(dim, 0).error(
"Dimension 0 not supported!\n");
119 unsigned int local_points_old_size = local_points_.size();
120 local_points_.resize(quad_points.
size() + local_points_old_size);
121 for (
unsigned int i=0; i<quad_points.
size(); ++i) {
124 local_points_.set(i+local_points_old_size) = quad_points.
vec<dim>(i);
133 subset_starts_[n_subsets_] = this->
size();
134 return n_subsets_ - 1;
138 template std::shared_ptr<BulkIntegral> EvalPoints::add_bulk<0>(
const Quadrature &);
139 template std::shared_ptr<BulkIntegral> EvalPoints::add_bulk<1>(
const Quadrature &);
140 template std::shared_ptr<BulkIntegral> EvalPoints::add_bulk<2>(
const Quadrature &);
141 template std::shared_ptr<BulkIntegral> EvalPoints::add_bulk<3>(
const Quadrature &);
142 template std::shared_ptr<EdgeIntegral> EvalPoints::add_edge<1>(
const Quadrature &);
143 template std::shared_ptr<EdgeIntegral> EvalPoints::add_edge<2>(
const Quadrature &);
144 template std::shared_ptr<EdgeIntegral> EvalPoints::add_edge<3>(
const Quadrature &);
145 template std::shared_ptr<CouplingIntegral> EvalPoints::add_coupling<2>(
const Quadrature &);
146 template std::shared_ptr<CouplingIntegral> EvalPoints::add_coupling<3>(
const Quadrature &);
147 template std::shared_ptr<BoundaryIntegral> EvalPoints::add_boundary<1>(
const Quadrature &);
148 template std::shared_ptr<BoundaryIntegral> EvalPoints::add_boundary<2>(
const Quadrature &);
149 template std::shared_ptr<BoundaryIntegral> EvalPoints::add_boundary<3>(
const Quadrature &);
150 template std::shared_ptr<BulkIntegral> EvalPoints::get_bulk_integral<0>(
const Quadrature &);
151 template std::shared_ptr<BulkIntegral> EvalPoints::get_bulk_integral<1>(
const Quadrature &);
152 template std::shared_ptr<BulkIntegral> EvalPoints::get_bulk_integral<2>(
const Quadrature &);
153 template std::shared_ptr<BulkIntegral> EvalPoints::get_bulk_integral<3>(
const Quadrature &);
154 template std::shared_ptr<EdgeIntegral> EvalPoints::get_edge_integral<1>(
const Quadrature &);
155 template std::shared_ptr<EdgeIntegral> EvalPoints::get_edge_integral<2>(
const Quadrature &);
156 template std::shared_ptr<EdgeIntegral> EvalPoints::get_edge_integral<3>(
const Quadrature &);
#define ASSERT_LT(a, b)
Definition of comparative assert macro (Less Than) only for debug mode.
#define ASSERT_EQ(a, b)
Definition of comparative assert macro (EQual) only for debug mode.
#define ASSERT_GT(a, b)
Definition of comparative assert macro (Greater Than) only for debug mode.
ArmaVec< Type, nr > vec(uint mat_index) const
unsigned int size() const
Subobject holds evaluation points data of one dimension (0,1,2,3)
std::array< int, EvalPoints::max_subsets+1 > subset_starts_
Indices of subsets data in local_points_ vector, used size is n_subsets_ + 1.
DimEvalPoints(unsigned int dim)
Constructor.
uint add_subset()
Adds new subset and its end size to subset_starts_ array.
Armor::Array< double > local_points_
Local coords of points vector.
void add_local_points(const Armor::Array< double > &quad_points)
Adds set of local point to local_points_ (bulk or side).
std::shared_ptr< BulkIntegral > get_bulk_integral(const Quadrature &quad)
Create BulkIntegral of appropriate dimension if doesn't exist and return its.
int subset_begin(unsigned int dim, unsigned int idx) const
Return begin index of appropriate subset data.
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 ...
static const unsigned int undefined_dim
Undefined dimension of new (empty) object.
unsigned int size(unsigned int dim) const
Return size of evaluation points object (number of points).
std::shared_ptr< BoundaryIntegral > add_boundary(const Quadrature &)
The same as add_bulk but for edge points on boundary sides.
std::array< std::shared_ptr< EdgeIntegral >, 3 > edge_integrals_
EdgeIntegral objects of dimension 1,2,3.
static const unsigned int max_subset_points
Maximal average number of points hold in subset.
std::shared_ptr< BulkIntegral > add_bulk(const Quadrature &)
std::array< std::shared_ptr< BulkIntegral >, 4 > bulk_integrals_
BulkIntegral objects of dimension 0,1,2,3.
std::shared_ptr< EdgeIntegral > add_edge(const Quadrature &)
The same as add_bulk but for edge points on sides.
std::array< DimEvalPoints, 4 > dim_eval_points_
Sub objects of dimensions 0,1,2,3.
static constexpr unsigned int max_subsets
Maximal number of hold subsets.
std::shared_ptr< EdgeIntegral > get_edge_integral(const Quadrature &quad)
Create EdgeIntegral of appropriate dimension if doesn't exist and return its.
Base class for quadrature rules on simplices in arbitrary dimensions.
Quadrature make_from_side(unsigned int sid) const
const Armor::Array< double > & get_points() const
Return a reference to the whole array of quadrature points.
#define DebugOut()
Macro defining 'debug' record of log.
Basic definitions of numerical quadrature rules.
Class RefElement defines numbering of vertices, sides, calculation of normal vectors etc.