Rheolef  7.2
an efficient C++ finite element environment
tiny_element.h
Go to the documentation of this file.
1 # ifndef _RHEO_TINY_ELEMENT_H
2 # define _RHEO_TINY_ELEMENT_H
23 //
24 // small element without memory allocation call
25 // used for i/o of meshes, since geo_element
26 // has additional data and performs mem alloc
27 //
28 // authors: Pierre.Saramito@imag.fr
29 //
30 // date: 3 march 2001
31 //
32 #include "rheolef/reference_element.h"
33 
34 namespace rheolef {
36 public:
38  explicit tiny_element (const class geo_element&);
39  void set_variant (variant_type t);
40  void set_name (char name);
41  void set_index (size_t idx) { _idx = idx; }
43  const size_type& operator[] (size_type i) const { return t_[i]; }
44  size_t index () const { return _idx; }
45  size_type& operator[] (size_type i) { return t_[i]; }
46  friend std::ostream& operator << (std::ostream& os, const tiny_element& K);
47 protected:
49  size_t _idx;
50 };
51 inline
54 {
55 #ifdef _RHEOLEF_PARANO
56  std::fill (t_, t_+8, std::numeric_limits<size_type>::max());
57 #endif // _RHEOLEF_PARANO
58 }
59 inline
60 void
62 {
64 }
65 inline
66 void
68 {
70 }
71 inline
72 void
74 {
76 }
77 }// namespace rheolef
78 # endif /* _RHEO_TINY_ELEMENT_H */
field::size_type size_type
Definition: branch.cc:430
see the geo_element page for the full documentation
Definition: geo_element.h:102
see the reference_element page for the full documentation
void set_variant(variant_type x)
static const variant_type max_variant
std::vector< int >::size_type size_type
static const variant_type t
void set_name(char name)
Definition: tiny_element.h:67
tiny_element(variant_type t=max_variant)
Definition: tiny_element.h:52
tiny_element(const class geo_element &)
size_t index() const
Definition: tiny_element.h:44
void set_variant(variant_type t)
Definition: tiny_element.h:61
const size_type & operator[](size_type i) const
Definition: tiny_element.h:43
friend std::ostream & operator<<(std::ostream &os, const tiny_element &K)
Definition: tiny_element.cc:27
void set_index(size_t idx)
Definition: tiny_element.h:41
rheolef::space_base_rep< T, M > t
const size_t n_vertex
Definition: edge.icc:66
This file is part of Rheolef.