Flow123d  DF_patch_fe_mechanics-5faa023
eval_subset.hh
Go to the documentation of this file.
1 /*!
2  *
3  * Copyright (C) 2015 Technical University of Liberec. All rights reserved.
4  *
5  * This program is free software; you can redistribute it and/or modify it under
6  * the terms of the GNU General Public License version 3 as published by the
7  * Free Software Foundation. (http://www.gnu.org/licenses/gpl-3.0.en.html)
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12  *
13  *
14  * @file eval_subset.hh
15  * @brief
16  * @author David Flanderka
17  *
18  * TODO (readability, optimization):
19  * - EdgePoint::point_on is too general, can fail for non-matching sides,
20  * depends on a map;
21  * Iterator over edge sides should know index of side on the edge or
22  * we should directly iterate over pairs of sides and iterate points over both sides
23  * without mapping.
24  * - similarly for Coupling and boundary points
25  * - Points should just hold necessary indices, without reference to complex classes,
26  * these points only can be used as indices to fields to get appropriate value in the field cache
27  */
28 
29 #ifndef EVAL_SUBSET_HH_
30 #define EVAL_SUBSET_HH_
31 
32 #include <memory>
33 #include <armadillo>
34 #include "fem/eval_points.hh"
35 #include "fem/element_cache_map.hh"
36 #include "mesh/range_wrapper.hh"
37 #include "mesh/accessors.hh"
38 #include "fem/dh_cell_accessor.hh"
39 
40 
41 class Side;
42 class BulkIntegral;
43 class EdgeIntegral;
44 class CouplingIntegral;
45 class BoundaryIntegral;
46 
47 
48 /**
49  * @brief Base point accessor class.
50  */
51 /**
52  * @brief Point accessor allow iterate over bulk quadrature points defined in local element coordinates.
53  */
54 
55 class BulkPoint {
56 public:
57  /// Default constructor
59  {}
60 
61  /// Constructor
62  BulkPoint(const ElementCacheMap *elm_cache_map, uint elem_idx, uint loc_point_idx)
63  : elm_cache_map_(elm_cache_map), elem_patch_idx_(elem_idx), local_point_idx_(loc_point_idx)
64  {}
65 
66  /// Getter of EvalPoints object.
67  inline std::shared_ptr<EvalPoints> eval_points() const {
68  ASSERT_PTR(elm_cache_map_).error("Invalid point.\n");
69  return elm_cache_map_->eval_points();
70  }
71 
72  // Getter of ElementCacheMap object.
73  inline const ElementCacheMap *elm_cache_map() const {
74  return elm_cache_map_;
75  }
76 
77 
78  // Getter of element patch index.
79  inline unsigned int elem_patch_idx() const {
80  return elem_patch_idx_;
81  }
82 
83  /// Return index in EvalPoints object
84  inline unsigned int eval_point_idx() const {
85  return local_point_idx_;
86  }
87 
88  /// Return index in ElementCacheMap
89  inline unsigned int value_cache_idx() const {
91  }
92 
93  /// Iterates to next point.
94  void inc() {
95  this->local_point_idx_++;
96  }
97 
98  /// Comparison of accessors.
99  bool operator==(const BulkPoint& other) {
101  return (local_point_idx_ == other.local_point_idx_);
102  }
103 
104 
105 protected:
107  /// Index of element in the patch.
108  unsigned int elem_patch_idx_;
109  /// Index of the local point in the integral object.
110  unsigned int local_point_idx_;
111 };
112 
113 
114 
115 
116 /**
117  * @brief General point a+ side_begin_ + ccessor allow iterate over quadrature points of given side defined in local element coordinates.
118  *
119  * Common ancestor of all side points classes (Edge-, Coupling-, BoundaryPoint)
120  */
121 class SidePoint : public BulkPoint {
122 public:
123  /// Default constructor
125  : BulkPoint() {}
126 
127  /// Constructor
129  : BulkPoint(bulk), side_begin_(side_begin)
130  {
131  //DebugOut().fmt("begin: {} sidx: {}", side_begin_, local_point_idx_);
132  }
133 
134 
135  /// Constructor
137  const EdgeIntegral *edge_integral, unsigned int local_point_idx);
138 
139  /// Return local index in quadrature. Temporary method - intermediate step in implementation of PatcFEValues.
140  inline unsigned int local_point_idx() const {
141  return local_point_idx_;
142  }
143 
144  /// Intermediate step in implementation of PatcFEValues.
145  virtual unsigned int side_idx() const =0;
146 
147  /// Return index in EvalPoints object
148  inline unsigned int eval_point_idx() const {
149  return side_begin_ + local_point_idx_;
150  }
151 
152  /// Return index in ElementCacheMap
153  inline unsigned int value_cache_idx() const {
155  }
156 
157  /// Comparison of accessors.
158  bool operator==(const SidePoint& other) {
161  return (local_point_idx_ == other.local_point_idx_);
162  }
163 
164 
165 protected:
166  //// local_point_idx_ here have meaning of index within the side.
167 
168  /// Index of side in element
169  unsigned int side_begin_;
170 
171 };
172 
173 
174 /**
175  * @brief Point accessor allow iterate over quadrature points of given side defined in local element coordinates.
176  */
177 class EdgePoint : public SidePoint {
178 public:
179  /// Default constructor
181  : SidePoint() {}
182 
183  /// Constructor
184  inline EdgePoint(BulkPoint bulk, const EdgeIntegral *edge_integral, uint side_begin);
185 
186  /// Return corresponds EdgePoint of neighbour side of same dimension (computing of side integrals).
187  inline EdgePoint point_on(const DHCellSide &edg_side) const;
188 
189  /// Intermediate step in implementation of PatcFEValues.
190  unsigned int side_idx() const override;
191 
192  /// Comparison of accessors.
193  bool operator==(const EdgePoint& other) {
194  return (elem_patch_idx_ == other.elem_patch_idx_) && (local_point_idx_ == other.local_point_idx_);
195  }
196 private:
198 };
199 
200 
201 /**
202  * @brief Point accessor allow iterate over quadrature points of given side defined in local element coordinates.
203  */
204 class CouplingPoint : public SidePoint {
205 public:
206  /// Default constructor
208  : SidePoint() {}
209 
210  /// Constructor
211 
212  inline CouplingPoint(BulkPoint bulk, const CouplingIntegral *coupling_integral, uint side_begin);
213 
214  /// Return corresponds EdgePoint of neighbour side of same dimension (computing of side integrals).
215  inline BulkPoint lower_dim(DHCellAccessor cell_lower) const;
216 
217  /// Intermediate step in implementation of PatcFEValues.
218  unsigned int side_idx() const override;
219 
220  /// Comparison of accessors.
221  bool operator==(const CouplingPoint& other) {
222  return (elem_patch_idx_ == other.elem_patch_idx_) && (local_point_idx_ == other.local_point_idx_);
223  }
224 
225 private:
226  /// Pointer to edge point set
228 };
229 
230 /**
231  * @brief Point accessor allow iterate over quadrature points of given side defined in local element coordinates.
232  */
233 class BoundaryPoint : public SidePoint {
234 public:
235  /// Default constructor
237  : SidePoint() {}
238 
239  /// Constructor
240  inline BoundaryPoint(BulkPoint bulk, const BoundaryIntegral *bdr_integral, uint side_begin);
241 
242  /// Return corresponds BulkPoint on boundary element.
243  inline BulkPoint point_bdr(ElementAccessor<3> bdr_elm) const;
244 
245  /// Intermediate step in implementation of PatcFEValues.
246  unsigned int side_idx() const override;
247 
248  /// Comparison of accessors.
249  bool operator==(const BoundaryPoint& other) {
250  return (elem_patch_idx_ == other.elem_patch_idx_) && (local_point_idx_ == other.local_point_idx_);
251  }
252 
253 private:
254  /// Pointer to edge point set
256 };
257 
258 
259 
260 /**
261  * Base integral class holds common data members and methods.
262  */
264 public:
265  /// Default constructor
266  BaseIntegral() : eval_points_(nullptr), dim_(0) {}
267 
268  /// Constructor of bulk or side subset
269  BaseIntegral(std::shared_ptr<EvalPoints> eval_points, unsigned int dim)
271 
272  /// Destructor
273  virtual ~BaseIntegral();
274 
275  /// Getter of eval_points
276  std::shared_ptr<EvalPoints> eval_points() const {
277  return eval_points_;
278  }
279 
280  /// Returns dimension.
281  unsigned int dim() const {
282  return dim_;
283  }
284 protected:
285  /// Pointer to EvalPoints
286  std::shared_ptr<EvalPoints> eval_points_;
287  /// Dimension of the cell on which points are placed
288  unsigned int dim_;
289 };
290 
291 /**
292  * Integral class of bulk points, allows assemblation of volume integrals.
293  */
294 class BulkIntegral : public BaseIntegral, public std::enable_shared_from_this<BulkIntegral> {
295 public:
296  /// Default constructor
298 
299  /// Constructor of bulk integral
300  BulkIntegral(std::shared_ptr<EvalPoints> eval_points, unsigned int dim, uint i_subset)
302  {
303  begin_idx_ = eval_points_->subset_begin(dim_, subset_index_);
304  end_idx_ = eval_points_->subset_end(dim_, subset_index_);
305  }
306 
307  /// Destructor
308  ~BulkIntegral();
309 
310  /// Return index of data block according to subset in EvalPoints object
311  inline int get_subset_idx() const {
312  return subset_index_;
313  }
314 
315 
316  /// Returns range of bulk local points for appropriate cell accessor
317  inline Range< BulkPoint > points(unsigned int element_patch_idx, const ElementCacheMap *elm_cache_map) const {
318  auto bgn_it = make_iter<BulkPoint>( BulkPoint(elm_cache_map, element_patch_idx, begin_idx_));
319  auto end_it = make_iter<BulkPoint>( BulkPoint(elm_cache_map, element_patch_idx, end_idx_));
320  return Range<BulkPoint>(bgn_it, end_it);
321  }
322 
323 protected:
324  /// Index of data block according to subset in EvalPoints object.
325  unsigned int subset_index_;
328 
329 };
330 
331 /**
332  * Integral class of side points, allows assemblation of element - element fluxes.
333  */
334 class EdgeIntegral : public BaseIntegral, public std::enable_shared_from_this<EdgeIntegral> {
335 public:
336  /// Default constructor
338  {
339  ASSERT_PERMANENT(false);
340  }
341 
342  /// Constructor of edge integral
343  EdgeIntegral(std::shared_ptr<EvalPoints> eval_points, unsigned int dim, uint i_subset);
344 
345  /// Destructor
346  ~EdgeIntegral();
347 
348  /// Getter of n_sides
349  inline unsigned int n_sides() const {
350  return n_sides_;
351  }
352 
353  /// Return index of data block according to subset in EvalPoints object
354  inline int get_subset_idx() const {
355  return subset_index_;
356  }
357 
358  inline uint side_begin(const DHCellSide &cell_side) const {
359  return begin_idx_ + cell_side.side_idx() * n_points_per_side_;
360  }
361 
362  /// Returns range of side local points for appropriate cell side accessor
363  inline Range< EdgePoint > points(const DHCellSide &cell_side, const ElementCacheMap *elm_cache_map) const {
364  ASSERT_EQ(cell_side.dim(), dim_);
365  //DebugOut() << "points per side: " << n_points_per_side_;
366  uint element_patch_idx = elm_cache_map->position_in_cache(cell_side.element().idx());
367  uint begin_idx = side_begin(cell_side);
368  auto bgn_it = make_iter<EdgePoint>( EdgePoint(
369  BulkPoint(elm_cache_map, element_patch_idx, 0), this, begin_idx));
370  auto end_it = make_iter<EdgePoint>( EdgePoint(
371  BulkPoint(elm_cache_map, element_patch_idx, n_points_per_side_), this, begin_idx));
372  return Range<EdgePoint>(bgn_it, end_it);
373  }
374 
375 
376 private:
377  unsigned int subset_index_;
379 
380  /// Number of sides (value 0 indicates bulk set)
381  unsigned int n_sides_;
382  /// Number of points. TODO: pass this to the constructor, avoid extraction from the eval_points
384 
385  friend class EvalPoints;
386  friend class EdgePoint;
387  friend class CouplingPoint;
388  friend class BoundaryPoint;
389  friend class CouplingIntegral;
390  friend class BoundaryIntegral;
391 };
392 
393 /**
394  * Integral class of neighbour points, allows assemblation of element - side fluxes.
395  *
396  * Dimension corresponds with element of higher dim.
397  */
398 class CouplingIntegral : public BaseIntegral, public std::enable_shared_from_this<CouplingIntegral> {
399 public:
400  /// Default constructor
402 
403  /// Constructor of ngh integral
404  CouplingIntegral(std::shared_ptr<EdgeIntegral> edge_integral, std::shared_ptr<BulkIntegral> bulk_integral);
405 
406  /// Destructor
408 
409  /// Return index of data block according to subset of higher dim in EvalPoints object
410  inline int get_subset_high_idx() const {
411  return edge_integral_->get_subset_idx();
412  }
413 
414  /// Return index of data block according to subset of lower dim in EvalPoints object
415  inline int get_subset_low_idx() const {
416  return bulk_integral_->get_subset_idx();
417  }
418 
419  inline uint bulk_begin() const {
420  return eval_points_->subset_begin(dim_-1, bulk_integral_->get_subset_idx());
421  }
422 
423  /// Returns range of side local points for appropriate cell side accessor
424  inline Range< CouplingPoint > points(const DHCellSide &cell_side, const ElementCacheMap *elm_cache_map) const {
425  ASSERT_EQ(cell_side.dim(), dim_);
426  uint element_patch_idx = elm_cache_map->position_in_cache(cell_side.element().idx());
427  uint begin_idx = edge_integral_->side_begin(cell_side);
428  auto bgn_it = make_iter<CouplingPoint>( CouplingPoint(
429  BulkPoint(elm_cache_map, element_patch_idx, 0), this, begin_idx) );
430  auto end_it = make_iter<CouplingPoint>( CouplingPoint(
431  BulkPoint(elm_cache_map, element_patch_idx, edge_integral_->n_points_per_side_), this, begin_idx) );;
432  return Range<CouplingPoint>(bgn_it, end_it);
433  }
434 
435 private:
436  /// Integral according to side subset part (element of higher dim) in EvalPoints object.
437  std::shared_ptr<EdgeIntegral> edge_integral_;
438  /// Integral according to bulk subset part (element of lower dim) in EvalPoints object.
439  std::shared_ptr<BulkIntegral> bulk_integral_;
440 
441  friend class CouplingPoint;
442 };
443 
444 /**
445  * Integral class of boundary points, allows assemblation of fluxes between sides and neighbouring boundary elements.
446  */
447 class BoundaryIntegral : public BaseIntegral, public std::enable_shared_from_this<BoundaryIntegral> {
448 public:
449  /// Default constructor
451 
452  /// Constructor of bulk subset
453  BoundaryIntegral(std::shared_ptr<EdgeIntegral> edge_integral, std::shared_ptr<BulkIntegral> bulk_integral);
454 
455  /// Destructor
457 
458  /// Return index of data block according to subset of higher dim in EvalPoints object
459  inline int get_subset_high_idx() const {
460  return edge_integral_->get_subset_idx();
461  }
462 
463  /// Return index of data block according to subset of lower dim (boundary) in EvalPoints object
464  inline int get_subset_low_idx() const {
465  return bulk_integral_->get_subset_idx();
466  }
467 
468  inline uint bulk_begin() const {
469  // DebugOut().fmt("edge_begin: {} bdr_begin: {}",
470  // eval_points_->subset_begin(dim_, edge_integral_->get_subset_idx()),
471  // eval_points_->subset_begin(dim_-1, bulk_integral_->get_subset_idx()));
472  return eval_points_->subset_begin(dim_-1, bulk_integral_->get_subset_idx());
473  }
474 
475  /// Returns range of bulk local points for appropriate cell accessor
476  inline Range< BoundaryPoint > points(const DHCellSide &cell_side, const ElementCacheMap *elm_cache_map) const {
477  ASSERT_EQ(cell_side.dim(), dim_);
478  uint element_patch_idx = elm_cache_map->position_in_cache(cell_side.element().idx());
479  uint begin_idx = edge_integral_->side_begin(cell_side);
480  auto bgn_it = make_iter<BoundaryPoint>( BoundaryPoint(
481  BulkPoint(elm_cache_map, element_patch_idx, 0), this, begin_idx) );
482  auto end_it = make_iter<BoundaryPoint>( BoundaryPoint(
483  BulkPoint(elm_cache_map, element_patch_idx, edge_integral_->n_points_per_side_), this, begin_idx) );;
484  return Range<BoundaryPoint>(bgn_it, end_it);
485  }
486 
487 private:
488  /// Integral according to higher dim (bulk) element subset part in EvalPoints object.
489  std::shared_ptr<EdgeIntegral> edge_integral_;
490  /// Integral according to kower dim (boundary) element subset part in EvalPoints object.
491  std::shared_ptr<BulkIntegral> bulk_integral_;
492 
493  friend class BoundaryPoint;
494 };
495 
496 
497 /******************************************************************************
498  * Implementation of inlined methods
499  */
500 
501 /// Constructor
502 EdgePoint::EdgePoint(BulkPoint bulk, const EdgeIntegral *edge_integral, uint side_begin)
503 : SidePoint(bulk, side_begin),
504  integral_(edge_integral)
505 {}
506 
507 inline EdgePoint EdgePoint::point_on(const DHCellSide &edg_side) const {
508  uint element_patch_idx = elm_cache_map_->position_in_cache(edg_side.element().idx());
509  uint side_begin = integral_->side_begin(edg_side);
510  return EdgePoint(BulkPoint(elm_cache_map_, element_patch_idx, local_point_idx_),
511  integral_, side_begin);
512 }
513 
514 //******************************************************************************
515 CouplingPoint::CouplingPoint(BulkPoint bulk, const CouplingIntegral *coupling_integral, uint side_begin)
516 : SidePoint(bulk, side_begin),
517  integral_(coupling_integral)
518 {}
519 
520 
522  unsigned int i_elm = elm_cache_map_->position_in_cache(cell_lower.elm().idx());
523  unsigned int i_ep = integral_->bulk_begin() + local_point_idx_;
524  return BulkPoint(elm_cache_map_, i_elm, i_ep);
525 }
526 
527 
528 
529 //******************************************************************************
531 : SidePoint(bulk, side_begin),
532  integral_(bdr_integral)
533 {}
534 
535 
536 
538  unsigned int i_elm = elm_cache_map_->position_in_cache(bdr_elm.idx(), true);
539  unsigned int i_ep = integral_->bulk_begin() + local_point_idx_;
540  //DebugOut() << "begin:" << integral_->bulk_begin() << "iloc " << local_point_idx_;
541  return BulkPoint(elm_cache_map_, i_elm, i_ep);
542 }
543 
544 #endif /* EVAL_SUBSET_HH_ */
#define ASSERT_PERMANENT(expr)
Allow use shorter versions of macro names if these names is not used with external library.
Definition: asserts.hh:348
#define ASSERT_EQ(a, b)
Definition of comparative assert macro (EQual) only for debug mode.
Definition: asserts.hh:333
#define ASSERT_PTR(ptr)
Definition of assert macro checking non-null pointer (PTR) only for debug mode.
Definition: asserts.hh:341
BaseIntegral(std::shared_ptr< EvalPoints > eval_points, unsigned int dim)
Constructor of bulk or side subset.
Definition: eval_subset.hh:269
unsigned int dim() const
Returns dimension.
Definition: eval_subset.hh:281
std::shared_ptr< EvalPoints > eval_points() const
Getter of eval_points.
Definition: eval_subset.hh:276
unsigned int dim_
Dimension of the cell on which points are placed.
Definition: eval_subset.hh:288
BaseIntegral()
Default constructor.
Definition: eval_subset.hh:266
std::shared_ptr< EvalPoints > eval_points_
Pointer to EvalPoints.
Definition: eval_subset.hh:286
virtual ~BaseIntegral()
Destructor.
Definition: eval_subset.cc:28
std::shared_ptr< EdgeIntegral > edge_integral_
Integral according to higher dim (bulk) element subset part in EvalPoints object.
Definition: eval_subset.hh:489
Range< BoundaryPoint > points(const DHCellSide &cell_side, const ElementCacheMap *elm_cache_map) const
Returns range of bulk local points for appropriate cell accessor.
Definition: eval_subset.hh:476
int get_subset_low_idx() const
Return index of data block according to subset of lower dim (boundary) in EvalPoints object.
Definition: eval_subset.hh:464
~BoundaryIntegral()
Destructor.
Definition: eval_subset.cc:90
BoundaryIntegral()
Default constructor.
Definition: eval_subset.hh:450
std::shared_ptr< BulkIntegral > bulk_integral_
Integral according to kower dim (boundary) element subset part in EvalPoints object.
Definition: eval_subset.hh:491
friend class BoundaryPoint
Definition: eval_subset.hh:493
int get_subset_high_idx() const
Return index of data block according to subset of higher dim in EvalPoints object.
Definition: eval_subset.hh:459
uint bulk_begin() const
Definition: eval_subset.hh:468
Point accessor allow iterate over quadrature points of given side defined in local element coordinate...
Definition: eval_subset.hh:233
BulkPoint point_bdr(ElementAccessor< 3 > bdr_elm) const
Return corresponds BulkPoint on boundary element.
Definition: eval_subset.hh:537
const BoundaryIntegral * integral_
Pointer to edge point set.
Definition: eval_subset.hh:255
bool operator==(const BoundaryPoint &other)
Comparison of accessors.
Definition: eval_subset.hh:249
BoundaryPoint()
Default constructor.
Definition: eval_subset.hh:236
unsigned int side_idx() const override
Intermediate step in implementation of PatcFEValues.
Definition: eval_subset.cc:108
int get_subset_idx() const
Return index of data block according to subset in EvalPoints object.
Definition: eval_subset.hh:311
BulkIntegral(std::shared_ptr< EvalPoints > eval_points, unsigned int dim, uint i_subset)
Constructor of bulk integral.
Definition: eval_subset.hh:300
~BulkIntegral()
Destructor.
Definition: eval_subset.cc:36
Range< BulkPoint > points(unsigned int element_patch_idx, const ElementCacheMap *elm_cache_map) const
Returns range of bulk local points for appropriate cell accessor.
Definition: eval_subset.hh:317
BulkIntegral()
Default constructor.
Definition: eval_subset.hh:297
unsigned int subset_index_
Index of data block according to subset in EvalPoints object.
Definition: eval_subset.hh:325
Base point accessor class.
Definition: eval_subset.hh:55
const ElementCacheMap * elm_cache_map_
Definition: eval_subset.hh:106
unsigned int elem_patch_idx_
Index of element in the patch.
Definition: eval_subset.hh:108
BulkPoint(const ElementCacheMap *elm_cache_map, uint elem_idx, uint loc_point_idx)
Constructor.
Definition: eval_subset.hh:62
BulkPoint()
Default constructor.
Definition: eval_subset.hh:58
unsigned int value_cache_idx() const
Return index in ElementCacheMap.
Definition: eval_subset.hh:89
std::shared_ptr< EvalPoints > eval_points() const
Getter of EvalPoints object.
Definition: eval_subset.hh:67
bool operator==(const BulkPoint &other)
Comparison of accessors.
Definition: eval_subset.hh:99
const ElementCacheMap * elm_cache_map() const
Definition: eval_subset.hh:73
unsigned int elem_patch_idx() const
Definition: eval_subset.hh:79
unsigned int local_point_idx_
Index of the local point in the integral object.
Definition: eval_subset.hh:110
void inc()
Iterates to next point.
Definition: eval_subset.hh:94
unsigned int eval_point_idx() const
Return index in EvalPoints object.
Definition: eval_subset.hh:84
Range< CouplingPoint > points(const DHCellSide &cell_side, const ElementCacheMap *elm_cache_map) const
Returns range of side local points for appropriate cell side accessor.
Definition: eval_subset.hh:424
int get_subset_high_idx() const
Return index of data block according to subset of higher dim in EvalPoints object.
Definition: eval_subset.hh:410
uint bulk_begin() const
Definition: eval_subset.hh:419
int get_subset_low_idx() const
Return index of data block according to subset of lower dim in EvalPoints object.
Definition: eval_subset.hh:415
CouplingIntegral()
Default constructor.
Definition: eval_subset.hh:401
std::shared_ptr< BulkIntegral > bulk_integral_
Integral according to bulk subset part (element of lower dim) in EvalPoints object.
Definition: eval_subset.hh:439
std::shared_ptr< EdgeIntegral > edge_integral_
Integral according to side subset part (element of higher dim) in EvalPoints object.
Definition: eval_subset.hh:437
~CouplingIntegral()
Destructor.
Definition: eval_subset.cc:73
friend class CouplingPoint
Definition: eval_subset.hh:441
Point accessor allow iterate over quadrature points of given side defined in local element coordinate...
Definition: eval_subset.hh:204
unsigned int side_idx() const override
Intermediate step in implementation of PatcFEValues.
Definition: eval_subset.cc:104
const CouplingIntegral * integral_
Pointer to edge point set.
Definition: eval_subset.hh:227
CouplingPoint()
Default constructor.
Definition: eval_subset.hh:207
bool operator==(const CouplingPoint &other)
Comparison of accessors.
Definition: eval_subset.hh:221
BulkPoint lower_dim(DHCellAccessor cell_lower) const
Return corresponds EdgePoint of neighbour side of same dimension (computing of side integrals).
Definition: eval_subset.hh:521
Cell accessor allow iterate over DOF handler cells.
ElementAccessor< 3 > elm() const
Return ElementAccessor to element of loc_ele_idx_.
Side accessor allows to iterate over sides of DOF handler cell.
unsigned int dim() const
Return dimension of element appropriate to the side.
ElementAccessor< 3 > element() const
unsigned int side_idx() const
int get_subset_idx() const
Return index of data block according to subset in EvalPoints object.
Definition: eval_subset.hh:354
EdgeIntegral()
Default constructor.
Definition: eval_subset.hh:337
uint n_points_per_side_
Number of points. TODO: pass this to the constructor, avoid extraction from the eval_points.
Definition: eval_subset.hh:383
unsigned int n_sides() const
Getter of n_sides.
Definition: eval_subset.hh:349
unsigned int subset_index_
Definition: eval_subset.hh:377
~EdgeIntegral()
Destructor.
Definition: eval_subset.cc:58
unsigned int n_sides_
Number of sides (value 0 indicates bulk set)
Definition: eval_subset.hh:381
Range< EdgePoint > points(const DHCellSide &cell_side, const ElementCacheMap *elm_cache_map) const
Returns range of side local points for appropriate cell side accessor.
Definition: eval_subset.hh:363
friend class EdgePoint
Definition: eval_subset.hh:386
uint side_begin(const DHCellSide &cell_side) const
Definition: eval_subset.hh:358
Point accessor allow iterate over quadrature points of given side defined in local element coordinate...
Definition: eval_subset.hh:177
bool operator==(const EdgePoint &other)
Comparison of accessors.
Definition: eval_subset.hh:193
EdgePoint()
Default constructor.
Definition: eval_subset.hh:180
EdgePoint point_on(const DHCellSide &edg_side) const
Return corresponds EdgePoint of neighbour side of same dimension (computing of side integrals).
Definition: eval_subset.hh:507
unsigned int side_idx() const override
Intermediate step in implementation of PatcFEValues.
Definition: eval_subset.cc:100
const EdgeIntegral * integral_
Definition: eval_subset.hh:197
unsigned int idx() const
We need this method after replacing Region by RegionIdx, and movinf RegionDB instance into particular...
Definition: accessors.hh:215
Directing class of FieldValueCache.
int element_eval_point(unsigned int i_elem_in_cache, unsigned int i_eval_point) const
std::shared_ptr< EvalPoints > eval_points() const
Getter of eval_points object.
unsigned int position_in_cache(unsigned mesh_elm_idx, bool bdr=false) const
Return position of element stored in ElementCacheMap.
Class holds local coordinations of evaluating points (bulk and sides) specified by element dimension.
Definition: eval_points.hh:43
Range helper class.
General point a+ side_begin_ + ccessor allow iterate over quadrature points of given side defined in ...
Definition: eval_subset.hh:121
virtual unsigned int side_idx() const =0
Intermediate step in implementation of PatcFEValues.
SidePoint(BulkPoint bulk, uint side_begin)
Constructor.
Definition: eval_subset.hh:128
SidePoint()
Default constructor.
Definition: eval_subset.hh:124
unsigned int side_begin_
Index of side in element.
Definition: eval_subset.hh:169
bool operator==(const SidePoint &other)
Comparison of accessors.
Definition: eval_subset.hh:158
SidePoint(DHCellSide cell_side, const ElementCacheMap *elm_cache_map, const EdgeIntegral *edge_integral, unsigned int local_point_idx)
Constructor.
unsigned int value_cache_idx() const
Return index in ElementCacheMap.
Definition: eval_subset.hh:153
unsigned int eval_point_idx() const
Return index in EvalPoints object.
Definition: eval_subset.hh:148
unsigned int local_point_idx() const
Return local index in quadrature. Temporary method - intermediate step in implementation of PatcFEVal...
Definition: eval_subset.hh:140
@ bulk
unsigned int uint
Implementation of range helper class.