Rheolef  7.2
an efficient C++ finite element environment
 
Loading...
Searching...
No Matches
field_evaluate.h
Go to the documentation of this file.
1#ifndef _RHEOLEF_FIELD_EVALUATE_H
2#define _RHEOLEF_FIELD_EVALUATE_H
23//
24// evaluate a field on a predefined point set: hat_x[q], q=0..nq
25// See also piola_transformation.h
26//
27#include "rheolef/field.h"
28#include "rheolef/fem_on_pointset.h"
29namespace rheolef {
30
31// -----------------------------------------------------
32// scalar-valued case:
33// -----------------------------------------------------
34template<class T, class M>
35void
37 const field_basic<T,M>& uh,
38 const basis_on_pointset<T>& bops,
39 reference_element hat_K,
40 const std::vector<size_t>& dis_idof,
41 Eigen::Matrix<T,Eigen::Dynamic,1>& value);
42// -----------------------------------------------------
43// vector-valued case:
44// -----------------------------------------------------
45template<class T, class M>
46void
48 const field_basic<T,M>& uh,
49 const basis_on_pointset<T>& bops,
50 reference_element hat_K,
51 const std::vector<size_t>& dis_idof_tab,
52 const basis_on_pointset<T>& piola_on_geo_basis,
53 std::vector<size_t>& dis_inod_geo,
54 Eigen::Matrix<point_basic<T>,Eigen::Dynamic,1>& value);
55// -----------------------------------------------------
56// tensor-valued case:
57// -----------------------------------------------------
58template<class T, class M>
59void
61 const field_basic<T,M>& uh,
62 const basis_on_pointset<T>& bops,
63 reference_element hat_K,
64 const std::vector<size_t>& dis_idof_tab,
65 Eigen::Matrix<tensor_basic<T>,Eigen::Dynamic,1>& value);
66// -----------------------------------------------------
67// homogeneous multi-component case: get the i-th value
68// -----------------------------------------------------
69template<class T, class M>
70void
72 const field_basic<T,M>& uh,
73 const basis_on_pointset<T>& bops,
74 reference_element hat_K,
75 const std::vector<size_t>& dis_idof_tab,
76 size_t k_comp,
77 Eigen::Matrix<T,Eigen::Dynamic,1>& value);
78// -----------------------------------------------------
79// generic interface
80// -----------------------------------------------------
81template<class T, class M>
82inline
83void
85 const field_basic<T,M>& uh,
86 const basis_on_pointset<T>& bops,
88 const std::vector<size_t>& dis_idof,
89 const basis_on_pointset<T>& piola_on_geo_basis,
90 std::vector<size_t>& dis_inod_geo,
91 Eigen::Matrix<T,Eigen::Dynamic,1>& value)
92{
93 field_evaluate (uh, bops, hat_K, dis_idof, value);
94}
95template<class T, class M>
96inline
97void
99 const field_basic<T,M>& uh,
100 const basis_on_pointset<T>& bops,
101 reference_element hat_K,
102 const std::vector<size_t>& dis_idof,
103 const basis_on_pointset<T>& piola_on_geo_basis,
104 std::vector<size_t>& dis_inod_geo,
105 Eigen::Matrix<point_basic<T>,Eigen::Dynamic,1>& value)
106{
107 vector_field_evaluate (uh, bops, hat_K, dis_idof, piola_on_geo_basis, dis_inod_geo, value);
108}
109template<class T, class M>
110inline
111void
113 const field_basic<T,M>& uh,
114 const basis_on_pointset<T>& bops,
115 reference_element hat_K,
116 const std::vector<size_t>& dis_idof,
117 const basis_on_pointset<T>& piola_on_geo_basis,
118 std::vector<size_t>& dis_inod_geo,
119 Eigen::Matrix<tensor_basic<T>,Eigen::Dynamic,1>& value)
120{
121 tensor_field_evaluate (uh, bops, hat_K, dis_idof, value);
122}
123template<class T, class M>
124inline
125void
127 const field_basic<T,M>& uh,
128 const basis_on_pointset<T>& bops,
129 reference_element hat_K,
130 const std::vector<size_t>& dis_idof,
131 const basis_on_pointset<T>& piola_on_geo_basis,
132 std::vector<size_t>& dis_inod_geo,
133 Eigen::Matrix<tensor3_basic<T>,Eigen::Dynamic,1>& value)
134{
135 fatal_macro ("tensor3: not yet");
136#ifdef TODO
137 value = tensor3_field_evaluate (uh, bops, hat_K, dis_idof, q);
138#endif // TODO
139}
140template<class T, class M>
141inline
142void
144 const field_basic<T,M>& uh,
145 const basis_on_pointset<T>& bops,
146 reference_element hat_K,
147 const std::vector<size_t>& dis_idof,
148 const basis_on_pointset<T>& piola_on_geo_basis,
149 std::vector<size_t>& dis_inod_geo,
150 Eigen::Matrix<tensor4_basic<T>,Eigen::Dynamic,1>& value)
151{
152 fatal_macro ("tensor4: not yet");
153#ifdef TODO
154 value = tensor4_field_evaluate (uh, bops, hat_K, dis_idof, q);
155#endif // TODO
156}
157// -----------------------------------------------------
158// new basis interface
159// -----------------------------------------------------
160template<class T, class M, class Value>
161void
163 const field_basic<T,M>& uh,
164 const geo_basic<T,M>& omega_K,
165 const geo_element& K,
166 const Eigen::Matrix<Value,Eigen::Dynamic,Eigen::Dynamic>& phij_xi,
167 Eigen::Matrix<Value,Eigen::Dynamic,1>& value);
168
169template<class T, class M, class Value>
170void
172 const field_basic<T,M>& uh,
173 const fem_on_pointset<T>& fops,
174 const geo_basic<T,M>& omega_K,
175 const geo_element& K,
176 Eigen::Matrix<Value,Eigen::Dynamic,1>& value);
177
178}// namespace rheolef
179#endif // _RHEOLEF_FIELD_EVALUATE_H
see the reference_element page for the full documentation
#define fatal_macro(message)
Definition dis_macros.h:33
This file is part of Rheolef.
void general_field_evaluate(const field_basic< T, M > &uh, const basis_on_pointset< T > &bops, reference_element hat_K, const std::vector< size_t > &dis_idof, const basis_on_pointset< T > &piola_on_geo_basis, std::vector< size_t > &dis_inod_geo, Eigen::Matrix< T, Eigen::Dynamic, 1 > &value)
void field_evaluate(const field_basic< T, M > &uh, const basis_on_pointset< T > &bops, reference_element hat_K, const std::vector< size_t > &dis_idof, Eigen::Matrix< T, Eigen::Dynamic, 1 > &value)
void tensor_field_evaluate(const field_basic< T, M > &uh, const basis_on_pointset< T > &bops, reference_element hat_K, const std::vector< size_t > &dis_idof_tab, Eigen::Matrix< tensor_basic< T >, Eigen::Dynamic, 1 > &value)
void field_evaluate_continued(const field_basic< T, M > &uh, const geo_basic< T, M > &omega_K, const geo_element &K, const Eigen::Matrix< Value, Eigen::Dynamic, Eigen::Dynamic > &phij_xi, Eigen::Matrix< Value, Eigen::Dynamic, 1 > &value)
void vector_field_evaluate(const field_basic< T, M > &uh, const basis_on_pointset< T > &bops, reference_element hat_K, const std::vector< size_t > &dis_idof_tab, const basis_on_pointset< T > &piola_on_geo_basis, std::vector< size_t > &dis_inod_geo, Eigen::Matrix< point_basic< T >, Eigen::Dynamic, 1 > &value)
void field_component_evaluate(const field_basic< T, M > &uh, const basis_on_pointset< T > &bops, reference_element hat_K, const std::vector< size_t > &dis_idof_tab, size_t k_comp, Eigen::Matrix< T, Eigen::Dynamic, 1 > &value)