1# ifndef _RHEOLEF_TEST_H
2# define _RHEOLEF_TEST_H
76#include "rheolef/space.h"
77#include "rheolef/fem_on_pointset.h"
78#include "rheolef/band.h"
79#include "rheolef/piola_util.h"
80#include "rheolef/vf_tag.h"
87template <
class T,
class M,
class VfTag>
class test_component;
92template <
class T,
class M>
126 const band_basic<float_type,memory_type>&
gh,
136 template<
class Value, diff_type Diff>
140 const details::differentiate_option& gopt,
141 Eigen::Matrix<Value,Eigen::Dynamic,Eigen::Dynamic>& value)
const;
143 template<
class Value, diff_type Diff>
148 const details::differentiate_option& gopt,
149 Eigen::Matrix<Value,Eigen::Dynamic,Eigen::Dynamic>& value)
const;
151 template<
class Value>
156 <<
"-valued one is expected in expression");
158 template<
class Value>
162 check_macro (
_V.valued_tag() == arg_valued_tag,
"grad(): unexpected "<<
_V.valued()
164 <<
"-valued one is expected in expression");
166 template<
class Value>
170 check_macro (
_V.valued_tag() == arg_valued_tag,
"div(): unexpected "<<
_V.valued()
172 <<
"-valued one is expected in expression");
174 template<
class Value>
178 template<
class Value>
184 const Eigen::Matrix<Value,Eigen::Dynamic,Eigen::Dynamic>& value0,
185 const Eigen::Matrix<Value,Eigen::Dynamic,Eigen::Dynamic>& value1,
186 Eigen::Matrix<Value,Eigen::Dynamic,Eigen::Dynamic>& value)
const;
206template <
class T,
class M,
class VfTag>
247 { base::data().initialize (pops, iopt); }
252 { base::data().initialize (
gh, pops, iopt); }
257 { base::data().initialize (Xh, pops, iopt); }
261 template<
class Value, diff_type Diff>
266 Eigen::Matrix<Value,Eigen::Dynamic,Eigen::Dynamic>& value)
const
267 { base::data().template evaluate<Value,Diff> (omega_K, K, gopt, value); }
269 template<
class Value, diff_type Diff>
275 Eigen::Matrix<Value,Eigen::Dynamic,Eigen::Dynamic>& value,
276 bool do_local_component_assembly_unused)
const
277 { base::data().template evaluate_on_side<Value,Diff> (omega_K, K, sid, gopt, value); }
280 template<
class Value>
284 Eigen::Matrix<Value,Eigen::Dynamic,Eigen::Dynamic>& value)
const
287 base::data().template evaluate<Value,details::differentiate_option::none> (omega_K, K, none, value);
289 template<
class Value>
294 Eigen::Matrix<Value,Eigen::Dynamic,Eigen::Dynamic>& value,
295 bool do_local_component_assembly_unused)
const
298 base::data().template evaluate_on_side<Value,details::differentiate_option::none> (omega_K, K, sid, none, value);
300 template<
class Value>
301 void valued_check()
const { base::data().template valued_check<Value>(); }
302 template<
class Value>
304 template<
class Value>
306 template<
class Value>
309 template<
class Value>
315 const Eigen::Matrix<Value,Eigen::Dynamic,Eigen::Dynamic>& value0,
316 const Eigen::Matrix<Value,Eigen::Dynamic,Eigen::Dynamic>& value1,
317 Eigen::Matrix<Value,Eigen::Dynamic,Eigen::Dynamic>& value)
const
318 { base::data().local_dg_merge_on_side (omega_K, S, K0, K1, value0, value1, value); }
field::size_type size_type
field gh(Float epsilon, Float t, const field &uh, const test &v)
see the geo_element page for the full documentation
see the integrate_option page for the full documentation
see the reference_element page for the full documentation
see the smart_pointer page for the full documentation
void curl_valued_check() const
void initialize(const piola_on_pointset< float_type > &pops, const integrate_option &iopt)
typename rep::memory_type memory_type
void initialize(const band_basic< float_type, memory_type > &gh, const piola_on_pointset< float_type > &pops, const integrate_option &iopt)
void evaluate(const geo_basic< T, M > &omega_K, const geo_element &K, Eigen::Matrix< Value, Eigen::Dynamic, Eigen::Dynamic > &value) const
typename rep::size_type size_type
void div_valued_check() const
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, bool do_local_component_assembly_unused) const
void grad_valued_check() const
typename rep::diff_type diff_type
void valued_check() const
test_basic< T, M, vf_dual_tag_type > dual_self_type
typename rep::value_type value_type
test_basic< T, M, VfTag > self_type
static const space_constant::valued_type valued_hint
size_type n_derivative() const
details::test_component< T, M, VfTag > operator[](size_type i_comp) const
typename rep::float_type float_type
smart_pointer< rep > base
typename rep::space_type space_type
typename rep::geo_type geo_type
typename details::dual_vf_tag< VfTag >::type vf_dual_tag_type
test_basic(const space_type &V)
typename rep::is_elementwise is_elementwise
void evaluate_on_side(const geo_basic< T, M > &omega_K, const geo_element &K, const side_information_type &sid, Eigen::Matrix< Value, Eigen::Dynamic, Eigen::Dynamic > &value, bool do_local_component_assembly_unused) const
void local_dg_merge_on_side(const geo_basic< T, M > &omega_K, const geo_element &S, const geo_element &K0, const geo_element &K1, const Eigen::Matrix< Value, Eigen::Dynamic, Eigen::Dynamic > &value0, const Eigen::Matrix< Value, Eigen::Dynamic, Eigen::Dynamic > &value1, Eigen::Matrix< Value, Eigen::Dynamic, Eigen::Dynamic > &value) const
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 space_basic< float_type, memory_type > &Xh, const piola_on_pointset< float_type > &pops, const integrate_option &iopt)
typename rep::scalar_type scalar_type
space_constant::valued_type valued_tag() const
const space_type & get_vf_space() const
undeterminated_basic< T > value_type
void curl_valued_check() const
void initialize(const piola_on_pointset< float_type > &pops, const integrate_option &iopt)
band_basic< float_type, M > _gh
void div_valued_check() const
void grad_valued_check() const
void valued_check() const
fem_on_pointset< float_type > _fops
bool _is_inside_on_local_sides
void _element_initialize_on_side(const geo_element &K, const side_information_type &sid)
static const space_constant::valued_type valued_hint
size_type n_derivative() const
geo_basic< float_type, M > geo_type
details::differentiate_option::type diff_type
space_basic< float_type, M > space_type
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
void local_dg_merge_on_side(const geo_basic< T, M > &omega_K, const geo_element &S, const geo_element &K0, const geo_element &K1, const Eigen::Matrix< Value, Eigen::Dynamic, Eigen::Dynamic > &value0, const Eigen::Matrix< Value, Eigen::Dynamic, Eigen::Dynamic > &value1, Eigen::Matrix< Value, Eigen::Dynamic, Eigen::Dynamic > &value) const
void _evaluate_init(const reference_element &hat_K) const
void _element_initialize(const geo_element &K) const
std::true_type is_elementwise
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
test_rep< T, M > & operator=(const test_rep< T, M > &)
typename float_traits< T >::type float_type
space_constant::valued_type valued_tag() const
const space_type & get_vf_space() const
test_basic< Float, rheo_default_memory_model, details::vf_tag_10 > trial
test_basic< Float, rheo_default_memory_model, details::vf_tag_01 > test
check_macro(expr1.have_homogeneous_space(Xh1), "dual(expr1,expr2); expr1 should have homogeneous space. HINT: use dual(interpolate(Xh, expr1),expr2)")
const std::string & valued_name(valued_type valued_tag)
This file is part of Rheolef.
undeterminated_basic< typename scalar_traits< T >::type > type
point_basic< typename scalar_traits< T >::type > type
helper for generic field value_type: T, point_basic<T> or tensor_basic<T>