Commit 9ee7f471 authored by Timo Koch's avatar Timo Koch
Browse files

[implicit][model] Use static branching instead of runtime if/else

This enables the use of Dune's single codim single geometry mapper
that otherwise exists failing a static assert
parent 73dfd506
......@@ -535,10 +535,7 @@ public:
template <class Restarter>
void serialize(Restarter &res)
{
if (isBox)
res.template serializeEntities<dim>(asImp_(), this->gridView_());
else
res.template serializeEntities<0>(asImp_(), this->gridView_());
res.template serializeEntities<dofCodim>(asImp_(), this->gridView_());
}
/*!
......@@ -551,11 +548,7 @@ public:
template <class Restarter>
void deserialize(Restarter &res)
{
if (isBox)
res.template deserializeEntities<dim>(asImp_(), this->gridView_());
else
res.template deserializeEntities<0>(asImp_(), this->gridView_());
res.template deserializeEntities<dofCodim>(asImp_(), this->gridView_());
prevSol() = curSol();
}
......@@ -617,10 +610,7 @@ public:
*/
size_t numDofs() const
{
if (isBox)
return gridView_().size(dim);
else
return gridView_().size(0);
return gridView_().size(dofCodim);
}
/*!
......
Supports Markdown
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