13#ifndef DUMUX_IO_GRID_MANAGER_ONED_HH
14#define DUMUX_IO_GRID_MANAGER_ONED_HH
16#include <dune/grid/onedgrid.hh>
17#include <dune/grid/io/file/dgfparser/dgfoned.hh>
19#ifndef DUMUX_IO_GRID_MANAGER_BASE_HH
46 using Grid = Dune::OneDGrid;
52 void init(
const std::string& modelParamGroup =
"")
59 postProcessing_(modelParamGroup);
67 using CoordinateType =
typename Grid::ctype;
73 postProcessing_(modelParamGroup);
82 postProcessing_(modelParamGroup);
88 const auto prefix = modelParamGroup.empty() ? modelParamGroup : modelParamGroup +
".";
90 << prefix +
"Grid.RightBoundary"
91 <<
", or " << prefix +
"Grid.Coordinates"
92 <<
", or a grid file in " << prefix +
"Grid.File");
105 void postProcessing_(
const std::string& modelParamGroup)
109 if (refType ==
"Local")
110 ParentType::grid().setRefinementType(Dune::OneDGrid::RefinementType::LOCAL);
111 else if (refType ==
"Copy")
112 ParentType::grid().setRefinementType(Dune::OneDGrid::RefinementType::COPY);
114 DUNE_THROW(Dune::IOError,
"OneGrid only supports 'Local' or 'Copy' as refinement type. Not '"<< refType<<
"'!");
117 ParentType::maybeRefineGrid(modelParamGroup);
void init(const std::string &modelParamGroup="")
Make the grid. This is implemented by specializations of this method.
Definition gridmanager_oned.hh:52
void loadBalance()
Call loadBalance() function of the grid. OneDGrid is not parallel an thus cannot communicate.
Definition gridmanager_oned.hh:99
GridManagerBase< Grid > ParentType
Definition gridmanager_oned.hh:47
Dune::OneDGrid Grid
Definition gridmanager_oned.hh:46
The grid manager base interface (public) and methods common to most grid manager specializations (pro...
Definition gridmanager_base.hh:56
void makeGridFromDgfFile(const std::string &fileName)
Definition gridmanager_base.hh:265
void loadBalance()
Definition gridmanager_base.hh:98
std::shared_ptr< Grid > & gridPtr()
Definition gridmanager_base.hh:163
The grid manager (this is the class used by the user) for all supported grid managers that constructs...
Definition gridmanager_base.hh:344
Exception thrown if a run-time parameter is not specified correctly.
Definition exceptions.hh:48
Provides a grid manager for all supported grid managers with input file interfaces....
T getParamFromGroup(Args &&... args)
A free function to get a parameter from the parameter tree singleton with a model group.
Definition parameters.hh:149
bool hasParamInGroup(const std::string ¶mGroup, const std::string ¶m)
Check whether a key exists in the parameter tree with a model group prefix.
Definition parameters.hh:165
Definition common/pdesolver.hh:24