Flow123d  DF_patch_fe_darcy_complete-579fe1e
integral_points.cc
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 integral_points.cc
15  * @brief
16  * @author David Flanderka
17  */
18 
19 #include "fem/integral_points.hh"
20 #include "fem/integral_acc.hh"
21 
22 
23 
24 EdgePoint EdgePoint::point_on(const DHCellSide &edg_side) const {
25  uint element_patch_idx = elm_cache_map_->position_in_cache(edg_side.element().idx());
26  uint side_begin = integral_->side_begin(edg_side);
27  return EdgePoint(BulkPoint(elm_cache_map_, element_patch_idx, local_point_idx_),
28  integral_, side_begin);
29 }
30 
31 //******************************************************************************
33  unsigned int i_elm = elm_cache_map_->position_in_cache(cell_lower.elm().idx());
34  unsigned int i_ep = integral_->begin_idx() + local_point_idx_;
35  return BulkPoint(elm_cache_map_, i_elm, i_ep);
36 }
37 
38 
39 
40 //******************************************************************************
42  unsigned int i_elm = elm_cache_map_->position_in_cache(bdr_elm.idx(), true);
43  unsigned int i_ep = integral_->begin_idx() + local_point_idx_;
44  //DebugOut() << "begin:" << integral_->bulk_begin() << "iloc " << local_point_idx_;
45  return BulkPoint(elm_cache_map_, i_elm, i_ep);
46 }
BulkPoint point_bdr(ElementAccessor< 3 > bdr_elm) const
Return corresponds BulkPoint on boundary element.
std::shared_ptr< internal_integrals::Bulk > integral_
Pointer to internal bulk integral.
Base point accessor class.
const ElementCacheMap * elm_cache_map_
BulkPoint()
Default constructor.
unsigned int local_point_idx_
Index of the local point in the integral object.
std::shared_ptr< internal_integrals::Bulk > integral_
Pointer to internal bulk integral.
BulkPoint lower_dim(DHCellAccessor cell_lower) const
Return corresponds EdgePoint of neighbour side of same dimension (computing of side integrals).
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.
ElementAccessor< 3 > element() const
Point accessor allow iterate over quadrature points of given side defined in local element coordinate...
EdgePoint()
Default constructor.
EdgePoint point_on(const DHCellSide &edg_side) const
Return corresponds EdgePoint of neighbour side of same dimension (computing of side integrals).
std::shared_ptr< internal_integrals::Edge > integral_
unsigned int idx() const
We need this method after replacing Region by RegionIdx, and movinf RegionDB instance into particular...
Definition: accessors.hh:215
unsigned int position_in_cache(unsigned mesh_elm_idx, bool bdr=false) const
Return position of element stored in ElementCacheMap.
unsigned int uint