Rheolef  7.1
an efficient C++ finite element environment
test

test-function in variational formulation

Description

This class, and its associated trial one, is used for test and trial functions involved in variational formulations. Variational formulations are specified by expressions of the C++ language.

A test function is the formal argument involved in the expression for the integrate function:

    geo omega ("circle");
    space Xh (omega, "P1");
    test v (Xh);
    field lh = integrate (omega, 2*v);

For a bilinear form, the test function represents its second formal argument, while its first one is referred to as the trial one:

    trial u (Xh);
    test  v (Xh);
    form a = integrate (omega, dot(grad(u),grad(v)));

Implementation

This documentation has been generated from file main/lib/test.h

The test and trial classes are simply aliases to the test_basic class:

typedef test_basic<Float,rheo_default_memory_model,details::vf_tag_01> test;
typedef test_basic<Float,rheo_default_memory_model,details::vf_tag_10> trial;

The test_basic class provides an interface, via the smart_pointer class family, to a data container:

template <class T, class M, class VfTag>
class test_basic : public smart_pointer<test_rep<T,M> > {
public :
// typedefs:
typedef test_rep<T,M> rep;
typedef smart_pointer<rep> base;
typedef typename rep::size_type size_type;
typedef typename rep::memory_type memory_type;
typedef typename rep::value_type value_type;
typedef typename rep::scalar_type scalar_type;
typedef typename rep::float_type float_type;
typedef typename rep::geo_type geo_type;
typedef typename rep::space_type space_type;
typedef typename rep::diff_type diff_type;
typedef VfTag vf_tag_type;
typedef test_basic<T,M,VfTag> self_type;
typedef test_basic<T,M,vf_dual_tag_type> dual_self_type;
// allocator/deallocator:
explicit test_basic (const space_type& V) : base(new_macro(rep(V))) {}
// accessors:
const space_type& get_vf_space() const { return base::data().get_vf_space(); }
space_constant::valued_type valued_tag() const { return base::data().valued_tag(); }
size_type n_derivative() const { return base::data().n_derivative(); }
size_type size() const { return get_vf_space().size(); }
details::test_component<T,M,VfTag> operator[] (size_type i_comp) const;
};
rheolef::test_rep::scalar_type
T scalar_type
Definition: test.h:100
rheolef::test_basic::valued_tag
space_constant::valued_type valued_tag() const
Definition: test.h:235
rheolef::test_rep::geo_type
geo_basic< float_type, M > geo_type
Definition: test.h:102
rheolef::smart_pointer_base< T, details::constructor_copy< T > >::data
const T & data() const
Definition: smart_pointer.h:266
rheolef::details::dual_vf_tag::type
vf_tag_nonlinear type
Definition: field_expr_variational_tag.h:58
rheolef::test_rep::diff_type
details::differentiate_option::type diff_type
Definition: test.h:104
rheolef::test_basic::geo_type
rep::geo_type geo_type
Definition: test.h:218
rheolef::space_constant::valued_type
valued_type
Definition: space_constant.h:135
rheolef::test_basic::memory_type
rep::memory_type memory_type
Definition: test.h:214
rheolef::trial
test_basic< Float, rheo_default_memory_model, details::vf_tag_10 > trial
Definition: test.h:327
rheolef::test_rep::size_type
std::size_t size_type
Definition: test.h:97
rheolef::test_basic::size
size_type size() const
Definition: test.h:238
rheolef::test
test_basic< Float, rheo_default_memory_model, details::vf_tag_01 > test
Definition: test.h:324
rheolef::test_basic::space_type
rep::space_type space_type
Definition: test.h:219
rheolef::test_basic::self_type
test_basic< T, M, VfTag > self_type
Definition: test.h:224
rheolef::test_rep::space_type
space_basic< float_type, M > space_type
Definition: test.h:103
rheolef::test_basic::scalar_type
rep::scalar_type scalar_type
Definition: test.h:216
rheolef::test_basic::test_basic
test_basic(const space_type &V)
Definition: test.h:229
rheolef::test_basic::vf_tag_type
VfTag vf_tag_type
Definition: test.h:221
rheolef::test_rep::memory_type
M memory_type
Definition: test.h:98
rheolef::test_basic::diff_type
rep::diff_type diff_type
Definition: test.h:220
rheolef::test_rep::valued_hint
static const space_constant::valued_type valued_hint
Definition: test.h:115
rheolef::test_basic::get_vf_space
const space_type & get_vf_space() const
Definition: test.h:233
rheolef::test_basic::operator[]
details::test_component< T, M, VfTag > operator[](size_type i_comp) const
Definition: test_component.h:534
rheolef::test_basic::valued_hint
static const space_constant::valued_type valued_hint
Definition: test.h:234
rheolef::test_basic::rep
test_rep< T, M > rep
Definition: test.h:211
rheolef::test_basic::value_type
rep::value_type value_type
Definition: test.h:215
rheolef::test_basic::size_type
rep::size_type size_type
Definition: test.h:213
rheolef::test_rep::float_type
float_traits< T >::type float_type
Definition: test.h:101
rheolef::test_basic::base
smart_pointer< rep > base
Definition: test.h:212
rheolef::test_rep::value_type
undeterminated_basic< T > value_type
Definition: test.h:99
size_type
field::size_type size_type
Definition: branch.cc:425
rheolef::test_basic::dual_self_type
test_basic< T, M, vf_dual_tag_type > dual_self_type
Definition: test.h:225
rheolef::test_basic::float_type
rep::float_type float_type
Definition: test.h:217
rheolef::test_basic::vf_dual_tag_type
details::dual_vf_tag< VfTag >::type vf_dual_tag_type
Definition: test.h:223
rheolef::test_basic::n_derivative
size_type n_derivative() const
Definition: test.h:236