5#ifndef DUNE_DGF_GRIDPARAMETERBLOCK_HH
6#define DUNE_DGF_GRIDPARAMETERBLOCK_HH
11#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
37 typedef unsigned int Flags;
39 static const Flags foundName = 1 << 0;
40 static const Flags foundDumpFileName = 1 << 1;
41 static const Flags foundLongestEdge = 1 << 5;
42 static const Flags foundCompatible = 1 << 13;
47 std::string dumpFileName_;
48 bool markLongestEdge_;
49 bool bisectionCompatibility_;
60 const std::string &
name (
const std::string &defaultValue )
const
62 if( (foundFlags_ & foundName) == 0 )
64 dwarn <<
"GridParameterBlock: Parameter 'name' not specified, "
65 <<
"defaulting to '" << defaultValue <<
"'." << std::endl;
72 const std::string &dumpFileName ( )
const
74 if( (foundFlags_ & foundDumpFileName) != 0 )
76 dwarn <<
"GridParameterBlock: found Parameter 'dumpfilename', "
77 <<
"dumping file to `" << dumpFileName_ <<
"'" << std::endl;
85 if( (foundFlags_ & foundLongestEdge) == 0 )
87 dwarn <<
"GridParameterBlock: Parameter 'refinementedge' not specified, "
88 <<
"defaulting to 'ARBITRARY'." << std::endl;
90 return markLongestEdge_;
96 if( (foundFlags_ & foundCompatible) == 0 )
98 dwarn <<
"GridParameterBlock: Parameter 'bisectioncompatibility' not specified, "
99 <<
"defaulting to '0' (false)." << std::endl;
101 return bisectionCompatibility_;
Common Grid parameters.
Definition: gridparameter.hh:35
GridParameterBlock(std::istream &in)
constructor: read common parameters
const std::string & name(const std::string &defaultValue) const
return the name of the grid
Definition: gridparameter.hh:60
bool bisectionCompatibility() const
returns true if grid is compatible for bisection refinement
Definition: gridparameter.hh:94
bool markLongestEdge() const
returns true if longest edge should be marked for AlbertaGrid
Definition: gridparameter.hh:83
DWarnType dwarn(std::cerr)
Stream for warnings indicating problems.
Definition: stdstreams.hh:162
Dune namespace.
Definition: alignedallocator.hh:13