Loading...
Searching...
No Matches
tiny_element.h
Go to the documentation of this file.
# ifndef _RHEO_TINY_ELEMENT_H
# define _RHEO_TINY_ELEMENT_H
//
// small element without memory allocation call
// used for i/o of meshes, since geo_element
// has additional data and performs mem alloc
//
// authors: Pierre.Saramito@imag.fr
//
// date: 3 march 2001
//
#include "rheolef/reference_element.h"
namespace rheolef {
class tiny_element : public reference_element {
public:
tiny_element(variant_type t = max_variant);
explicit tiny_element (const class geo_element&);
void set_variant (variant_type t);
void set_name (char name);
void set_index (size_t idx) { _idx = idx; }
void set_variant (size_type n_vertex, size_type dim);
const size_type& operator[] (size_type i) const { return t_[i]; }
size_t index () const { return _idx; }
size_type& operator[] (size_type i) { return t_[i]; }
friend std::ostream& operator << (std::ostream& os, const tiny_element& K);
protected:
size_type t_ [8];
size_t _idx;
};
inline
tiny_element::tiny_element (variant_type t)
: reference_element()
{
#ifdef _RHEOLEF_PARANO
std::fill (t_, t_+8, std::numeric_limits<size_type>::max());
#endif // _RHEOLEF_PARANO
}
inline
void
tiny_element::set_variant (variant_type t)
{
reference_element::set_variant(t);
}
inline
void
tiny_element::set_name (char name)
{
reference_element::set_name(name);
}
inline
void
tiny_element::set_variant (size_type n_vertex, size_type dim)
{
reference_element::set_variant(n_vertex,dim);
}
}// namespace rheolef
# endif /* _RHEO_TINY_ELEMENT_H */
size_type
field::size_type size_type
Definition branch.cc:430
rheolef::geo_element
see the geo_element page for the full documentation
Definition geo_element.h:102
rheolef::reference_element
see the reference_element page for the full documentation
Definition reference_element.h:66
rheolef::reference_element::n_vertex
size_type n_vertex() const
Definition reference_element.h:103
rheolef::reference_element::set_name
void set_name(char name)
Definition reference_element.cc:59
rheolef::reference_element::set_variant
void set_variant(variant_type x)
Definition reference_element.h:93
rheolef::reference_element::max_variant
static const variant_type max_variant
Definition reference_element.h:82
rheolef::reference_element::variant_type
size_type variant_type
Definition reference_element.h:72
rheolef::reference_element::size_type
std::vector< int >::size_type size_type
Definition reference_element.h:71
rheolef::reference_element::name
char name() const
Definition reference_element.h:100
rheolef::reference_element::t
static const variant_type t
Definition reference_element.h:77
rheolef::tiny_element
Definition tiny_element.h:35
rheolef::tiny_element::t_
size_type t_[8]
Definition tiny_element.h:48
rheolef::tiny_element::set_name
void set_name(char name)
Definition tiny_element.h:67
rheolef::tiny_element::tiny_element
tiny_element(variant_type t=max_variant)
Definition tiny_element.h:52
rheolef::tiny_element::tiny_element
tiny_element(const class geo_element &)
rheolef::tiny_element::index
size_t index() const
Definition tiny_element.h:44
rheolef::tiny_element::_idx
size_t _idx
Definition tiny_element.h:49
rheolef::tiny_element::set_variant
void set_variant(variant_type t)
Definition tiny_element.h:61
rheolef::tiny_element::operator[]
const size_type & operator[](size_type i) const
Definition tiny_element.h:43
rheolef::tiny_element::operator<<
friend std::ostream & operator<<(std::ostream &os, const tiny_element &K)
Definition tiny_element.cc:27
rheolef::tiny_element::set_index
void set_index(size_t idx)
Definition tiny_element.h:41
n_vertex
const size_t n_vertex
Definition edge.icc:66
rheolef
This file is part of Rheolef.
Definition compiler_eigen.h:39