Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
dumux-repositories
dumux
Commits
a64526de
Commit
a64526de
authored
Oct 25, 2019
by
Kilian Weishaupt
Browse files
[alugrid] Make gridmanager with dim != dimworld compile and throw runtime error
parent
9ad65559
Changes
1
Hide whitespace changes
Inline
Side-by-side
dumux/io/grid/gridmanager_alu.hh
View file @
a64526de
...
...
@@ -105,13 +105,13 @@ public:
// Then look for the necessary keys to construct from the input file
else
if
(
hasParamInGroup
(
modelParamGroup
,
"Grid.UpperRight"
))
{
// make a structured grid
if
(
elType
==
Dune
::
cube
)
ParentType
::
template
makeStructuredGrid
<
dim
,
dimworld
>(
ParentType
::
CellType
::
Cube
,
modelParamGroup
);
makeStructuredGrid
<
dim
,
dimworld
>
(
ParentType
::
CellType
::
Cube
,
modelParamGroup
);
else
if
(
elType
==
Dune
::
simplex
)
ParentType
::
template
makeStructuredGrid
<
dim
,
dimworld
>(
ParentType
::
CellType
::
Simplex
,
modelParamGroup
);
makeStructuredGrid
<
dim
,
dimworld
>
(
ParentType
::
CellType
::
Simplex
,
modelParamGroup
);
else
DUNE_THROW
(
Dune
::
IOError
,
"ALUGrid only supports Dune::cube or Dune::simplex as cell type!"
);
ParentType
::
maybeRefineGrid
(
modelParamGroup
);
ParentType
::
loadBalance
();
}
...
...
@@ -203,6 +203,32 @@ public:
}
}
}
/*!
* \brief Makes a structured cube grid using the structured grid factory
*/
template
<
int
dimension
,
int
dimensionworld
,
std
::
enable_if_t
<
dimension
!=
dimensionworld
,
int
>
=
0
>
void
makeStructuredGrid
(
typename
ParentType
::
CellType
cellType
,
const
std
::
string
&
modelParamGroup
)
{
DUNE_THROW
(
Dune
::
IOError
,
"ALUGrid currently only supports the creation of structured grids with dimension == dimensionworld. Consider reading in a grid file instead."
);
}
/*!
* \brief Makes a structured cube grid using the structured grid factory
*/
template
<
int
dimension
,
int
dimensionworld
,
std
::
enable_if_t
<
dimension
==
dimensionworld
,
int
>
=
0
>
void
makeStructuredGrid
(
typename
ParentType
::
CellType
cellType
,
const
std
::
string
&
modelParamGroup
)
{
// make a structured grid
if
(
elType
==
Dune
::
cube
)
ParentType
::
template
makeStructuredGrid
<
dimension
,
dimensionworld
>(
ParentType
::
CellType
::
Cube
,
modelParamGroup
);
else
if
(
elType
==
Dune
::
simplex
)
ParentType
::
template
makeStructuredGrid
<
dimension
,
dimensionworld
>(
ParentType
::
CellType
::
Simplex
,
modelParamGroup
);
else
DUNE_THROW
(
Dune
::
IOError
,
"ALUGrid only supports Dune::cube or Dune::simplex as cell type!"
);
}
};
#if DUNE_GRID_EXPERIMENTAL_GRID_EXTENSIONS
...
...
Timo Koch
@timok
mentioned in commit
9e7163da
·
Oct 25, 2019
mentioned in commit
9e7163da
mentioned in commit 9e7163da7023d7b23fd4d974e8b29a83d49b270c
Toggle commit list
Timo Koch
@timok
mentioned in merge request
!1774 (merged)
·
Oct 25, 2019
mentioned in merge request
!1774 (merged)
mentioned in merge request !1774
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment