Flow123d  DF_patch_fe_darcy_complete-579fe1e
integral_acc.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_acc.cc
15  * @brief
16  * @author David Flanderka
17  */
18 
19 #include "fem/integral_points.hh"
20 #include "fem/integral_acc.hh"
21 #include "fem/eval_points.hh"
22 #include "fem/element_cache_map.hh"
23 
24 
25 /******************************************************************************
26  * Implementation of BaseIntegral methods
27  */
28 namespace internal {
30  {}
31 }
32 
33 
34 /******************************************************************************
35  * Implementation of BulkIntegral methods
36  */
37 
39 {}
40 
41 
42 /******************************************************************************
43  * Implementation of EdgeIntegral methods
44  */
45 
46 
48 }
49 
50 
51 /******************************************************************************
52  * Implementation of CouplingIntegral methods
53  */
54 
56 {
57  internal_edge_.reset();
58  internal_bulk_.reset();
59 }
60 
61 
62 
63 /******************************************************************************
64  * Implementation of BoundaryIntegral methods
65  */
66 
67 BoundaryIntegral::BoundaryIntegral(std::shared_ptr<EvalPoints> eval_points, Quadrature *quad, unsigned int dim)
68  : internal::BaseIntegral(eval_points, dim)
69 {
70  switch (dim) {
71  case 1:
72  internal_bulk_ = eval_points->add_bulk_internal<0>(quad);
73  internal_edge_ = eval_points->add_edge_internal<1>(quad);
74  break;
75  case 2:
76  internal_bulk_ = eval_points->add_bulk_internal<1>(quad);
77  internal_edge_ = eval_points->add_edge_internal<2>(quad);
78  break;
79  case 3:
80  internal_bulk_ = eval_points->add_bulk_internal<2>(quad);
81  internal_edge_ = eval_points->add_edge_internal<3>(quad);
82  break;
83  default:
84  ASSERT(false).error("Should not happen!\n");
85  }
86 }
87 
89 {
90  internal_edge_.reset();
91  internal_bulk_.reset();
92 }
#define ASSERT(expr)
Definition: asserts.hh:351
~BoundaryIntegral()
Destructor.
Definition: integral_acc.cc:88
BoundaryIntegral()
Default constructor.
std::shared_ptr< internal_integrals::Bulk > internal_bulk_
Integral according to kower dim (boundary) element subset part in EvalPoints object.
std::shared_ptr< internal_integrals::Edge > internal_edge_
Integral according to higher dim (bulk) element subset part in EvalPoints object.
~BulkIntegral()
Destructor.
Definition: integral_acc.cc:38
std::shared_ptr< internal_integrals::Edge > internal_edge_
Integral according to side subset part (element of higher dim) in EvalPoints object.
std::shared_ptr< internal_integrals::Bulk > internal_bulk_
Integral according to bulk subset part (element of lower dim) in EvalPoints object.
~CouplingIntegral()
Destructor.
Definition: integral_acc.cc:55
~EdgeIntegral()
Destructor.
Definition: integral_acc.cc:47
Base class for quadrature rules on simplices in arbitrary dimensions.
Definition: quadrature.hh:48
std::shared_ptr< EvalPoints > eval_points() const
Getter of eval_points.
Definition: integral_acc.hh:63
unsigned int dim() const
Returns dimension.
Definition: integral_acc.hh:68
virtual ~BaseIntegral()
Destructor.
Definition: integral_acc.cc:29