Skip to content
Snippets Groups Projects
Commit cecc2de2 authored by Leon Keim's avatar Leon Keim Committed by Timo Koch
Browse files

fix lambda capture in parametersforgeneratedgrid.hh

parent d513c57d
No related branches found
No related tags found
1 merge request!3913Make lambda captures explicit for C++ 20
......@@ -244,7 +244,7 @@ private:
/*!
* \brief Returns a list of boundary face priorities from user specified input or default values if no input is given
*
* This essentially determines the index of a node on an edge or corner. For instance in a 2D case, a list of {0,1,2,3}
* This essentially determines the index of a node on an edge or corner. For instance in a 2D case, a list of {0,1,2,3}
* will give highest priority to the "x-direction" and lowest to the "diagonal-direction".
*/
BoundaryList getPriorityList_() const
......@@ -410,7 +410,7 @@ private:
const auto generateFunction = [&](auto& poreRadiusDist)
{
return [=](const auto& vertex, const int poreLabel) mutable
return [=,this](const auto& vertex, const int poreLabel) mutable
{
const auto radius = poreRadiusDist(generator);
......@@ -518,7 +518,7 @@ private:
DUNE_THROW(Dune::InvalidStateException, "CapPoresOnBoundaries must not contain duplicates");
// automatically determine the pore volume if not provided by the grid file
return [=] (const auto& vertex, const auto vIdx)
return [=,this] (const auto& vertex, const auto vIdx)
{
const Scalar r = getParameter(vertex, "PoreInscribedRadius");
const Scalar volume = [&]
......@@ -570,7 +570,7 @@ private:
// shape parameter for calculation of throat radius
const Scalar throatN = getParamFromGroup<Scalar>(paramGroup_, prefix + "ThroatInscribedRadiusN", 0.1);
return [=](const Element& element)
return [=,this](const Element& element)
{
const Scalar delta = element.geometry().volume();
const std::array<Vertex, 2> vertices = {element.template subEntity<dim>(0), element.template subEntity<dim>(1)};
......@@ -597,7 +597,7 @@ private:
// decide whether to subtract the pore radii from the throat length or not
const bool subtractRadiiFromThroatLength = getParamFromGroup<bool>(paramGroup_, prefix + "SubtractPoreInscribedRadiiFromThroatLength", true);
return [=](const Element& element)
return [=,this](const Element& element)
{
if (inputThroatLength > 0.0)
return inputThroatLength;
......
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