Commit 1b291528 authored by Oliver Sander's avatar Oliver Sander Committed by Steffen Müthing

Downgrade a static assertion to a regular assertion

The AmiraMeshReader statically checked for dim==dimworld.  However, my code
no compiles several different file readers at once, and for others I do
want to be able to read grids with dim!=dimworld.  But I can't compile
such code as long as AmiraMeshReader checks statically for dim!==dimworld.
I may want to compile the relevant code with no inention

(cherry picked from commit bd947f8d)
Signed-off-by: Steffen Müthing's avatarSteffen Müthing <muething@dune-project.org>
parent 1cdf77e6
......@@ -311,7 +311,8 @@ void Dune::AmiraMeshReader<GridType>::read(GridType& grid,
static const int dim = GridType::dimension;
static const int dimworld = GridType::dimensionworld;
static_assert(dim==dimworld, "AmiraMesh can only be read for grids with dim==dimworld!");
if (dim!=dimworld)
DUNE_THROW(IOError, "AmiraMesh can only be read for grids with dim==dimworld!");
dverb << "This is the AmiraMesh reader for file '" << filename << "'!" << std::endl;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment