19 #ifndef EVAL_SUBSET_HH_ 20 #define EVAL_SUBSET_HH_ 104 :
PointBase(elm_cache_map, cache_pos.i_ep_) {
133 :
PointBase(elm_cache_map, local_point_idx), side_idx_(cell_side.side_idx()),
134 permutation_idx_( cell_side.element()->permutation_idx( side_idx_ ) ) {
140 return permutation_idx_;
162 :
SidePoint(cell_side, elm_cache_map, local_point_idx), integral_(edge_integral) {}
173 inline unsigned int eval_point_idx()
const;
192 :
SidePoint(cell_side, elm_cache_map, local_point_idx), integral_(coupling_integral) {}
198 inline unsigned int eval_point_idx()
const;
221 :
SidePoint(cell_side, elm_cache_map, local_point_idx), integral_(bdr_integral) {}
227 inline unsigned int eval_point_idx()
const;
251 : eval_points_(eval_points), dim_(dim) {}
262 unsigned int dim()
const {
282 :
BaseIntegral(eval_points, dim), subset_index_(eval_points->n_subsets(dim)) {}
289 return subset_index_;
294 auto bgn_it = make_iter<BulkPoint>(
BulkPoint(elm_cache_map,
PatchCacheLoc(element_patch_idx, eval_points_->subset_begin(dim_, subset_index_)) ));
295 auto end_it = make_iter<BulkPoint>(
BulkPoint(elm_cache_map,
PatchCacheLoc(element_patch_idx, eval_points_->subset_end(dim_, subset_index_)) ));
313 EdgeIntegral(std::shared_ptr<EvalPoints>
eval_points,
unsigned int dim,
unsigned int n_permutations,
unsigned int points_per_side);
325 return subset_index_;
330 unsigned int begin_idx = eval_points_->subset_begin(dim_, subset_index_);
331 unsigned int end_idx = eval_points_->subset_end(dim_, subset_index_);
332 unsigned int points_per_side = (end_idx - begin_idx) / this->n_sides();
333 auto bgn_it = make_iter<EdgePoint>(
EdgePoint(cell_side, elm_cache_map,
this, 0 ) );
334 auto end_it = make_iter<EdgePoint>(
EdgePoint(cell_side, elm_cache_map,
this, points_per_side ) );
340 return perm_indices_[i_side][i_perm][i_point];
368 CouplingIntegral(std::shared_ptr<EdgeIntegral> edge_integral, std::shared_ptr<BulkIntegral> bulk_integral);
375 return edge_integral_->get_subset_idx();
380 return bulk_integral_->get_subset_idx();
385 unsigned int begin_idx = eval_points_->subset_begin(dim_, get_subset_high_idx());
386 unsigned int end_idx = eval_points_->subset_end(dim_, get_subset_high_idx());
387 unsigned int points_per_side = (end_idx - begin_idx) / edge_integral_->n_sides();
388 auto bgn_it = make_iter<CouplingPoint>(
CouplingPoint(cell_side, elm_cache_map,
this, 0 ) );
389 auto end_it = make_iter<CouplingPoint>(
CouplingPoint(cell_side, elm_cache_map,
this, points_per_side ) );
411 BoundaryIntegral(std::shared_ptr<EdgeIntegral> edge_integral, std::shared_ptr<BulkIntegral> bulk_integral);
418 return edge_integral_->get_subset_idx();
423 return bulk_integral_->get_subset_idx();
428 unsigned int begin_idx = eval_points_->subset_begin(dim_, get_subset_high_idx());
429 unsigned int end_idx = eval_points_->subset_end(dim_, get_subset_high_idx());
430 unsigned int points_per_side = (end_idx - begin_idx) / edge_integral_->n_sides();
431 auto bgn_it = make_iter<BoundaryPoint>(
BoundaryPoint(cell_side, elm_cache_map,
this, 0 ) );
432 auto end_it = make_iter<BoundaryPoint>(
BoundaryPoint(cell_side, elm_cache_map,
this, points_per_side ) );
std::shared_ptr< EdgeIntegral > edge_integral_
Integral according to side subset part (element of higher dim) in EvalPoints object.
unsigned int n_sides() const
Getter of n_sides.
Point accessor allow iterate over bulk quadrature points defined in local element coordinates...
std::shared_ptr< EvalPoints > eval_points() const
Getter of EvalPoints object.
unsigned int eval_point_idx() const
Return index in EvalPoints object.
unsigned int side_idx_
Index of side in element.
Point accessor allow iterate over quadrature points of given side defined in local element coordinate...
EdgePoint(DHCellSide cell_side, const ElementCacheMap *elm_cache_map, const EdgeIntegral *edge_integral, unsigned int local_point_idx)
Constructor.
int get_subset_high_idx() const
Return index of data block according to subset of higher dim in EvalPoints object.
int get_subset_low_idx() const
Return index of data block according to subset of lower dim (boundary) in EvalPoints object...
int get_subset_idx() const
Return index of data block according to subset in EvalPoints object.
unsigned int dim() const
Returns dimension.
int perm_idx_ptr(uint i_side, uint i_perm, uint i_point) const
Returns structure of permutation indices.
unsigned int local_point_idx_
Local coordinates within element.
unsigned int mesh_idx() const
Return global idx of element in full element vector.
BulkPoint()
Default constructor.
const ElementCacheMap * elm_cache_map_
Pointer ElementCacheMap needed for point evaluation.
BulkIntegral()
Default constructor.
Base point accessor class.
unsigned int dim() const
Return dimension of element appropriate to cell.
int get_subset_low_idx() const
Return index of data block according to subset of lower dim in EvalPoints object. ...
Range< BulkPoint > points(unsigned int element_patch_idx, const ElementCacheMap *elm_cache_map) const
Returns range of bulk local points for appropriate cell accessor.
int get_subset_idx() const
Return index of data block according to subset in EvalPoints object.
Directing class of FieldValueCache.
Range< CouplingPoint > points(const DHCellSide &cell_side, const ElementCacheMap *elm_cache_map) const
Returns range of side local points for appropriate cell side accessor.
Cell accessor allow iterate over DOF handler cells.
BulkPoint lower_dim(DHCellAccessor cell_lower) const
Return corresponds EdgePoint of neighbour side of same dimension (computing of side integrals)...
unsigned int i_elm_
index of element in patch
unsigned int eval_point_idx() const
Return index in EvalPoints object.
BaseIntegral()
Default constructor.
unsigned int position_in_cache(unsigned mesh_elm_idx) const
Return position of element stored in ElementCacheMap.
SidePoint(DHCellSide cell_side, const ElementCacheMap *elm_cache_map, unsigned int local_point_idx)
Constructor.
Point accessor allow iterate over quadrature points of given side defined in local element coordinate...
const BoundaryIntegral * integral_
Pointer to edge point set.
Range< BoundaryPoint > points(const DHCellSide &cell_side, const ElementCacheMap *elm_cache_map) const
Returns range of bulk local points for appropriate cell accessor.
BulkPoint point_bdr(ElementAccessor< 3 > bdr_elm) const
Return corresponds BulkPoint on boundary element.
PointBase()
Default constructor.
bool operator==(const EdgePoint &other)
Comparison of accessors.
std::shared_ptr< EvalPoints > eval_points_
Pointer to EvalPoints.
General point accessor allow iterate over quadrature points of given side defined in local element co...
unsigned int eval_point_idx() const
Return index in EvalPoints object.
std::shared_ptr< EdgeIntegral > edge_integral_
Integral according to higher dim (bulk) element subset part in EvalPoints object. ...
const ElementAccessor< 3 > elm() const
Return ElementAccessor to element of loc_ele_idx_.
std::shared_ptr< BulkIntegral > bulk_integral_
Integral according to bulk subset part (element of lower dim) in EvalPoints object.
unsigned int dim_
Dimension of points.
std::shared_ptr< BulkIntegral > bulk_integral_
Integral according to kower dim (boundary) element subset part in EvalPoints object.
Holds pair of positions of point in cache (element and eval point)
SidePoint()
Default constructor.
const CouplingIntegral * integral_
Pointer to edge point set.
unsigned int permutation_idx() const
unsigned int *** perm_indices_
Indices to EvalPoints for different sides and permutations reflecting order of points.
int get_subset_high_idx() const
Return index of data block according to subset of higher dim in EvalPoints object.
BaseIntegral(std::shared_ptr< EvalPoints > eval_points, unsigned int dim)
Constructor of bulk (n_permutations==0) or side subset.
bool operator==(const BulkPoint &other)
Comparison of accessors.
ElementAccessor< 3 > element() const
unsigned int subset_index_
Index of data block according to subset in EvalPoints object.
const ElementCacheMap * elm_cache_map() const
unsigned int permutation_idx_
Permutation index corresponding with DHCellSide.
BoundaryPoint(DHCellSide cell_side, const ElementCacheMap *elm_cache_map, const BoundaryIntegral *bdr_integral, unsigned int local_point_idx)
Constructor.
CouplingIntegral()
Default constructor.
const EdgeIntegral * integral_
Pointer to edge point integral.
BulkPoint(const ElementCacheMap *elm_cache_map, PatchCacheLoc cache_pos)
Constructor.
unsigned int n_permutations_
Number of permutations (value 0 indicates bulk set)
EdgePoint point_on(DHCellSide edg_side) const
Return corresponds EdgePoint of neighbour side of same dimension (computing of side integrals)...
unsigned int subset_index_
Index of data block according to subset in EvalPoints object.
bool operator==(const CouplingPoint &other)
Comparison of accessors.
void inc()
Iterates to next point.
BulkIntegral(std::shared_ptr< EvalPoints > eval_points, unsigned int dim)
Constructor of bulk integral.
unsigned int eval_point_idx() const
Return index in EvalPoints object.
Point accessor allow iterate over quadrature points of given side defined in local element coordinate...
PointBase(const ElementCacheMap *elm_cache_map, unsigned int loc_point_idx)
Constructor.
Class holds local coordinations of evaluating points (bulk and sides) specified by element dimension...
#define ASSERT_PTR(ptr)
Definition of assert macro checking non-null pointer (PTR)
bool operator==(const BoundaryPoint &other)
Comparison of accessors.
unsigned int elem_patch_idx_
Index of element in the patch.
std::shared_ptr< EvalPoints > eval_points() const
Getter of eval_points object.
CouplingPoint(DHCellSide cell_side, const ElementCacheMap *elm_cache_map, const CouplingIntegral *coupling_integral, unsigned int local_point_idx)
Constructor.
unsigned int n_sides_
Number of sides (value 0 indicates bulk set)
CouplingPoint()
Default constructor.
BoundaryIntegral()
Default constructor.
EdgeIntegral()
Default constructor.
std::shared_ptr< EvalPoints > eval_points() const
Getter of eval_points.
Range< EdgePoint > points(const DHCellSide &cell_side, const ElementCacheMap *elm_cache_map) const
Returns range of side local points for appropriate cell side accessor.
EdgePoint()
Default constructor.
BoundaryPoint()
Default constructor.
Implementation of range helper class.
Side accessor allows to iterate over sides of DOF handler cell.
unsigned int elem_patch_idx() const