Skip to content
Snippets Groups Projects
Commit f3a284db authored by Timo Koch's avatar Timo Koch
Browse files

[gridfactory] Keep deprecated interface until dune >= 2.8

* The deprecated interface exists and should be marked override
  at least until release 2.8 including the release.
* After 2.8, i.e. 2.9-git the interface can be removed and is
  also removed here in foamgrid
parent 692e5936
No related branches found
No related tags found
1 merge request!84[gridfactory] Fix compiler warning for deprecated insertElement
Pipeline #35294 passed
This commit is part of merge request !84. Comments created here will be created in the context of that merge request.
......@@ -193,6 +193,8 @@ template <int dimworld, class ct>
);
}
// disable the deprecated interface when using Dune > 2.8
#if DUNE_VERSION_LTE(DUNE_COMMON, 2, 8)
DUNE_NO_DEPRECATED_BEGIN
/** \brief Insert a parametrized element into the coarse grid
\param type The GeometryType of the new element
......@@ -202,10 +204,7 @@ DUNE_NO_DEPRECATED_BEGIN
[[deprecated("Signature with VirtualFunction is deprecated and will be removed after Dune 2.8. Use signature with std::function.")]]
void insertElement(const GeometryType& type,
const std::vector<unsigned int>& vertices,
const std::shared_ptr<VirtualFunction<FieldVector<ctype,dimgrid>,FieldVector<ctype,dimworld> > >& elementParametrization)
#if DUNE_VERSION_LT(DUNE_COMMON, 2, 8)
override
#endif
const std::shared_ptr<VirtualFunction<FieldVector<ctype,dimgrid>,FieldVector<ctype,dimworld> > >& elementParametrization) override
{
assert(type.isLine());
EntityImp<1> newElement(this->vertexArray_[vertices[0]],
......@@ -223,6 +222,7 @@ DUNE_NO_DEPRECATED_BEGIN
std::get<dimgrid>(this->grid_->entityImps_[0]).push_back(newElement);
}
DUNE_NO_DEPRECATED_END
#endif
/** \brief Insert a parametrized element into the coarse grid
\param type The GeometryType of the new element
......@@ -392,6 +392,8 @@ template <int dimworld, class ct>
std::get<dimgrid>(this->grid_->entityImps_[0]).push_back(newElement);
}
// disable the deprecated interface when using Dune > 2.8
#if DUNE_VERSION_LTE(DUNE_COMMON, 2, 8)
DUNE_NO_DEPRECATED_BEGIN
/** \brief Insert a parametrized element into the coarse grid
\param type The GeometryType of the new element
......@@ -401,10 +403,7 @@ DUNE_NO_DEPRECATED_BEGIN
[[deprecated("Signature with VirtualFunction is deprecated and will be removed after Dune 2.8. Use signature with std::function.")]]
void insertElement(const GeometryType& type,
const std::vector<unsigned int>& vertices,
const std::shared_ptr<VirtualFunction<FieldVector<ctype,dimgrid>,FieldVector<ctype,dimworld> > >& elementParametrization)
#if DUNE_VERSION_LT(DUNE_COMMON, 2, 8)
override
#endif
const std::shared_ptr<VirtualFunction<FieldVector<ctype,dimgrid>,FieldVector<ctype,dimworld> > >& elementParametrization) override
{
assert(type.isTriangle());
EntityImp<dimgrid> newElement(/*level=*/0, this->grid_->getNextFreeId());
......@@ -422,6 +421,7 @@ DUNE_NO_DEPRECATED_BEGIN
std::get<dimgrid>(this->grid_->entityImps_[0]).push_back(newElement);
}
DUNE_NO_DEPRECATED_END
#endif
/** \brief Insert a parametrized element into the coarse grid
\param type The GeometryType of the new element
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment