3#ifndef DUNE_DGF_GRIDPARAMETERBLOCK_HH
4#define DUNE_DGF_GRIDPARAMETERBLOCK_HH
9#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
35 typedef unsigned int Flags;
37 static const Flags foundName = 1 << 0;
38 static const Flags foundDumpFileName = 1 << 1;
39 static const Flags foundLongestEdge = 1 << 5;
44 std::string dumpFileName_;
45 bool markLongestEdge_;
56 const std::string &
name (
const std::string &defaultValue )
const
58 if( (foundFlags_ & foundName) == 0 )
60 dwarn <<
"GridParameterBlock: Parameter 'name' not specified, "
61 <<
"defaulting to '" << defaultValue <<
"'." << std::endl;
68 const std::string &dumpFileName ( )
const
70 if( (foundFlags_ & foundDumpFileName) != 0 )
72 dwarn <<
"GridParameterBlock: found Parameter 'dumpfilename', "
73 <<
"dumping file to `" << dumpFileName_ <<
"'" << std::endl;
81 if( (foundFlags_ & foundLongestEdge) == 0 )
83 dwarn <<
"GridParameterBlock: Parameter 'refinementedge' not specified, "
84 <<
"defaulting to 'ARBITRARY'." << std::endl;
86 return markLongestEdge_;
Common Grid parameters.
Definition: gridparameter.hh:33
GridParameterBlock(std::istream &in)
constructor: read commmon parameters
const std::string & name(const std::string &defaultValue) const
return the name of the grid
Definition: gridparameter.hh:56
bool markLongestEdge() const
returns true if longest edge should be marked for AlbertaGrid
Definition: gridparameter.hh:79
DWarnType dwarn(std::cerr)
Stream for warnings indicating problems.
Definition: stdstreams.hh:159
Dune namespace.
Definition: alignment.hh:10