Rheolef  7.1
an efficient C++ finite element environment
geo_element_indirect.cc
Go to the documentation of this file.
1 #include "rheolef/geo_element_indirect.h"
22 
23 namespace rheolef {
24 
25 std::istream&
26 operator>> (std::istream& is, geo_element_indirect& x)
27 {
28  char c;
29  is >> std::ws >> c;
30  x.set_shift(0);
31  if (isdigit(c)) { // positive orientation:
32  x.set_orientation(1);
33  is.unget();
34  } else { // negative orientation:
35  x.set_orientation(-1);
36  }
38  is >> idx;
39  x.set_index (idx);
40  return is;
41 }
42 std::ostream&
43 operator<< (std::ostream& os, const geo_element_indirect& x)
44 {
45  if (x.orientation() < 0) os << '-';
46  return os << x.index();
47 }
48 
49 } // namespace rheolef
rheolef::geo_element_indirect::orientation
orientation_type orientation() const
Definition: geo_element_indirect.h:52
rheolef::geo_element_indirect::set_orientation
void set_orientation(orientation_type orient)
Definition: geo_element_indirect.h:57
rheolef::geo_element_indirect::index
size_type index() const
Definition: geo_element_indirect.h:51
mkgeo_ball.c
c
Definition: mkgeo_ball.sh:153
rheolef::geo_element_indirect
Definition: geo_element_indirect.h:32
rheolef::geo_element_indirect::set_shift
void set_shift(size_type shift)
Definition: geo_element_indirect.h:61
rheolef::operator>>
std::istream & operator>>(std::istream &is, const catchmark &m)
Definition: catchmark.h:88
rheolef
This file is part of Rheolef.
Definition: compiler_eigen.h:37
rheolef::geo_element_indirect::size_type
size_t size_type
Definition: geo_element_indirect.h:37
rheolef::geo_element_indirect::set_index
void set_index(size_type ige)
Definition: geo_element_indirect.h:65
rheolef::operator<<
std::ostream & operator<<(std::ostream &os, const catchmark &m)
Definition: catchmark.h:99