Flow123d  DF_patch_fe_mechanics-5faa023
op_accessors_impl.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 op_accessors.hh
15  * @brief Declares accessors to FE operations.
16  * @author David Flanderka
17  */
18 
19 #ifndef OP_ACCESSORS_IMPL_HH_
20 #define OP_ACCESSORS_IMPL_HH_
21 
22 #include "fem/patch_fe_values.hh"
23 #include "fem/op_accessors.hh"
24 #include "fem/patch_op.hh"
25 
26 
27 template <class ValueType>
28 inline ValueType ElQ<ValueType>::operator()(const BulkPoint &point) const {
29  return patch_op_->elem_value<ValueType>( point.value_cache_idx() );
30 }
31 
32 template <class ValueType>
33 inline ValueType ElQ<ValueType>::operator()(const SidePoint &point) const {
34  return patch_op_->elem_value<ValueType>( point.value_cache_idx() );
35 }
36 
37 template <class ValueType>
38 inline ValueType FeQ<ValueType>::operator()(const BulkPoint &point) const {
39  ASSERT_PTR(patch_op_bulk_);
40  return patch_op_bulk_->point_value<ValueType>(point.value_cache_idx(), i_shape_fn_idx_);
41 }
42 
43 template <class ValueType>
44 inline ValueType FeQ<ValueType>::operator()(const SidePoint &point) const {
45  ASSERT_PTR(patch_op_side_);
46  return patch_op_side_->point_value<ValueType>(point.value_cache_idx(), i_shape_fn_idx_);
47 }
48 
49 #endif /* OP_ACCESSORS_IMPL_HH_ */
#define ASSERT_PTR(ptr)
Definition of assert macro checking non-null pointer (PTR) only for debug mode.
Definition: asserts.hh:341
Base point accessor class.
Definition: eval_subset.hh:55
unsigned int value_cache_idx() const
Return index in ElementCacheMap.
Definition: eval_subset.hh:89
ValueType operator()(const BulkPoint &point) const
ValueType operator()(const BulkPoint &point) const
General point a+ side_begin_ + ccessor allow iterate over quadrature points of given side defined in ...
Definition: eval_subset.hh:121
unsigned int value_cache_idx() const
Return index in ElementCacheMap.
Definition: eval_subset.hh:153
Declares accessors to FE operations.
Class FEValues calculates finite element data on the actual cells such as shape function values,...
Base class of FE operations.