Skip to content
Snippets Groups Projects
Commit 2b0189cd authored by Timo Koch's avatar Timo Koch
Browse files

[io][grid][gmshflag] Use numeric limits of size_t for invalid flag

parent f7de1852
No related branches found
No related tags found
1 merge request!1672Feature/gmsh boundary flag for alugrid
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#ifndef DUMUX_GMSH_BOUNDARY_FLAG_HH #ifndef DUMUX_GMSH_BOUNDARY_FLAG_HH
#define DUMUX_GMSH_BOUNDARY_FLAG_HH #define DUMUX_GMSH_BOUNDARY_FLAG_HH
#include <limits>
namespace Dumux { namespace Dumux {
...@@ -35,10 +36,12 @@ namespace Dumux { ...@@ -35,10 +36,12 @@ namespace Dumux {
class GmshBoundaryFlag class GmshBoundaryFlag
{ {
public: public:
GmshBoundaryFlag() : flag_(-1) {} GmshBoundaryFlag()
: flag_(std::numeric_limits<std::size_t>::max()) {}
template<class Intersection> template<class Intersection>
GmshBoundaryFlag(const Intersection& i) : flag_(-1) GmshBoundaryFlag(const Intersection& i)
: flag_(std::numeric_limits<std::size_t>::max())
{ {
if (i.boundary()) if (i.boundary())
flag_ = i.boundarySegmentIndex(); flag_ = i.boundarySegmentIndex();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment