Rheolef  7.2
an efficient C++ finite element environment
 
Loading...
Searching...
No Matches
fem_on_pointset.h
Go to the documentation of this file.
1#ifndef _RHEOLEF_FEM_ON_POINTSET_H
2#define _RHEOLEF_FEM_ON_POINTSET_H
23//
24// evaluate a FEM basis on a mapped element K
25// on a full pointset, e.g. a quadrature node set
26// or an interpolation node set
27// where the FEM on K is defined via the Piola transformation:
28//
29// F : hat_K ---> K
30// hat_x +--> x = F(hat_x)
31//
32// and the corresponding FEM on the reference element
33//
34#include "rheolef/geo.h"
35#include "rheolef/basis_on_pointset.h"
36#include "rheolef/piola_on_pointset.h"
37namespace rheolef {
38
39// ----------------------------------------------------------------------------
40// representation
41// ----------------------------------------------------------------------------
42template<class T>
44public:
47
48// allocators:
49
51
52// accessors:
53
56
57// modifiers:
58
59 void initialize (
60 const basis_basic<T>& fem_basis,
61 const piola_on_pointset<T>& pops);
62
63 template<class M, class Value, diff_type Diff>
64 void
65 evaluate (
66 const geo_basic<T,M>& omega_K,
67 const geo_element& K,
68 const details::differentiate_option& gopt,
69 Eigen::Matrix<Value,Eigen::Dynamic,Eigen::Dynamic>& value) const;
70
71 template<class M, class Value, diff_type Diff>
72 void
74 const geo_basic<T,M>& omega_K,
75 const geo_element& K,
76 const side_information_type& sid,
77 const details::differentiate_option& gopt,
78 Eigen::Matrix<Value,Eigen::Dynamic,Eigen::Dynamic>& value) const;
79
80// internals:
81 template<class M, class Value>
83 const geo_basic<T,M>& omega_K,
84 const geo_element& K,
85 const Eigen::Matrix<Value,Eigen::Dynamic,Eigen::Dynamic>& hat_phij_xi,
86 Eigen::Matrix<Value,Eigen::Dynamic,Eigen::Dynamic>& value) const;
87
88//protected:
91
92// working area:
93public:
94 mutable std::array<
95 Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic>
97 mutable std::array<
98 Eigen::Matrix<point_basic<T>,Eigen::Dynamic,Eigen::Dynamic>
100 mutable std::array<
101 Eigen::Matrix<tensor_basic<T>,Eigen::Dynamic,Eigen::Dynamic>
103};
104template<class T>
106 : _bops(),
107 _pops(),
108 _scalar_phij_xi(),
109 _vector_phij_xi(),
110 _tensor_phij_xi()
111{
112}
113// ----------------------------------------------------------------------------
114// interface
115// ----------------------------------------------------------------------------
116template<class T>
117class fem_on_pointset: public smart_pointer<fem_on_pointset_rep<T> > {
118public:
121 typedef typename rep::size_type size_type;
122 typedef typename rep::diff_type diff_type;
123
124// allocators:
125
127
128// modifiers:
129
131 const basis_basic<T>& fem_basis,
132 const piola_on_pointset<T>& pops)
133 { base::data().initialize (fem_basis, pops); }
134
135// accessors:
136
138 { return base::data().get_basis_on_pointset(); }
140 { return base::data().get_piola_on_pointset(); }
141
142 template<class M, class Value, diff_type Diff>
143 void
145 const geo_basic<T,M>& omega_K,
146 const geo_element& K,
148 Eigen::Matrix<Value,Eigen::Dynamic,Eigen::Dynamic>& value) const
149 { base::data().template evaluate<M,Value,Diff> (omega_K, K, gopt, value); }
150
151 template<class M, class Value, diff_type Diff>
152 void
154 const geo_basic<T,M>& omega_K,
155 const geo_element& K,
156 const side_information_type& sid,
158 Eigen::Matrix<Value,Eigen::Dynamic,Eigen::Dynamic>& value) const
159 { base::data().template evaluate_on_side<M,Value,Diff> (omega_K, K, sid, gopt, value); }
160};
161template<class T>
162inline
164 : base(new_macro(rep))
165{
166}
167
168}// namespace rheolef
169#endif // _RHEOLEF_FEM_ON_POINTSET_H
basis_on_pointset< T > _bops
void _evaluate_post_piola(const geo_basic< T, M > &omega_K, const geo_element &K, const Eigen::Matrix< Value, Eigen::Dynamic, Eigen::Dynamic > &hat_phij_xi, Eigen::Matrix< Value, Eigen::Dynamic, Eigen::Dynamic > &value) const
reference_element::size_type size_type
std::array< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic >,reference_element::max_variant > _scalar_phij_xi
void evaluate(const geo_basic< T, M > &omega_K, const geo_element &K, const details::differentiate_option &gopt, Eigen::Matrix< Value, Eigen::Dynamic, Eigen::Dynamic > &value) const
void initialize(const basis_basic< T > &fem_basis, const piola_on_pointset< T > &pops)
const piola_on_pointset< T > & get_piola_on_pointset() const
details::differentiate_option::type diff_type
std::array< Eigen::Matrix< tensor_basic< T >, Eigen::Dynamic, Eigen::Dynamic >,reference_element::max_variant > _tensor_phij_xi
void evaluate_on_side(const geo_basic< T, M > &omega_K, const geo_element &K, const side_information_type &sid, const details::differentiate_option &gopt, Eigen::Matrix< Value, Eigen::Dynamic, Eigen::Dynamic > &value) const
std::array< Eigen::Matrix< point_basic< T >, Eigen::Dynamic, Eigen::Dynamic >,reference_element::max_variant > _vector_phij_xi
const basis_on_pointset< T > & get_basis_on_pointset() const
piola_on_pointset< T > _pops
void evaluate(const geo_basic< T, M > &omega_K, const geo_element &K, const details::differentiate_option &gopt, Eigen::Matrix< Value, Eigen::Dynamic, Eigen::Dynamic > &value) const
void initialize(const basis_basic< T > &fem_basis, const piola_on_pointset< T > &pops)
const piola_on_pointset< T > & get_piola_on_pointset() const
smart_pointer< rep > base
fem_on_pointset_rep< T > rep
void evaluate_on_side(const geo_basic< T, M > &omega_K, const geo_element &K, const side_information_type &sid, const details::differentiate_option &gopt, Eigen::Matrix< Value, Eigen::Dynamic, Eigen::Dynamic > &value) const
const basis_on_pointset< T > & get_basis_on_pointset() const
generic mesh with rerefence counting
Definition geo.h:1089
see the geo_element page for the full documentation
static const variant_type max_variant
std::vector< int >::size_type size_type
see the smart_pointer page for the full documentation
This file is part of Rheolef.