1#ifndef _RHEO_GEO_ELEMENT_H
2#define _RHEO_GEO_ELEMENT_H
86#include "rheolef/reference_element.h"
87#include "rheolef/geo_element_indirect.h"
88#include "rheolef/heap_allocator.h"
89#include "rheolef/reference_element_face_transformation.h"
91#include <boost/serialization/serialization.hpp>
92#include <boost/serialization/base_object.hpp>
99template <
class A>
class geo_element_auto;
262 void put (std::ostream& is)
const;
263 void get (std::istream& os);
337 template<
class Archive>
338 void serialize (Archive& ar,
const unsigned int version) {
341 template<class A = std::allocator<std::vector<int>::size_type> >
class geo_element_auto;
350struct _disarray_put_element_type<geo_element> {
351 std::ostream&
operator() (std::ostream& os,
const geo_element& K)
const { K.
put(os);
return os; }
354struct _disarray_get_element_type<geo_element> {
355 std::istream&
operator() (std::istream& is, geo_element& K)
const { K.get(is);
return is; }
375template<class A = std::allocator<std::vector<int>::size_type> >
435 template<
class Archive>
436 void serialize (Archive& ar,
const unsigned int version) {
437 ar & boost::serialization::base_object<geo_element>(*
this);
493 check_macro (order1 == 1,
"cannot change order "<<order1<<
" > 1 in a raw element");
516 _set_data (i, std::numeric_limits<size_type>::max());
530 static const bool do_verbose =
true;
531 if (do_verbose || K.
size() > 2 || K.
order() > 1) { os << K.
name() <<
"\t"; }
532 if (K.
order() > 1) { os <<
"p" << K.
order() <<
" "; }
534 os <<
perm [K[iloc]];
535 if (iloc < K.n_node() - 1) os <<
" ";
539 const std::vector<size_type>&
perm;
field::size_type size_type
see the edge page for the full documentation
geo_element_auto(const geo_element_auto< A2 > &K)
geo_element_auto(const A &alloc=A())
geo_element_auto(variant_type variant, size_type order=1, const A &alloc=A())
geo_element::automatic_type automatic_type
geo_element::parameter_type parameter_type
geo_element::iterator iterator
std::vector< size_type, A > _data
geo_element::const_iterator const_iterator
geo_element_auto(parameter_type p, const A &alloc=A())
void reset(const parameter_type ¶m)
void serialize(Archive &ar, const unsigned int version)
reference_element::size_type size_type
const geo_element_auto< A > & operator=(const geo_element &K)
geo_element_auto(const geo_element_auto< A > &K)
const_iterator _data_end() const
void reset(variant_type variant, size_type order)
geo_element_auto(const geo_element &K)
reference_element::variant_type variant_type
const_iterator _data_begin() const
geo_element_hack(const geo_element_auto< A > &K)
void reset(variant_type variant1, size_type order1)
void _reset(variant_type variant, size_type order)
geo_element::automatic_type automatic_type
geo_element::parameter_type parameter_type
geo_element::iterator iterator
geo_element::const_iterator const_iterator
size_type & _get_data_ref(size_type i)
const_iterator _data_end() const
size_type _get_data(size_type i) const
void _set_parameter(const parameter_type &p)
static size_type _size_of(const parameter_type &p)
void _set_data(size_type i, size_type value)
geo_element::variant_type variant_type
geo_element::size_type size_type
const_iterator _data_begin() const
short int orientation_type
see the geo_element page for the full documentation
geo_element_auto< heap_allocator< size_type > > automatic_type
size_type subgeo_n_node(size_type subgeo_dim, size_type loc_isid) const
geo_element_indirect::orientation_type orientation_type
iterator end(size_type node_subgeo_dim)
const_iterator end(size_type node_subgeo_dim) const
bool get_orientation_and_shift(const geo_element &S, orientation_type &orient, shift_type &shift) const
return orientation and shift between *this element and S
virtual iterator _data_begin()=0
size_type & operator[](size_type loc_inod)
const_iterator begin() const
size_type edge(size_type i) const
size_type face(size_type i) const
size_type subgeo_local_vertex(size_type subgeo_dim, size_type i_subgeo, size_type i_subgeo_vertex) const
size_type first_inod(size_type subgeo_dim) const
static size_type _data_size(variant_type variant, size_type order)
static size_type fix_edge_indirect(const geo_element &K, size_type loc_iedg, size_type loc_iedg_j, size_type order)
const_iterator begin(size_type node_subgeo_dim) const
iterator begin(size_type node_subgeo_dim)
static size_type fix_triangle_indirect(const geo_element &K, size_type loc_itri, size_type loc_itri_j, size_type order)
void serialize(Archive &ar, const unsigned int version)
reference_element::size_type size_type
void set_ios_dis_ie(size_type ios_dis_ie)
void put(std::ostream &is) const
size_type node(size_type loc_inod) const
size_type dimension() const
size_type ios_dis_ie() const
static size_type fix_edge_indirect(orientation_type orient, size_type order, size_type loc_iedg_j)
static size_type _face_offset(variant_type variant, size_type order)
void get(std::istream &os)
const size_type * const_iterator
size_type subgeo_size(size_type subgeo_dim, size_type loc_isid) const
static size_type _data_size(const parameter_type &p)
const geo_element_indirect & edge_indirect(size_type i) const
orientation_type get_side_orientation(const geo_element &S) const
geo_element_indirect & edge_indirect(size_type i)
static size_type fix_indirect(const geo_element &K, size_type subgeo_variant, size_type loc_ige, size_type loc_comp_idof_on_subgeo, size_type order)
size_type master(bool i) const
size_type & node(size_type loc_inod)
variant_type variant() const
geo_element_indirect & face_indirect(size_type i)
static void loc_qua_inod2lattice(size_type loc_qua_inod, size_type order, point_basic< size_type > &ij_lattice)
virtual iterator _data_end()=0
geo_element & operator=(const geo_element &K)
virtual const_iterator _data_end() const =0
const_iterator end() const
orientation_type get_edge_orientation(size_type dis_iv0, size_type dis_iv1) const
static size_type _node_offset(variant_type variant, size_type order)
virtual const_iterator _data_begin() const =0
static void loc_tri_inod2lattice(size_type loc_tri_inod, size_type order, point_basic< size_type > &ij_lattice)
size_type _data_size() const
geo_element_indirect::shift_type shift_type
orientation_type get_side_informations(const geo_element &S, size_type &loc_isid, size_type &shift) const
size_type n_subgeo(size_type subgeo_dim) const
void set_master(bool i, size_type dis_ie) const
static size_type fix_quadrangle_indirect(const geo_element &K, size_type loc_iqua, size_type loc_iqua_j, size_type order)
const geo_element_indirect & face_indirect(size_type i) const
virtual void reset(variant_type variant, size_type order)=0
reference_element::variant_type variant_type
size_type subgeo_local_node(size_type subgeo_dim, size_type loc_isid, size_type loc_jsidnod) const
size_type last_inod(size_type subgeo_dim) const
size_type subgeo_dis_index(size_type subgeo_dim, size_type i) const
void set_dis_ie(size_type dis_ie)
static size_type _edge_offset(variant_type variant, size_type order)
see the reference_element page for the full documentation
size_type n_vertex() const
static size_type subgeo_local_node(variant_type variant, size_type order, size_type subgeo_dim, size_type loc_isid, size_type loc_jsidnod)
static size_type first_inod(variant_type variant, size_type order, size_type subgeo_dim)
static const variant_type max_variant
static size_type n_sub_edge(variant_type variant)
size_type dimension() const
static size_type n_sub_face(variant_type variant)
static size_type last_inod(variant_type variant, size_type order, size_type subgeo_dim)
static size_type subgeo_n_node(variant_type variant, size_type order, size_type subgeo_dim, size_type loc_isid)
std::vector< int >::size_type size_type
static size_type n_node(variant_type variant, size_type order)
size_type n_subgeo(size_type subgeo_dim) const
check_macro(expr1.have_homogeneous_space(Xh1), "dual(expr1,expr2); expr1 should have homogeneous space. HINT: use dual(interpolate(Xh, expr1),expr2)")
const size_t face[n_face][4]
This file is part of Rheolef.
std::ostream & operator<<(std::ostream &os, const catchmark &m)
std::istream & operator>>(std::istream &is, const catchmark &m)
std::istream & operator()(std::istream &is, T &x) const
std::ostream & operator()(std::ostream &os, const T &x) const
parameter_type(variant_type v=reference_element::max_variant, size_type o=0)
geo_element_permuted_put(const std::vector< size_type > &perm1)
std::ostream & operator()(std::ostream &os, const geo_element &K)
const std::vector< size_type > & perm
geo_element::size_type size_type