`space`

piecewise polynomial finite element space

# Description

The `space` class contains the numbering of the degrees of freedoms. The degrees of freedoms are the coefficients in the basis of the vectorial space of piecewise polynomial finite element functions. The set of degrees of freedom coefficients is splited in two subsets: the unknowns and the blocked degrees of freedoms. The blocked degrees of freedom are associated to Dirichlet boundary conditions, where the values of the function, and thus, of the coefficients, are prescribed. The unknown degrees of freedom are all the others. Finally, the `space` class is mainly a table of renumbering for these coefficients.

The space is characterized by two entities: its finite element, described by the `basis` class and its mesh, described by the `geo` class. By default, the space is scalar valued. It extends to vector and tensor valued functions.

# Example

        space Q (omega, "P1");
        space V (omega, "P2", "vector");
        space T (omega, "P1d", "tensor");

# Product of spaces

        space X = T*V*Q;
        space Q2 = pow(Q,2);

# Space of reals

The 'space::real()' function returns the space of reals and could be used in a product of spaces as:

        space IR = space::real();
        space Yh = Xh*IR;

This convention is useful e.g. when a Lagrange multiplier is a real, not a field. It extends to `IR^n` for any `size_t n` as:

        space IRn = pow(IR,n);

# Implementation

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

The `space` class is simply an alias to the `space_basic` class

typedef space_basic<Float> space;
rheolef::space
space_basic< Float > space
Definition: space.h:356

The `space_basic` class provides an interface to a data container:

template <class T>
class space_basic<T,sequential> : public smart_pointer<space_rep<T,sequential> > {
public:
// typedefs:
typedef space_rep<T,sequential> rep;
typedef smart_pointer<rep> base;
typedef typename rep::size_type size_type;
typedef typename rep::valued_type valued_type;
// allocators:
space_basic (const geo_basic<T,sequential>& omega = (geo_basic<T,sequential>()),
std::string approx = "",
std::string prod_valued = "scalar");
space_basic (const geo_basic<T,sequential>& omega,
const basis_basic<T>& b);
space_basic (const space_mult_list<T,sequential>& expr);
space_basic (const space_constitution<T,sequential>& constit);
static space_basic<T,sequential> real();
// accessors:
void block (std::string dom_name);
void unblock(std::string dom_name);
void block (const domain_indirect_basic<sequential>& dom);
void unblock(const domain_indirect_basic<sequential>& dom);
void block_n (std::string dom_name);
void unblock_n(std::string dom_name);
void block_n (const domain_indirect_basic<sequential>& dom);
void unblock_n(const domain_indirect_basic<sequential>& dom);
const distributor& ownership() const;
const communicator& comm() const;
size_type ndof() const;
size_type dis_ndof() const;
const geo_basic<T,sequential>& get_geo() const;
const basis_basic<T>& get_basis() const;
size_type size() const;
valued_type valued_tag() const;
const std::string& valued() const;
space_component<T,sequential> operator[] (size_type i_comp);
space_component_const<T,sequential> operator[] (size_type i_comp) const;
const space_constitution<T,sequential>& get_constitution() const;
size_type degree() const;
std::string get_approx() const;
std::string name() const;
void dis_idof (const geo_element& K, std::vector<size_type>& dis_idof) const;
const distributor& iu_ownership() const;
const distributor& ib_ownership() const;
bool is_blocked (size_type idof) const;
size_type dis_iub (size_type idof) const;
bool dis_is_blocked (size_type dis_idof) const;
size_type dis_idof2dis_iub (size_type dis_idof) const;
const distributor& ios_ownership() const;
size_type idof2ios_dis_idof (size_type idof) const;
size_type ios_idof2dis_idof (size_type ios_idof) const;
const point_basic<T>& xdof (size_type idof) const;
const disarray<point_basic<T>,sequential>& get_xdofs() const;
template <class Function>
T momentum (const Function& f, size_type idof) const;
template <class Function>
point_basic<T> vector_momentum (const Function& f, size_type idof) const;
template <class Function>
tensor_basic<T> tensor_momentum (const Function& f, size_type idof) const;
disarray<size_type, sequential> build_indirect_array (
const space_basic<T,sequential>& Wh, const std::string& dom_name) const;
disarray<size_type, sequential> build_indirect_array (
const space_basic<T,sequential>& Wh, const geo_basic<T,sequential>& bgd_gamma) const;
const std::set<size_type>& ext_iu_set() const { return base::data().ext_iu_set(); }
const std::set<size_type>& ext_ib_set() const { return base::data().ext_ib_set(); }
// comparator:
bool operator== (const space_basic<T,sequential>& V2) const { return base::data().operator==(V2.data()); }
bool operator!= (const space_basic<T,sequential>& V2) const { return ! operator== (V2); }
friend bool are_compatible (const space_basic<T,sequential>& V1, const space_basic<T,sequential>& V2) {
return are_compatible (V1.data(), V2.data()); }
};
size_type
field::size_type size_type
Definition: branch.cc:425
rheolef::size_type
size_t size_type
Definition: basis_get.cc:76
rheolef::point_basic< T >
point_basic< T >
Definition: piola_fem.h:135
rheolef::Function
rheolef::std Function
get_geo
void get_geo(istream &in, my_geo &omega)
Definition: field2gmsh_pos.cc:126
T
Expr1::float_type T
Definition: field_expr.h:261
mkgeo_ball.expr
expr
Definition: mkgeo_ball.sh:361
mkgeo_ball.b
int b
Definition: mkgeo_ball.sh:152
mkgeo_contraction.name
string name
Definition: mkgeo_contraction.sh:133
rheolef::space_constant::valued_type
valued_type
Definition: space_constant.h:135
rheolef::space_numbering::dis_idof
void dis_idof(const basis_basic< T > &b, const geo_size &gs, const geo_element &K, typename std::vector< size_type >::iterator dis_idof_tab)
Definition: space_numbering.cc:187
rheolef::space_numbering::dis_ndof
size_type dis_ndof(const basis_basic< T > &b, const geo_size &gs, size_type map_dim)
Definition: space_numbering.cc:41
rheolef::space_numbering::ndof
size_type ndof(const basis_basic< T > &b, const geo_size &gs, size_type map_dim)
Definition: space_numbering.cc:28
rheolef::operator==
bool operator==(const heap_allocator< T1 > &lhs, const heap_allocator< T1 > &rhs)
Definition: heap_allocator.h:167
rheolef::operator!=
bool operator!=(const heap_allocator< T1 > &lhs, const heap_allocator< T1 > &rhs)
Definition: heap_allocator.h:172
rheolef::valued_tag
space_constant::valued_type valued_tag() const
Definition: field_expr_recursive.h:579
f
Definition: cavity_dg.h:29