3#ifndef DUNE_POLYHEDRON_HH
4#define DUNE_POLYHEDRON_HH
26 int get ( std::vector< std::vector< int > > &polyhedra )
29 std::vector< int > polyhedron;
36 if( (polyIdx < 0) || (polyIdx >
numPolys_) )
37 DUNE_THROW(
DGFException,
"Error in " << *
this <<
": Invalid polygon index (" << polyIdx <<
" not int [0, " <<
numPolys_ <<
"])" );
39 minPolyId = std::min( minPolyId, polyIdx );
40 polyhedron.push_back( polyIdx );
43 polyhedra.push_back( polyhedron );
49 const size_t polySize = polyhedra.size();
50 for(
size_t i=0; i<polySize; ++i )
52 const size_t pSize = polyhedra[ i ].size();
53 for(
size_t j=0; j<pSize; ++j )
55 polyhedra[ i ][ j ] -= minPolyId;
59 return polyhedra.size();
Include standard header files.
Definition: agrid.hh:58
void reset()
Definition: basic.hh:49
bool getnextline()
Definition: basic.cc:92
bool getnextentry(ENTRY &entry)
Definition: basic.hh:61
Definition: polyhedron.hh:21
const int numPolys_
Definition: polyhedron.hh:63
PolyhedronBlock(std::istream &in, int numPolys)
Definition: polyhedron.hh:22
int get(std::vector< std::vector< int > > &polyhedra)
Definition: polyhedron.hh:26
exception class for IO errors in the DGF parser
Definition: dgfexception.hh:14