2
/// This file is part of Rheolef.
4
/// Copyright (C) 2000-2009 Pierre Saramito <Pierre.Saramito@imag.fr>
6
/// Rheolef is free software; you can redistribute it and/or modify
7
/// it under the terms of the GNU General Public License as published by
8
/// the Free Software Foundation; either version 2 of the License, or
9
/// (at your option) any later version.
11
/// Rheolef is distributed in the hope that it will be useful,
12
/// but WITHOUT ANY WARRANTY; without even the implied warranty of
13
/// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
/// GNU General Public License for more details.
16
/// You should have received a copy of the GNU General Public License
17
/// along with Rheolef; if not, write to the Free Software
18
/// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20
/// =========================================================================
22
// the geo_element hierarchy of classes
24
// author: Pierre.Saramito@imag.fr
26
// date: 19 december 2010
28
#include "rheolef/geo_element_v2.h"
33
skip_blancs_and_tabs (std::istream& is)
35
if (!is.good()) return 0;
37
while (is.good() && (c == ' ' || c == '\t')) {
39
} while (is.good() && (c == ' ' || c == '\t'));
42
/// @brief return orientation and shift between *this element and S
43
/** assume that vertices of *this and S match
44
* this routine is used for domain elements identification
45
* shift : such that vertex (*this)[0] == S[shift] matches
46
* orient=+1 : when (*this)[1] == S[shift+1]
47
* return true when all is ok (does not check fully that elements match)
50
geo_element::get_orientation_and_shift (
52
orientation_type& orient,
53
size_type& shift) const
56
shift = std::numeric_limits<size_type>::max();
57
if (S.dimension() != dimension() || S.size() != size()) return false;
59
for (shift = 0; shift < n; shift++) {
60
if (operator[](0) == S[shift]) break;
63
shift = std::numeric_limits<size_type>::max();
66
if ((*this)[(shift+1)%n] == S[(shift+1)%n]) {
74
} // namespace rheolef