Rheolef  7.2
an efficient C++ finite element environment
 
Loading...
Searching...
No Matches
geo_element_indirect.cc
Go to the documentation of this file.
1
21#include "rheolef/geo_element_indirect.h"
22
23namespace rheolef {
24
25std::istream&
26operator>> (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}
42std::ostream&
43operator<< (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
void set_orientation(orientation_type orient)
orientation_type orientation() const
This file is part of Rheolef.
std::ostream & operator<<(std::ostream &os, const catchmark &m)
Definition catchmark.h:99
std::istream & operator>>(std::istream &is, const catchmark &m)
Definition catchmark.h:88