Commit bb5573a1 authored by Lukas Riedel's avatar Lukas Riedel

fixed bug where the size_type of the MatrixBackend was set to double

parent b864a715
......@@ -120,7 +120,7 @@ public:
// Compute error estimate eta
AGFS p0gfs = AGFSHelper::create(gv);
ESTLOP estlop(inifile,param);
MBE mbe(0.0);
MBE mbe(0);
ESTGO estgo(gfs,p0gfs,estlop,mbe);
U0 eta(p0gfs,0.0);
......
......@@ -6,8 +6,8 @@ namespace Dorie{
template<typename Traits>
Simulation<Traits>::Simulation (Dune::MPIHelper& _helper, std::shared_ptr<Grid> _grid, Dune::ParameterTree& _inifile) :
helper(_helper), grid(_grid), inifile(_inifile), gv(grid->leafGridView()),
mbe_slop(estimate_mbe_entries<RF>(Traits::dim,Traits::GridGeometryType)),
mbe_tlop(1.0),
mbe_slop(estimate_mbe_entries<typename MBE::size_type>(Traits::dim,Traits::GridGeometryType)),
mbe_tlop(1),
verbose(inifile.get<int>("output.verbose"))
{
Dune::Timer timer;
......
......@@ -47,7 +47,7 @@ protected:
// -- DUNE Class Defintions -- //
/// Matrix backend type
using MBE = Dune::PDELab::istl::BCRSMatrixBackend<RF>;
using MBE = Dune::PDELab::istl::BCRSMatrixBackend<>;
/// Grid operator for spatial LOP
using GO0 = Dune::PDELab::GridOperator<GFS,GFS,SLOP,MBE,RF,RF,RF,CC,CC>;
/// Grid operator for temporal LOP
......
......@@ -12,23 +12,23 @@ namespace Dorie{
* \param geo Geometry type of grid entities
* \return Estimated entries per matrix row
*/
template<typename R>
template<typename R = std::size_t>
R estimate_mbe_entries (const int dim, const Dune::GeometryType::BasicType geo)
{
if(geo==Dune::GeometryType::BasicType::cube){
if(dim==2)
return 5.0;
return 5;
else if(dim==3)
return 7.0;
return 7;
}
else if(geo==Dune::GeometryType::BasicType::simplex){
if(dim==2)
return 13.0;
return 13;
else if(dim==3)
return 20.0;
return 20;
}
std::cerr << "Cannot provide MBE entry estimation for given dimension and/or GeometryType!" << std::endl;
return 1.0;
return 1;
}
/// Provide types and construction of the GridFunctionSpace. Has to be specialized.
......
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