Flow123d  JS_before_hm-1601-gc6ac32d
generic_assembly.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 generic_assembly.hh
15  * @brief
16  */
17 
18 #ifndef GENERIC_ASSEMBLY_HH_
19 #define GENERIC_ASSEMBLY_HH_
20 
22 #include "fields/eval_subset.hh"
23 #include "fields/eval_points.hh"
25 #include "tools/revertable_list.hh"
26 
27 
28 
29 /// Allow set mask of active integrals.
31  none = 0,
32  bulk = 0x0001,
33  edge = 0x0002,
34  coupling = 0x0004,
35  boundary = 0x0008
36 };
37 
38 
39 /// Set of all used integral necessary in assemblation
41  std::array<std::shared_ptr<BulkIntegral>, 3> bulk_; ///< Bulk integrals of elements of dimensions 1, 2, 3
42  std::array<std::shared_ptr<EdgeIntegral>, 3> edge_; ///< Edge integrals between elements of dimensions 1, 2, 3
43  std::array<std::shared_ptr<CouplingIntegral>, 2> coupling_; ///< Coupling integrals between elements of dimensions 1-2, 2-3
44  std::array<std::shared_ptr<BoundaryIntegral>, 3> boundary_; ///< Boundary integrals betwwen elements of dimensions 1, 2, 3 and boundaries
45 };
46 
47 
48 /**
49  * @brief Generic class of assemblation.
50  *
51  * Class
52  * - holds assemblation structures (EvalPoints, Integral objects, Integral data table).
53  * - associates assemblation objects specified by dimension
54  * - provides general assemble method
55  * - provides methods that allow construction of element patches
56  */
57 template < template<IntDim...> class DimAssembly>
59 {
60 private:
61  /**
62  * Helper structzre holds data of cell (bulk) integral
63  *
64  * Data is specified by cell and subset index in EvalPoint object
65  */
67  /// Default constructor
69 
70  /// Constructor with data mebers initialization
71  BulkIntegralData(DHCellAccessor dhcell, unsigned int subset_idx)
72  : cell(dhcell), subset_index(subset_idx) {}
73 
74  /// Copy constructor
76  : cell(other.cell), subset_index(other.subset_index) {}
77 
78  DHCellAccessor cell; ///< Specified cell (element)
79  unsigned int subset_index; ///< Index (order) of subset in EvalPoints object
80  };
81 
82  /**
83  * Helper structzre holds data of edge integral
84  *
85  * Data is specified by side and subset index in EvalPoint object
86  */
88  /// Default constructor
91 
92  /// Copy constructor
94  : edge_side_range(other.edge_side_range), subset_index(other.subset_index) {}
95 
96  /// Constructor with data mebers initialization
98  : edge_side_range(range), subset_index(subset_idx) {}
99 
100  RangeConvert<DHEdgeSide, DHCellSide> edge_side_range; ///< Specified cell side (element)
101  unsigned int subset_index; ///< Index (order) of subset in EvalPoints object
102  };
103 
104  /**
105  * Helper structzre holds data of neighbour (coupling) integral
106  *
107  * Data is specified by cell, side and their subset indices in EvalPoint object
108  */
110  /// Default constructor
112 
113  /// Constructor with data mebers initialization
114  CouplingIntegralData(DHCellAccessor dhcell, unsigned int bulk_idx, DHCellSide dhside, unsigned int side_idx)
115  : cell(dhcell), bulk_subset_index(bulk_idx), side(dhside), side_subset_index(side_idx) {}
116 
117  /// Copy constructor
119  : cell(other.cell), bulk_subset_index(other.bulk_subset_index), side(other.side), side_subset_index(other.side_subset_index) {}
120 
122  unsigned int bulk_subset_index; ///< Index (order) of lower dim subset in EvalPoints object
123  DHCellSide side; ///< Specified cell side (higher dim element)
124  unsigned int side_subset_index; ///< Index (order) of higher dim subset in EvalPoints object
125  };
126 
127  /**
128  * Helper structzre holds data of boundary integral
129  *
130  * Data is specified by side and subset indices of side and appropriate boundary element in EvalPoint object
131  */
133  /// Default constructor
135 
136  /// Constructor with data mebers initialization
137  BoundaryIntegralData(unsigned int bdr_idx, DHCellSide dhside, unsigned int side_idx)
138  : bdr_subset_index(bdr_idx), side(dhside), side_subset_index(side_idx) {}
139 
140  /// Copy constructor
142  : bdr_subset_index(other.bdr_subset_index), side(other.side), side_subset_index(other.side_subset_index) {}
143 
144  // We don't need hold ElementAccessor of boundary element, side.cond().element_accessor() provides it.
145  unsigned int bdr_subset_index; ///< Index (order) of subset on boundary element in EvalPoints object
146  DHCellSide side; ///< Specified cell side (bulk element)
147  unsigned int side_subset_index; ///< Index (order) of subset on side of bulk element in EvalPoints object
148  };
149 
150 public:
151 
152  /// Constructor
153  GenericAssembly( typename DimAssembly<1>::EqFields *eq_fields, typename DimAssembly<1>::EqData *eq_data)
154  : multidim_assembly_(eq_fields, eq_data),
155  bulk_integral_data_(20, 10),
156  edge_integral_data_(12, 6),
157  coupling_integral_data_(12, 6),
158  boundary_integral_data_(8, 4)
159  {
160  eval_points_ = std::make_shared<EvalPoints>();
161  // first step - create integrals, then - initialize cache and initialize subobject of dimensions
162  multidim_assembly_[1_d]->create_integrals(eval_points_, integrals_);
163  multidim_assembly_[2_d]->create_integrals(eval_points_, integrals_);
164  multidim_assembly_[3_d]->create_integrals(eval_points_, integrals_);
165  element_cache_map_.init(eval_points_);
166  multidim_assembly_[1_d]->initialize(&element_cache_map_);
167  multidim_assembly_[2_d]->initialize(&element_cache_map_);
168  multidim_assembly_[3_d]->initialize(&element_cache_map_);
169  active_integrals_ = multidim_assembly_[1_d]->n_active_integrals();
170  }
171 
172  /// Getter to set of assembly objects
174  return multidim_assembly_;
175  }
176 
177  /// Geter to EvalPoints object
178  inline std::shared_ptr<EvalPoints> eval_points() const {
179  return eval_points_;
180  }
181 
182  /**
183  * @brief General assemble methods.
184  *
185  * Loops through local cells and calls assemble methods of assembly
186  * object of each cells over space dimension.
187  */
188  void assemble(std::shared_ptr<DOFHandlerMultiDim> dh) {
189  START_TIMER( DimAssembly<1>::name() );
190  this->reallocate_cache();
191  multidim_assembly_[1_d]->begin();
192 
193  bool add_into_patch = false; // control variable
194  for(auto cell_it = dh->local_range().begin(); cell_it != dh->local_range().end(); )
195  {
196 
197  if (!add_into_patch) {
198  element_cache_map_.start_elements_update();
199  add_into_patch = true;
200  }
201 
202  //START_TIMER("add_integrals_to_patch");
203  this->add_integrals_of_computing_step(*cell_it);
204  //END_TIMER("add_integrals_to_patch");
205 
206  if (element_cache_map_.eval_point_data_.temporary_size() > CacheMapElementNumber::get()) {
207  bulk_integral_data_.revert_temporary();
208  edge_integral_data_.revert_temporary();
209  coupling_integral_data_.revert_temporary();
210  boundary_integral_data_.revert_temporary();
211  element_cache_map_.eval_point_data_.revert_temporary();
212  this->assemble_integrals();
213  add_into_patch = false;
214  } else {
215  bulk_integral_data_.make_permanent();
216  edge_integral_data_.make_permanent();
217  coupling_integral_data_.make_permanent();
218  boundary_integral_data_.make_permanent();
219  element_cache_map_.eval_point_data_.make_permanent();
220  if (element_cache_map_.eval_point_data_.temporary_size() == CacheMapElementNumber::get()) {
221  this->assemble_integrals();
222  add_into_patch = false;
223  }
224  ++cell_it;
225  }
226  }
227  if (add_into_patch) {
228  this->assemble_integrals();
229  }
230 
231  multidim_assembly_[1_d]->end();
232  END_TIMER( DimAssembly<1>::name() );
233  }
234 
235  /// Return ElementCacheMap
236  inline const ElementCacheMap &cache_map() const {
237  return element_cache_map_;
238  }
239 
240 private:
241  /// Assembles the cell integrals for the given dimension.
242  template<unsigned int dim>
243  inline void assemble_cell_integrals() {
244  for (unsigned int i=0; i<bulk_integral_data_.permanent_size(); ++i) {
245  if (bulk_integral_data_[i].cell.dim() != dim) continue;
246  multidim_assembly_[Dim<dim>{}]->cell_integral(bulk_integral_data_[i].cell, element_cache_map_.position_in_cache(bulk_integral_data_[i].cell.elm().mesh_idx()));
247  }
248  // Possibly optimization but not so fast as we would assume (needs change interface of cell_integral)
249  /*for (unsigned int i=0; i<element_cache_map_.n_elements(); ++i) {
250  unsigned int elm_start = element_cache_map_.element_chunk_begin(i);
251  if (element_cache_map_.eval_point_data(elm_start).i_eval_point_ != 0) continue;
252  multidim_assembly_[Dim<dim>{}]->cell_integral(i, element_cache_map_.eval_point_data(elm_start).dh_loc_idx_);
253  }*/
254  }
255 
256  /// Assembles the boundary side integrals for the given dimension.
257  template<unsigned int dim>
259  for (unsigned int i=0; i<boundary_integral_data_.permanent_size(); ++i) {
260  if (boundary_integral_data_[i].side.dim() != dim) continue;
261  multidim_assembly_[Dim<dim>{}]->boundary_side_integral(boundary_integral_data_[i].side);
262  }
263  }
264 
265  /// Assembles the edge integrals for the given dimension.
266  template<unsigned int dim>
267  inline void assemble_edge_integrals() {
268  for (unsigned int i=0; i<edge_integral_data_.permanent_size(); ++i) {
269  auto range = edge_integral_data_[i].edge_side_range;
270  if (range.begin()->dim() != dim) continue;
271  multidim_assembly_[Dim<dim>{}]->edge_integral(edge_integral_data_[i].edge_side_range);
272  }
273  }
274 
275  /// Assembles the neighbours integrals for the given dimension.
276  template<unsigned int dim>
278  for (unsigned int i=0; i<coupling_integral_data_.permanent_size(); ++i) {
279  if (coupling_integral_data_[i].side.dim() != dim) continue;
280  multidim_assembly_[Dim<dim>{}]->dimjoin_intergral(coupling_integral_data_[i].cell, coupling_integral_data_[i].side);
281  }
282  }
283 
284  /// Call assemblations when patch is filled
286  START_TIMER("create_patch");
287  element_cache_map_.create_patch();
288  END_TIMER("create_patch");
289  START_TIMER("cache_update");
290  multidim_assembly_[1_d]->eq_fields_->cache_update(element_cache_map_); // TODO replace with sub FieldSet
291  END_TIMER("cache_update");
292  element_cache_map_.finish_elements_update();
293 
294  {
295  START_TIMER("assemble_volume_integrals");
296  this->assemble_cell_integrals<1>();
297  this->assemble_cell_integrals<2>();
298  this->assemble_cell_integrals<3>();
299  END_TIMER("assemble_volume_integrals");
300  }
301 
302  {
303  START_TIMER("assemble_fluxes_boundary");
304  this->assemble_boundary_side_integrals<1>();
305  this->assemble_boundary_side_integrals<2>();
306  this->assemble_boundary_side_integrals<3>();
307  END_TIMER("assemble_fluxes_boundary");
308  }
309 
310  {
311  START_TIMER("assemble_fluxes_elem_elem");
312  this->assemble_edge_integrals<1>();
313  this->assemble_edge_integrals<2>();
314  this->assemble_edge_integrals<3>();
315  END_TIMER("assemble_fluxes_elem_elem");
316  }
317 
318  {
319  START_TIMER("assemble_fluxes_elem_side");
320  this->assemble_neighbour_integrals<2>();
321  this->assemble_neighbour_integrals<3>();
322  END_TIMER("assemble_fluxes_elem_side");
323  }
324  // clean integral data
325  bulk_integral_data_.reset();
326  edge_integral_data_.reset();
327  coupling_integral_data_.reset();
328  boundary_integral_data_.reset();
329  element_cache_map_.clear_element_eval_points_map();
330  }
331 
332  /**
333  * Add data of integrals to appropriate structure and register elements to ElementCacheMap.
334  *
335  * Types of used integrals must be set in data member \p active_integrals_.
336  */
338  if (active_integrals_ & ActiveIntegrals::bulk)
339  if (cell.is_own()) { // Not ghost
340  this->add_volume_integral(cell);
341  }
342 
343  for( DHCellSide cell_side : cell.side_range() ) {
344  if (active_integrals_ & ActiveIntegrals::boundary)
345  if (cell.is_own()) // Not ghost
346  if ( (cell_side.side().edge().n_sides() == 1) && (cell_side.side().is_boundary()) ) {
347  this->add_boundary_integral(cell_side);
348  continue;
349  }
350  if (active_integrals_ & ActiveIntegrals::edge)
351  if ( (cell_side.n_edge_sides() >= 2) && (cell_side.edge_sides().begin()->element().idx() == cell.elm_idx())) {
352  this->add_edge_integral(cell_side);
353  }
354  }
355 
356  if (active_integrals_ & ActiveIntegrals::coupling) {
357  bool add_low = true;
358  for( DHCellSide neighb_side : cell.neighb_sides() ) { // cell -> elm lower dim, neighb_side -> elm higher dim
359  if (cell.dim() != neighb_side.dim()-1) continue;
360  this->add_coupling_integral(cell, neighb_side, add_low);
361  add_low = false;
362  }
363  }
364  }
365 
366  /// Add data of volume integral to appropriate data structure.
367  inline void add_volume_integral(const DHCellAccessor &cell) {
368  uint subset_idx = integrals_.bulk_[cell.dim()-1]->get_subset_idx();
369  bulk_integral_data_.emplace_back(cell, subset_idx);
370 
371  unsigned int reg_idx = cell.elm().region_idx().idx();
372  // Different access than in other integrals: We can't use range method CellIntegral::points
373  // because it passes element_patch_idx as argument that is not known during patch construction.
374  for (uint i=uint( eval_points_->subset_begin(cell.dim(), subset_idx) );
375  i<uint( eval_points_->subset_end(cell.dim(), subset_idx) ); ++i) {
376  element_cache_map_.eval_point_data_.emplace_back(reg_idx, cell.elm_idx(), i, cell.local_idx());
377  }
378  }
379 
380  /// Add data of edge integral to appropriate data structure.
381  inline void add_edge_integral(const DHCellSide &cell_side) {
382  auto range = cell_side.edge_sides();
383  edge_integral_data_.emplace_back(range, integrals_.edge_[range.begin()->dim()-1]->get_subset_idx());
384 
385  for( DHCellSide edge_side : range ) {
386  unsigned int reg_idx = edge_side.element().region_idx().idx();
387  for (auto p : integrals_.edge_[range.begin()->dim()-1]->points(edge_side, &element_cache_map_) ) {
388  element_cache_map_.eval_point_data_.emplace_back(reg_idx, edge_side.elem_idx(), p.eval_point_idx(), edge_side.cell().local_idx());
389  }
390  }
391  }
392 
393  /// Add data of coupling integral to appropriate data structure.
394  inline void add_coupling_integral(const DHCellAccessor &cell, const DHCellSide &ngh_side, bool add_low) {
395  coupling_integral_data_.emplace_back(cell, integrals_.coupling_[cell.dim()-1]->get_subset_low_idx(), ngh_side,
396  integrals_.coupling_[cell.dim()-1]->get_subset_high_idx());
397 
398  unsigned int reg_idx_low = cell.elm().region_idx().idx();
399  unsigned int reg_idx_high = ngh_side.element().region_idx().idx();
400  for (auto p : integrals_.coupling_[cell.dim()-1]->points(ngh_side, &element_cache_map_) ) {
401  element_cache_map_.eval_point_data_.emplace_back(reg_idx_high, ngh_side.elem_idx(), p.eval_point_idx(), ngh_side.cell().local_idx());
402 
403  if (add_low) {
404  auto p_low = p.lower_dim(cell); // equivalent point on low dim cell
405  element_cache_map_.eval_point_data_.emplace_back(reg_idx_low, cell.elm_idx(), p_low.eval_point_idx(), cell.local_idx());
406  }
407  }
408  }
409 
410  /// Add data of boundary integral to appropriate data structure.
411  inline void add_boundary_integral(const DHCellSide &bdr_side) {
412  boundary_integral_data_.emplace_back(integrals_.boundary_[bdr_side.dim()-1]->get_subset_low_idx(), bdr_side,
413  integrals_.boundary_[bdr_side.dim()-1]->get_subset_high_idx());
414 
415  unsigned int reg_idx = bdr_side.element().region_idx().idx();
416  for (auto p : integrals_.boundary_[bdr_side.dim()-1]->points(bdr_side, &element_cache_map_) ) {
417  element_cache_map_.eval_point_data_.emplace_back(reg_idx, bdr_side.elem_idx(), p.eval_point_idx(), bdr_side.cell().local_idx());
418 
419  auto p_bdr = p.point_bdr(bdr_side.cond().element_accessor()); // equivalent point on boundary element
420  unsigned int bdr_reg = bdr_side.cond().element_accessor().region_idx().idx();
421  // invalid local_idx value, DHCellAccessor of boundary element doesn't exist
422  element_cache_map_.eval_point_data_.emplace_back(bdr_reg, bdr_side.cond().bc_ele_idx(), p_bdr.eval_point_idx(), -1);
423  }
424  }
425 
426  /// Calls cache_reallocate method on
427  inline void reallocate_cache() {
428  multidim_assembly_[1_d]->eq_fields_->cache_reallocate(this->element_cache_map_, multidim_assembly_[1_d]->used_fields_);
429  DebugOut() << "Order of evaluated fields (" << DimAssembly<1>::name() << "):" << multidim_assembly_[1_d]->eq_fields_->print_dependency();
430  }
431 
432 
433  /// Assembly object
435 
436  /// Holds mask of active integrals.
438 
439  AssemblyIntegrals integrals_; ///< Holds integral objects.
440  std::shared_ptr<EvalPoints> eval_points_; ///< EvalPoints object shared by all integrals
441  ElementCacheMap element_cache_map_; ///< ElementCacheMap according to EvalPoints
442 
443  // Following variables hold data of all integrals depending of actual computed element.
444  // TODO sizes of arrays should be set dynamically, depend on number of elements in ElementCacheMap,
445  RevertableList<BulkIntegralData> bulk_integral_data_; ///< Holds data for computing bulk integrals.
446  RevertableList<EdgeIntegralData> edge_integral_data_; ///< Holds data for computing edge integrals.
447  RevertableList<CouplingIntegralData> coupling_integral_data_; ///< Holds data for computing couplings integrals.
448  RevertableList<BoundaryIntegralData> boundary_integral_data_; ///< Holds data for computing boundary integrals.
449 };
450 
451 
452 #endif /* GENERIC_ASSEMBLY_HH_ */
void add_coupling_integral(const DHCellAccessor &cell, const DHCellSide &ngh_side, bool add_low)
Add data of coupling integral to appropriate data structure.
Definition: mixed.hh:25
Range< DHCellSide > side_range() const
Returns range of cell sides.
unsigned int elm_idx() const
Return serial idx to element of loc_ele_idx_.
DHCellSide side
Specified cell side (higher dim element)
void add_edge_integral(const DHCellSide &cell_side)
Add data of edge integral to appropriate data structure.
std::shared_ptr< EvalPoints > eval_points() const
Geter to EvalPoints object.
unsigned int uint
void assemble_edge_integrals()
Assembles the edge integrals for the given dimension.
RevertableList< EdgeIntegralData > edge_integral_data_
Holds data for computing edge integrals.
BulkIntegralData()
Default constructor.
unsigned int dim() const
Return dimension of element appropriate to the side.
unsigned int side_subset_index
Index (order) of higher dim subset in EvalPoints object.
static unsigned int get()
Return number of stored elements.
unsigned int subset_index
Index (order) of subset in EvalPoints object.
unsigned int elem_idx() const
int active_integrals_
Holds mask of active integrals.
void reallocate_cache()
Calls cache_reallocate method on.
BoundaryIntegralData(unsigned int bdr_idx, DHCellSide dhside, unsigned int side_idx)
Constructor with data mebers initialization.
std::array< std::shared_ptr< CouplingIntegral >, 2 > coupling_
Coupling integrals between elements of dimensions 1-2, 2-3.
void assemble(std::shared_ptr< DOFHandlerMultiDim > dh)
General assemble methods.
unsigned int dim() const
Return dimension of element appropriate to cell.
unsigned int local_idx() const
Return local index to element (index of DOF handler).
BulkIntegralData(DHCellAccessor dhcell, unsigned int subset_idx)
Constructor with data mebers initialization.
MixedPtr< DimAssembly, 1 > multidim_assembly() const
Getter to set of assembly objects.
Directing class of FieldValueCache.
Iter< Object > make_iter(Object obj)
void assemble_cell_integrals()
Assembles the cell integrals for the given dimension.
Cell accessor allow iterate over DOF handler cells.
uint bc_ele_idx()
Definition: accessors.hh:345
EdgeIntegralData(const EdgeIntegralData &other)
Copy constructor.
unsigned int bulk_subset_index
Index (order) of lower dim subset in EvalPoints object.
BoundaryIntegralData()
Default constructor.
RevertableList< CouplingIntegralData > coupling_integral_data_
Holds data for computing couplings integrals.
bool is_own() const
Return true if accessor represents own element (false for ghost element)
EdgeIntegralData()
Default constructor.
BulkIntegralData(const BulkIntegralData &other)
Copy constructor.
const ElementCacheMap & cache_map() const
Return ElementCacheMap.
void assemble_integrals()
Call assemblations when patch is filled.
std::array< std::shared_ptr< EdgeIntegral >, 3 > edge_
Edge integrals between elements of dimensions 1, 2, 3.
const ElementAccessor< 3 > elm() const
Return ElementAccessor to element of loc_ele_idx_.
unsigned int bdr_subset_index
Index (order) of subset on boundary element in EvalPoints object.
RangeConvert< DHEdgeSide, DHCellSide > edge_sides() const
Returns range of all sides looped over common Edge.
CouplingIntegralData(DHCellAccessor dhcell, unsigned int bulk_idx, DHCellSide dhside, unsigned int side_idx)
Constructor with data mebers initialization.
void add_boundary_integral(const DHCellSide &bdr_side)
Add data of boundary integral to appropriate data structure.
unsigned int side_subset_index
Index (order) of subset on side of bulk element in EvalPoints object.
RangeConvert< DHEdgeSide, DHCellSide > edge_side_range
Specified cell side (element)
ElementAccessor< 3 > element() const
RangeConvert< DHNeighbSide, DHCellSide > neighb_sides() const
Returns range of neighbour cell of lower dimension corresponding to cell of higher dimension...
DHCellAccessor cell
Specified cell (element)
Boundary cond() const
#define START_TIMER(tag)
Starts a timer with specified tag.
ElementCacheMap element_cache_map_
ElementCacheMap according to EvalPoints.
unsigned int IntDim
A dimension index type.
Definition: mixed.hh:19
BoundaryIntegralData(const BoundaryIntegralData &other)
Copy constructor.
RevertableList< BoundaryIntegralData > boundary_integral_data_
Holds data for computing boundary integrals.
std::array< std::shared_ptr< BulkIntegral >, 3 > bulk_
Bulk integrals of elements of dimensions 1, 2, 3.
DHCellSide side
Specified cell side (bulk element)
const DHCellAccessor & cell() const
Return DHCellAccessor appropriate to the side.
CouplingIntegralData()
Default constructor.
MixedPtr< DimAssembly, 1 > multidim_assembly_
Assembly object.
Struct is a container that encapsulates variable size arrays.
RevertableList< BulkIntegralData > bulk_integral_data_
Holds data for computing bulk integrals.
Generic class of assemblation.
std::array< std::shared_ptr< BoundaryIntegral >, 3 > boundary_
Boundary integrals betwwen elements of dimensions 1, 2, 3 and boundaries.
RegionIdx region_idx() const
Definition: accessors.hh:168
Definitions of particular quadrature rules on simplices.
GenericAssembly(typename DimAssembly< 1 >::EqFields *eq_fields, typename DimAssembly< 1 >::EqData *eq_data)
Constructor.
void add_integrals_of_computing_step(DHCellAccessor cell)
#define END_TIMER(tag)
Ends a timer with specified tag.
std::shared_ptr< EvalPoints > eval_points_
EvalPoints object shared by all integrals.
void add_volume_integral(const DHCellAccessor &cell)
Add data of volume integral to appropriate data structure.
void assemble_boundary_side_integrals()
Assembles the boundary side integrals for the given dimension.
void assemble_neighbour_integrals()
Assembles the neighbours integrals for the given dimension.
#define DebugOut()
Macro defining &#39;debug&#39; record of log.
Definition: logger.hh:276
unsigned int subset_index
Index (order) of subset in EvalPoints object.
EdgeIntegralData(RangeConvert< DHEdgeSide, DHCellSide > range, unsigned int subset_idx)
Constructor with data mebers initialization.
CouplingIntegralData(const CouplingIntegralData &other)
Copy constructor.
ActiveIntegrals
Allow set mask of active integrals.
Side accessor allows to iterate over sides of DOF handler cell.
ElementAccessor< 3 > element_accessor()
Set of all used integral necessary in assemblation.
unsigned int idx() const
Returns a global index of the region.
Definition: region.hh:82
Class allows to iterate over sides of edge.
AssemblyIntegrals integrals_
Holds integral objects.