#ifndef GUARD_3ecaa105be9e3abddf3a85d8adc5d36f
#define GUARD_3ecaa105be9e3abddf3a85d8adc5d36f

#define USING_DUNE_PYTHON 1
#include <config.h>
#include <dune/alugrid/dgf.hh>
#include <dune/alugrid/grid.hh>
#include <dune/fem/gridpart/adaptiveleafgridpart.hh>
#include <dune/fem/gridpart/filter/simple.hh>
#include <dune/fem/gridpart/filteredgridpart.hh>
#include <dune/fempy/py/gridview.hh>
#include <dune/python/grid/gridview.hh>
#include <dune/python/grid/hierarchical.hh>
#include <dune/fem/function/localfunction/bindable.hh>
#include <dune/fem/common/intersectionside.hh>
#include <dune/python/pybind11/pybind11.h>
#include <dune/python/pybind11/extensions.h>
#include <dune/fempy/py/grid/gridpart.hh>
#include <dune/common/exceptions.hh>
#include <dune/fempy/function/virtualizedgridfunction.hh>
#include <dune/fempy/py/ufllocalfunction.hh>

namespace UFLLocalFunctions_3ecaa105be9e3abddf3a85d8adc5d36f
{

  // UFLLocalFunction
// ----------------

template< class GridPart, class Coeffbndproj >
struct UFLLocalFunction
  : public Dune::Fem::BindableGridFunctionWithSpace<GridPart,Dune::Dim<1>>
{
  typedef GridPart GridPartType;
  typedef typename GridPartType::GridViewType GridView;
  typedef typename GridView::ctype ctype;
  typedef Dune::Fem::BindableGridFunctionWithSpace<GridPart,Dune::Dim<1>> BaseType;
  typedef Dune::Fem::GridFunctionSpace<GridPartType,Dune::Dim<1>> FunctionSpaceType;
  typedef typename GridPartType::template Codim< 0 >::EntityType EntityType;
  typedef typename GridPartType::IntersectionType IntersectionType;
  typedef typename EntityType::Geometry Geometry;
  typedef typename Geometry::GlobalCoordinate GlobalCoordinateType;
  typedef Dune::Fem::IntersectionSide Side;
  typedef double Conepsilon;
  typedef std::tuple< std::shared_ptr< Conepsilon > > ConstantTupleType;
  template< std::size_t i >
  using ConstantsRangeType = typename std::tuple_element_t< i, ConstantTupleType >::element_type;
  typedef std::tuple< Dune::Fem::GridFunctionSpace< GridPartType, Dune::FieldVector< double, 2 > > > CoefficientFunctionSpaceTupleType;
  typedef std::tuple< Coeffbndproj > CoefficientTupleType;
  template< std::size_t i >
  using CoefficientFunctionSpaceType = std::tuple_element_t< i, CoefficientFunctionSpaceTupleType >;
  template< std::size_t i >
  using CoefficientRangeType = typename CoefficientFunctionSpaceType< i >::RangeType;
  template< std::size_t i >
  using CoefficientJacobianRangeType = typename CoefficientFunctionSpaceType< i >::JacobianRangeType;
  static constexpr bool gridPartValid = Dune::Fem::checkGridPartValid<GridPartType,Dune::Fem::ConstLocalFunction<Coeffbndproj>>();
  template< std::size_t i >
  using CoefficientType = std::tuple_element_t< i, CoefficientTupleType >;
  template< std::size_t i >
  using ConstantType = typename std::tuple_element_t< i, ConstantTupleType >::element_type;
  using BaseType::entity;
  using BaseType::geometry;

  UFLLocalFunction ( const GridPartType &gridPart, const std::string &name, int order, const Coeffbndproj &coeffbndproj, const Dune::Fem::ParameterReader &parameter = Dune::Fem::Parameter::container() )
    : BaseType(gridPart,name,order),
      coefficients_( Dune::Fem::ConstLocalFunction< Coeffbndproj >( coeffbndproj ) )
  {
    std::get< 0 >( constants_ ) = std::make_shared< Conepsilon >( (Conepsilon(0)) );
  }

  void bind ( const IntersectionType &intersection, Side side )
  {
    BaseType::bind(intersection, side);
    std::get< 0 >( coefficients_ ).bind( this->entity() );
  }

  void bind ( const EntityType &entity )
  {
    BaseType::bind(entity);
    std::get< 0 >( coefficients_ ).bind( this->entity() );
  }

  void unbind ()
  {
    BaseType::unbind();
    std::get< 0 >( coefficients_ ).unbind();
  }

  template< class Point >
  void evaluate ( const Point &x, typename FunctionSpaceType::RangeType &result ) const
  {
    using std::max;
    using std::min;
    using std::sqrt;
    using std::tanh;
    double tmp0 = constant< 0 >();
    typename CoefficientFunctionSpaceType< 0 >::RangeType tmp1 = evaluateCoefficient< 0 >( x );
    const auto tmp2 = tmp1[ 1 ] * tmp1[ 1 ];
    const auto tmp3 = tmp1[ 0 ] * tmp1[ 0 ];
    const auto tmp4 = tmp3 + tmp2;
    const auto tmp5 = 1e-10 + tmp4;
    const auto tmp6 = std::sqrt( tmp5 );
    const auto tmp7 = -0.4 + tmp6;
    const auto tmp8 = 0.15 + tmp1[ 1 ];
    const auto tmp9 = tmp8 * tmp8;
    const auto tmp10 = 0.15 + tmp1[ 0 ];
    const auto tmp11 = tmp10 * tmp10;
    const auto tmp12 = tmp11 + tmp9;
    const auto tmp13 = 1e-10 + tmp12;
    const auto tmp14 = std::sqrt( tmp13 );
    const auto tmp15 = -0.3 + tmp14;
    const auto tmp16 = -0.15 + tmp1[ 1 ];
    const auto tmp17 = tmp16 * tmp16;
    const auto tmp18 = -0.15 + tmp1[ 0 ];
    const auto tmp19 = tmp18 * tmp18;
    const auto tmp20 = tmp19 + tmp17;
    const auto tmp21 = 1e-10 + tmp20;
    const auto tmp22 = std::sqrt( tmp21 );
    const auto tmp23 = -0.3 + tmp22;
    const auto tmp24 = std::min( tmp23, tmp15 );
    const auto tmp25 = std::max( tmp24, tmp7 );
    const auto tmp26 = 3 * tmp25;
    const auto tmp27 = tmp26 / tmp0;
    const auto tmp28 = std::tanh( tmp27 );
    const auto tmp29 = -1 * tmp28;
    const auto tmp30 = 1 + tmp29;
    const auto tmp31 = 0.5 * tmp30;
    const auto tmp32 = -1 * tmp31;
    const auto tmp33 = 1 + tmp32;
    const auto tmp34 = tmp33 * tmp31;
    result[ 0 ] = tmp34;
  }

  template< class Point >
  void jacobian ( const Point &x, typename FunctionSpaceType::JacobianRangeType &result ) const
  {
    using std::cosh;
    using std::max;
    using std::min;
    using std::pow;
    using std::sqrt;
    using std::tanh;
    double tmp0 = constant< 0 >();
    typename CoefficientFunctionSpaceType< 0 >::RangeType tmp1 = evaluateCoefficient< 0 >( x );
    const auto tmp2 = tmp1[ 1 ] * tmp1[ 1 ];
    const auto tmp3 = tmp1[ 0 ] * tmp1[ 0 ];
    const auto tmp4 = tmp3 + tmp2;
    const auto tmp5 = 1e-10 + tmp4;
    const auto tmp6 = std::sqrt( tmp5 );
    const auto tmp7 = -0.4 + tmp6;
    const auto tmp8 = 0.15 + tmp1[ 1 ];
    const auto tmp9 = tmp8 * tmp8;
    const auto tmp10 = 0.15 + tmp1[ 0 ];
    const auto tmp11 = tmp10 * tmp10;
    const auto tmp12 = tmp11 + tmp9;
    const auto tmp13 = 1e-10 + tmp12;
    const auto tmp14 = std::sqrt( tmp13 );
    const auto tmp15 = -0.3 + tmp14;
    const auto tmp16 = -0.15 + tmp1[ 1 ];
    const auto tmp17 = tmp16 * tmp16;
    const auto tmp18 = -0.15 + tmp1[ 0 ];
    const auto tmp19 = tmp18 * tmp18;
    const auto tmp20 = tmp19 + tmp17;
    const auto tmp21 = 1e-10 + tmp20;
    const auto tmp22 = std::sqrt( tmp21 );
    const auto tmp23 = -0.3 + tmp22;
    const auto tmp24 = std::min( tmp23, tmp15 );
    const auto tmp25 = std::max( tmp24, tmp7 );
    const auto tmp26 = 3 * tmp25;
    const auto tmp27 = tmp26 / tmp0;
    const auto tmp28 = 2.0 * tmp27;
    const auto tmp29 = std::cosh( tmp28 );
    const auto tmp30 = 1.0 + tmp29;
    const auto tmp31 = std::cosh( tmp27 );
    const auto tmp32 = 2.0 * tmp31;
    const auto tmp33 = tmp32 / tmp30;
    const auto tmp34 = std::pow( tmp33, 2 );
    const auto tmp35 = 2 * tmp22;
    typename CoefficientFunctionSpaceType< 0 >::JacobianRangeType tmp36 = jacobianCoefficient< 0 >( x );
    const auto tmp37 = (tmp36[ 1 ])[ 0 ] * tmp16;
    const auto tmp38 = tmp37 + tmp37;
    const auto tmp39 = (tmp36[ 0 ])[ 0 ] * tmp18;
    const auto tmp40 = tmp39 + tmp39;
    const auto tmp41 = tmp40 + tmp38;
    const auto tmp42 = tmp41 / tmp35;
    const auto tmp43 = tmp42 * (tmp23 < tmp15 ? 1 : 0.0);
    const auto tmp44 = 2 * tmp14;
    const auto tmp45 = (tmp36[ 1 ])[ 0 ] * tmp8;
    const auto tmp46 = tmp45 + tmp45;
    const auto tmp47 = (tmp36[ 0 ])[ 0 ] * tmp10;
    const auto tmp48 = tmp47 + tmp47;
    const auto tmp49 = tmp48 + tmp46;
    const auto tmp50 = tmp49 / tmp44;
    const auto tmp51 = -1 * (tmp23 < tmp15 ? 1 : 0.0);
    const auto tmp52 = 1.0 + tmp51;
    const auto tmp53 = tmp52 * tmp50;
    const auto tmp54 = tmp53 + tmp43;
    const auto tmp55 = tmp54 * (tmp24 > tmp7 ? 1 : 0.0);
    const auto tmp56 = 2 * tmp6;
    const auto tmp57 = tmp1[ 1 ] * (tmp36[ 1 ])[ 0 ];
    const auto tmp58 = tmp57 + tmp57;
    const auto tmp59 = tmp1[ 0 ] * (tmp36[ 0 ])[ 0 ];
    const auto tmp60 = tmp59 + tmp59;
    const auto tmp61 = tmp60 + tmp58;
    const auto tmp62 = tmp61 / tmp56;
    const auto tmp63 = -1 * (tmp24 > tmp7 ? 1 : 0.0);
    const auto tmp64 = 1.0 + tmp63;
    const auto tmp65 = tmp64 * tmp62;
    const auto tmp66 = tmp65 + tmp55;
    const auto tmp67 = 3 * tmp66;
    const auto tmp68 = tmp67 / tmp0;
    const auto tmp69 = tmp68 * tmp34;
    const auto tmp70 = -1 * tmp69;
    const auto tmp71 = 0.5 * tmp70;
    const auto tmp72 = std::tanh( tmp27 );
    const auto tmp73 = -1 * tmp72;
    const auto tmp74 = 1 + tmp73;
    const auto tmp75 = 0.5 * tmp74;
    const auto tmp76 = -1 * tmp75;
    const auto tmp77 = 1 + tmp76;
    const auto tmp78 = tmp77 * tmp71;
    const auto tmp79 = -1 * tmp71;
    const auto tmp80 = tmp75 * tmp79;
    const auto tmp81 = tmp80 + tmp78;
    const auto tmp82 = (tmp36[ 1 ])[ 1 ] * tmp16;
    const auto tmp83 = tmp82 + tmp82;
    const auto tmp84 = (tmp36[ 0 ])[ 1 ] * tmp18;
    const auto tmp85 = tmp84 + tmp84;
    const auto tmp86 = tmp85 + tmp83;
    const auto tmp87 = tmp86 / tmp35;
    const auto tmp88 = tmp87 * (tmp23 < tmp15 ? 1 : 0.0);
    const auto tmp89 = (tmp36[ 1 ])[ 1 ] * tmp8;
    const auto tmp90 = tmp89 + tmp89;
    const auto tmp91 = (tmp36[ 0 ])[ 1 ] * tmp10;
    const auto tmp92 = tmp91 + tmp91;
    const auto tmp93 = tmp92 + tmp90;
    const auto tmp94 = tmp93 / tmp44;
    const auto tmp95 = tmp52 * tmp94;
    const auto tmp96 = tmp95 + tmp88;
    const auto tmp97 = tmp96 * (tmp24 > tmp7 ? 1 : 0.0);
    const auto tmp98 = tmp1[ 1 ] * (tmp36[ 1 ])[ 1 ];
    const auto tmp99 = tmp98 + tmp98;
    const auto tmp100 = tmp1[ 0 ] * (tmp36[ 0 ])[ 1 ];
    const auto tmp101 = tmp100 + tmp100;
    const auto tmp102 = tmp101 + tmp99;
    const auto tmp103 = tmp102 / tmp56;
    const auto tmp104 = tmp64 * tmp103;
    const auto tmp105 = tmp104 + tmp97;
    const auto tmp106 = 3 * tmp105;
    const auto tmp107 = tmp106 / tmp0;
    const auto tmp108 = tmp107 * tmp34;
    const auto tmp109 = -1 * tmp108;
    const auto tmp110 = 0.5 * tmp109;
    const auto tmp111 = tmp77 * tmp110;
    const auto tmp112 = -1 * tmp110;
    const auto tmp113 = tmp75 * tmp112;
    const auto tmp114 = tmp113 + tmp111;
    (result[ 0 ])[ 0 ] = tmp81;
    (result[ 0 ])[ 1 ] = tmp114;
  }

  template< class Point >
  void hessian ( const Point &x, typename FunctionSpaceType::HessianRangeType &result ) const
  {
    using std::cosh;
    using std::max;
    using std::min;
    using std::pow;
    using std::sinh;
    using std::sqrt;
    using std::tanh;
    double tmp0 = constant< 0 >();
    typename CoefficientFunctionSpaceType< 0 >::RangeType tmp1 = evaluateCoefficient< 0 >( x );
    const auto tmp2 = tmp1[ 1 ] * tmp1[ 1 ];
    const auto tmp3 = tmp1[ 0 ] * tmp1[ 0 ];
    const auto tmp4 = tmp3 + tmp2;
    const auto tmp5 = 1e-10 + tmp4;
    const auto tmp6 = std::sqrt( tmp5 );
    const auto tmp7 = -0.4 + tmp6;
    const auto tmp8 = 0.15 + tmp1[ 1 ];
    const auto tmp9 = tmp8 * tmp8;
    const auto tmp10 = 0.15 + tmp1[ 0 ];
    const auto tmp11 = tmp10 * tmp10;
    const auto tmp12 = tmp11 + tmp9;
    const auto tmp13 = 1e-10 + tmp12;
    const auto tmp14 = std::sqrt( tmp13 );
    const auto tmp15 = -0.3 + tmp14;
    const auto tmp16 = -0.15 + tmp1[ 1 ];
    const auto tmp17 = tmp16 * tmp16;
    const auto tmp18 = -0.15 + tmp1[ 0 ];
    const auto tmp19 = tmp18 * tmp18;
    const auto tmp20 = tmp19 + tmp17;
    const auto tmp21 = 1e-10 + tmp20;
    const auto tmp22 = std::sqrt( tmp21 );
    const auto tmp23 = -0.3 + tmp22;
    const auto tmp24 = std::min( tmp23, tmp15 );
    const auto tmp25 = std::max( tmp24, tmp7 );
    const auto tmp26 = 3 * tmp25;
    const auto tmp27 = tmp26 / tmp0;
    const auto tmp28 = 2.0 * tmp27;
    const auto tmp29 = std::cosh( tmp28 );
    const auto tmp30 = 1.0 + tmp29;
    const auto tmp31 = std::cosh( tmp27 );
    const auto tmp32 = 2.0 * tmp31;
    const auto tmp33 = tmp32 / tmp30;
    const auto tmp34 = std::pow( tmp33, 2 );
    const auto tmp35 = 2 * tmp22;
    typename CoefficientFunctionSpaceType< 0 >::JacobianRangeType tmp36 = jacobianCoefficient< 0 >( x );
    const auto tmp37 = (tmp36[ 1 ])[ 0 ] * tmp16;
    const auto tmp38 = tmp37 + tmp37;
    const auto tmp39 = (tmp36[ 0 ])[ 0 ] * tmp18;
    const auto tmp40 = tmp39 + tmp39;
    const auto tmp41 = tmp40 + tmp38;
    const auto tmp42 = tmp41 / tmp35;
    const auto tmp43 = tmp42 * (tmp23 < tmp15 ? 1 : 0.0);
    const auto tmp44 = 2 * tmp14;
    const auto tmp45 = (tmp36[ 1 ])[ 0 ] * tmp8;
    const auto tmp46 = tmp45 + tmp45;
    const auto tmp47 = (tmp36[ 0 ])[ 0 ] * tmp10;
    const auto tmp48 = tmp47 + tmp47;
    const auto tmp49 = tmp48 + tmp46;
    const auto tmp50 = tmp49 / tmp44;
    const auto tmp51 = -1 * (tmp23 < tmp15 ? 1 : 0.0);
    const auto tmp52 = 1.0 + tmp51;
    const auto tmp53 = tmp52 * tmp50;
    const auto tmp54 = tmp53 + tmp43;
    const auto tmp55 = tmp54 * (tmp24 > tmp7 ? 1 : 0.0);
    const auto tmp56 = 2 * tmp6;
    const auto tmp57 = tmp1[ 1 ] * (tmp36[ 1 ])[ 0 ];
    const auto tmp58 = tmp57 + tmp57;
    const auto tmp59 = tmp1[ 0 ] * (tmp36[ 0 ])[ 0 ];
    const auto tmp60 = tmp59 + tmp59;
    const auto tmp61 = tmp60 + tmp58;
    const auto tmp62 = tmp61 / tmp56;
    const auto tmp63 = -1 * (tmp24 > tmp7 ? 1 : 0.0);
    const auto tmp64 = 1.0 + tmp63;
    const auto tmp65 = tmp64 * tmp62;
    const auto tmp66 = tmp65 + tmp55;
    const auto tmp67 = 3 * tmp66;
    const auto tmp68 = tmp67 / tmp0;
    const auto tmp69 = tmp68 * tmp34;
    const auto tmp70 = -1 * tmp69;
    const auto tmp71 = 0.5 * tmp70;
    const auto tmp72 = -1 * tmp71;
    const auto tmp73 = tmp72 * tmp71;
    const auto tmp74 = 2 * tmp42;
    const auto tmp75 = tmp74 * tmp42;
    const auto tmp76 = -1 * tmp75;
    typename CoefficientFunctionSpaceType< 0 >::HessianRangeType tmp77 = hessianCoefficient< 0 >( x );
    const auto tmp78 = ((tmp77[ 1 ])[ 0 ])[ 0 ] * tmp16;
    const auto tmp79 = (tmp36[ 1 ])[ 0 ] * (tmp36[ 1 ])[ 0 ];
    const auto tmp80 = tmp79 + tmp78;
    const auto tmp81 = tmp80 + tmp80;
    const auto tmp82 = ((tmp77[ 0 ])[ 0 ])[ 0 ] * tmp18;
    const auto tmp83 = (tmp36[ 0 ])[ 0 ] * (tmp36[ 0 ])[ 0 ];
    const auto tmp84 = tmp83 + tmp82;
    const auto tmp85 = tmp84 + tmp84;
    const auto tmp86 = tmp85 + tmp81;
    const auto tmp87 = tmp86 + tmp76;
    const auto tmp88 = tmp87 / tmp35;
    const auto tmp89 = tmp88 * (tmp23 < tmp15 ? 1 : 0.0);
    const auto tmp90 = 2 * tmp50;
    const auto tmp91 = tmp90 * tmp50;
    const auto tmp92 = -1 * tmp91;
    const auto tmp93 = ((tmp77[ 1 ])[ 0 ])[ 0 ] * tmp8;
    const auto tmp94 = tmp79 + tmp93;
    const auto tmp95 = tmp94 + tmp94;
    const auto tmp96 = ((tmp77[ 0 ])[ 0 ])[ 0 ] * tmp10;
    const auto tmp97 = tmp83 + tmp96;
    const auto tmp98 = tmp97 + tmp97;
    const auto tmp99 = tmp98 + tmp95;
    const auto tmp100 = tmp99 + tmp92;
    const auto tmp101 = tmp100 / tmp44;
    const auto tmp102 = tmp52 * tmp101;
    const auto tmp103 = tmp102 + tmp89;
    const auto tmp104 = tmp103 * (tmp24 > tmp7 ? 1 : 0.0);
    const auto tmp105 = 2 * tmp62;
    const auto tmp106 = tmp105 * tmp62;
    const auto tmp107 = -1 * tmp106;
    const auto tmp108 = tmp1[ 1 ] * ((tmp77[ 1 ])[ 0 ])[ 0 ];
    const auto tmp109 = tmp79 + tmp108;
    const auto tmp110 = tmp109 + tmp109;
    const auto tmp111 = tmp1[ 0 ] * ((tmp77[ 0 ])[ 0 ])[ 0 ];
    const auto tmp112 = tmp83 + tmp111;
    const auto tmp113 = tmp112 + tmp112;
    const auto tmp114 = tmp113 + tmp110;
    const auto tmp115 = tmp114 + tmp107;
    const auto tmp116 = tmp115 / tmp56;
    const auto tmp117 = tmp64 * tmp116;
    const auto tmp118 = tmp117 + tmp104;
    const auto tmp119 = 3 * tmp118;
    const auto tmp120 = tmp119 / tmp0;
    const auto tmp121 = tmp120 * tmp34;
    const auto tmp122 = std::sinh( tmp27 );
    const auto tmp123 = tmp68 * tmp122;
    const auto tmp124 = 2.0 * tmp123;
    const auto tmp125 = std::sinh( tmp28 );
    const auto tmp126 = 2.0 * tmp68;
    const auto tmp127 = tmp126 * tmp125;
    const auto tmp128 = tmp127 * tmp33;
    const auto tmp129 = -1 * tmp128;
    const auto tmp130 = tmp129 + tmp124;
    const auto tmp131 = tmp130 / tmp30;
    const auto tmp132 = 2 * tmp131;
    const auto tmp133 = tmp132 * tmp33;
    const auto tmp134 = tmp133 * tmp68;
    const auto tmp135 = tmp134 + tmp121;
    const auto tmp136 = -1 * tmp135;
    const auto tmp137 = 0.5 * tmp136;
    const auto tmp138 = -1 * tmp137;
    const auto tmp139 = std::tanh( tmp27 );
    const auto tmp140 = -1 * tmp139;
    const auto tmp141 = 1 + tmp140;
    const auto tmp142 = 0.5 * tmp141;
    const auto tmp143 = tmp142 * tmp138;
    const auto tmp144 = tmp143 + tmp73;
    const auto tmp145 = -1 * tmp142;
    const auto tmp146 = 1 + tmp145;
    const auto tmp147 = tmp146 * tmp137;
    const auto tmp148 = tmp147 + tmp73;
    const auto tmp149 = tmp148 + tmp144;
    const auto tmp150 = (tmp36[ 1 ])[ 1 ] * tmp16;
    const auto tmp151 = tmp150 + tmp150;
    const auto tmp152 = (tmp36[ 0 ])[ 1 ] * tmp18;
    const auto tmp153 = tmp152 + tmp152;
    const auto tmp154 = tmp153 + tmp151;
    const auto tmp155 = tmp154 / tmp35;
    const auto tmp156 = tmp155 * (tmp23 < tmp15 ? 1 : 0.0);
    const auto tmp157 = (tmp36[ 1 ])[ 1 ] * tmp8;
    const auto tmp158 = tmp157 + tmp157;
    const auto tmp159 = (tmp36[ 0 ])[ 1 ] * tmp10;
    const auto tmp160 = tmp159 + tmp159;
    const auto tmp161 = tmp160 + tmp158;
    const auto tmp162 = tmp161 / tmp44;
    const auto tmp163 = tmp52 * tmp162;
    const auto tmp164 = tmp163 + tmp156;
    const auto tmp165 = tmp164 * (tmp24 > tmp7 ? 1 : 0.0);
    const auto tmp166 = tmp1[ 1 ] * (tmp36[ 1 ])[ 1 ];
    const auto tmp167 = tmp166 + tmp166;
    const auto tmp168 = tmp1[ 0 ] * (tmp36[ 0 ])[ 1 ];
    const auto tmp169 = tmp168 + tmp168;
    const auto tmp170 = tmp169 + tmp167;
    const auto tmp171 = tmp170 / tmp56;
    const auto tmp172 = tmp64 * tmp171;
    const auto tmp173 = tmp172 + tmp165;
    const auto tmp174 = 3 * tmp173;
    const auto tmp175 = tmp174 / tmp0;
    const auto tmp176 = tmp175 * tmp34;
    const auto tmp177 = -1 * tmp176;
    const auto tmp178 = 0.5 * tmp177;
    const auto tmp179 = tmp72 * tmp178;
    const auto tmp180 = 2 * tmp155;
    const auto tmp181 = tmp180 * tmp42;
    const auto tmp182 = -1 * tmp181;
    const auto tmp183 = ((tmp77[ 1 ])[ 0 ])[ 1 ] * tmp16;
    const auto tmp184 = (tmp36[ 1 ])[ 0 ] * (tmp36[ 1 ])[ 1 ];
    const auto tmp185 = tmp184 + tmp183;
    const auto tmp186 = tmp185 + tmp185;
    const auto tmp187 = ((tmp77[ 0 ])[ 0 ])[ 1 ] * tmp18;
    const auto tmp188 = (tmp36[ 0 ])[ 0 ] * (tmp36[ 0 ])[ 1 ];
    const auto tmp189 = tmp188 + tmp187;
    const auto tmp190 = tmp189 + tmp189;
    const auto tmp191 = tmp190 + tmp186;
    const auto tmp192 = tmp191 + tmp182;
    const auto tmp193 = tmp192 / tmp35;
    const auto tmp194 = tmp193 * (tmp23 < tmp15 ? 1 : 0.0);
    const auto tmp195 = 2 * tmp162;
    const auto tmp196 = tmp195 * tmp50;
    const auto tmp197 = -1 * tmp196;
    const auto tmp198 = ((tmp77[ 1 ])[ 0 ])[ 1 ] * tmp8;
    const auto tmp199 = tmp184 + tmp198;
    const auto tmp200 = tmp199 + tmp199;
    const auto tmp201 = ((tmp77[ 0 ])[ 0 ])[ 1 ] * tmp10;
    const auto tmp202 = tmp188 + tmp201;
    const auto tmp203 = tmp202 + tmp202;
    const auto tmp204 = tmp203 + tmp200;
    const auto tmp205 = tmp204 + tmp197;
    const auto tmp206 = tmp205 / tmp44;
    const auto tmp207 = tmp52 * tmp206;
    const auto tmp208 = tmp207 + tmp194;
    const auto tmp209 = tmp208 * (tmp24 > tmp7 ? 1 : 0.0);
    const auto tmp210 = 2 * tmp171;
    const auto tmp211 = tmp210 * tmp62;
    const auto tmp212 = -1 * tmp211;
    const auto tmp213 = tmp1[ 1 ] * ((tmp77[ 1 ])[ 0 ])[ 1 ];
    const auto tmp214 = tmp213 + tmp184;
    const auto tmp215 = tmp214 + tmp214;
    const auto tmp216 = tmp1[ 0 ] * ((tmp77[ 0 ])[ 0 ])[ 1 ];
    const auto tmp217 = tmp216 + tmp188;
    const auto tmp218 = tmp217 + tmp217;
    const auto tmp219 = tmp218 + tmp215;
    const auto tmp220 = tmp219 + tmp212;
    const auto tmp221 = tmp220 / tmp56;
    const auto tmp222 = tmp64 * tmp221;
    const auto tmp223 = tmp222 + tmp209;
    const auto tmp224 = 3 * tmp223;
    const auto tmp225 = tmp224 / tmp0;
    const auto tmp226 = tmp225 * tmp34;
    const auto tmp227 = tmp175 * tmp122;
    const auto tmp228 = 2.0 * tmp227;
    const auto tmp229 = 2.0 * tmp175;
    const auto tmp230 = tmp229 * tmp125;
    const auto tmp231 = tmp230 * tmp33;
    const auto tmp232 = -1 * tmp231;
    const auto tmp233 = tmp232 + tmp228;
    const auto tmp234 = tmp233 / tmp30;
    const auto tmp235 = 2 * tmp234;
    const auto tmp236 = tmp235 * tmp33;
    const auto tmp237 = tmp236 * tmp68;
    const auto tmp238 = tmp237 + tmp226;
    const auto tmp239 = -1 * tmp238;
    const auto tmp240 = 0.5 * tmp239;
    const auto tmp241 = -1 * tmp240;
    const auto tmp242 = tmp142 * tmp241;
    const auto tmp243 = tmp242 + tmp179;
    const auto tmp244 = -1 * tmp178;
    const auto tmp245 = tmp244 * tmp71;
    const auto tmp246 = tmp146 * tmp240;
    const auto tmp247 = tmp246 + tmp245;
    const auto tmp248 = tmp247 + tmp243;
    const auto tmp249 = tmp74 * tmp155;
    const auto tmp250 = -1 * tmp249;
    const auto tmp251 = ((tmp77[ 1 ])[ 1 ])[ 0 ] * tmp16;
    const auto tmp252 = tmp184 + tmp251;
    const auto tmp253 = tmp252 + tmp252;
    const auto tmp254 = ((tmp77[ 0 ])[ 1 ])[ 0 ] * tmp18;
    const auto tmp255 = tmp188 + tmp254;
    const auto tmp256 = tmp255 + tmp255;
    const auto tmp257 = tmp256 + tmp253;
    const auto tmp258 = tmp257 + tmp250;
    const auto tmp259 = tmp258 / tmp35;
    const auto tmp260 = tmp259 * (tmp23 < tmp15 ? 1 : 0.0);
    const auto tmp261 = tmp90 * tmp162;
    const auto tmp262 = -1 * tmp261;
    const auto tmp263 = ((tmp77[ 1 ])[ 1 ])[ 0 ] * tmp8;
    const auto tmp264 = tmp184 + tmp263;
    const auto tmp265 = tmp264 + tmp264;
    const auto tmp266 = ((tmp77[ 0 ])[ 1 ])[ 0 ] * tmp10;
    const auto tmp267 = tmp188 + tmp266;
    const auto tmp268 = tmp267 + tmp267;
    const auto tmp269 = tmp268 + tmp265;
    const auto tmp270 = tmp269 + tmp262;
    const auto tmp271 = tmp270 / tmp44;
    const auto tmp272 = tmp52 * tmp271;
    const auto tmp273 = tmp272 + tmp260;
    const auto tmp274 = tmp273 * (tmp24 > tmp7 ? 1 : 0.0);
    const auto tmp275 = tmp105 * tmp171;
    const auto tmp276 = -1 * tmp275;
    const auto tmp277 = tmp1[ 1 ] * ((tmp77[ 1 ])[ 1 ])[ 0 ];
    const auto tmp278 = tmp184 + tmp277;
    const auto tmp279 = tmp278 + tmp278;
    const auto tmp280 = tmp1[ 0 ] * ((tmp77[ 0 ])[ 1 ])[ 0 ];
    const auto tmp281 = tmp188 + tmp280;
    const auto tmp282 = tmp281 + tmp281;
    const auto tmp283 = tmp282 + tmp279;
    const auto tmp284 = tmp283 + tmp276;
    const auto tmp285 = tmp284 / tmp56;
    const auto tmp286 = tmp64 * tmp285;
    const auto tmp287 = tmp286 + tmp274;
    const auto tmp288 = 3 * tmp287;
    const auto tmp289 = tmp288 / tmp0;
    const auto tmp290 = tmp289 * tmp34;
    const auto tmp291 = tmp133 * tmp175;
    const auto tmp292 = tmp291 + tmp290;
    const auto tmp293 = -1 * tmp292;
    const auto tmp294 = 0.5 * tmp293;
    const auto tmp295 = tmp146 * tmp294;
    const auto tmp296 = tmp295 + tmp179;
    const auto tmp297 = -1 * tmp294;
    const auto tmp298 = tmp142 * tmp297;
    const auto tmp299 = tmp298 + tmp245;
    const auto tmp300 = tmp299 + tmp296;
    const auto tmp301 = tmp244 * tmp178;
    const auto tmp302 = tmp180 * tmp155;
    const auto tmp303 = -1 * tmp302;
    const auto tmp304 = ((tmp77[ 1 ])[ 1 ])[ 1 ] * tmp16;
    const auto tmp305 = (tmp36[ 1 ])[ 1 ] * (tmp36[ 1 ])[ 1 ];
    const auto tmp306 = tmp305 + tmp304;
    const auto tmp307 = tmp306 + tmp306;
    const auto tmp308 = ((tmp77[ 0 ])[ 1 ])[ 1 ] * tmp18;
    const auto tmp309 = (tmp36[ 0 ])[ 1 ] * (tmp36[ 0 ])[ 1 ];
    const auto tmp310 = tmp309 + tmp308;
    const auto tmp311 = tmp310 + tmp310;
    const auto tmp312 = tmp311 + tmp307;
    const auto tmp313 = tmp312 + tmp303;
    const auto tmp314 = tmp313 / tmp35;
    const auto tmp315 = tmp314 * (tmp23 < tmp15 ? 1 : 0.0);
    const auto tmp316 = tmp195 * tmp162;
    const auto tmp317 = -1 * tmp316;
    const auto tmp318 = ((tmp77[ 1 ])[ 1 ])[ 1 ] * tmp8;
    const auto tmp319 = tmp305 + tmp318;
    const auto tmp320 = tmp319 + tmp319;
    const auto tmp321 = ((tmp77[ 0 ])[ 1 ])[ 1 ] * tmp10;
    const auto tmp322 = tmp309 + tmp321;
    const auto tmp323 = tmp322 + tmp322;
    const auto tmp324 = tmp323 + tmp320;
    const auto tmp325 = tmp324 + tmp317;
    const auto tmp326 = tmp325 / tmp44;
    const auto tmp327 = tmp52 * tmp326;
    const auto tmp328 = tmp327 + tmp315;
    const auto tmp329 = tmp328 * (tmp24 > tmp7 ? 1 : 0.0);
    const auto tmp330 = tmp210 * tmp171;
    const auto tmp331 = -1 * tmp330;
    const auto tmp332 = tmp1[ 1 ] * ((tmp77[ 1 ])[ 1 ])[ 1 ];
    const auto tmp333 = tmp305 + tmp332;
    const auto tmp334 = tmp333 + tmp333;
    const auto tmp335 = tmp1[ 0 ] * ((tmp77[ 0 ])[ 1 ])[ 1 ];
    const auto tmp336 = tmp309 + tmp335;
    const auto tmp337 = tmp336 + tmp336;
    const auto tmp338 = tmp337 + tmp334;
    const auto tmp339 = tmp338 + tmp331;
    const auto tmp340 = tmp339 / tmp56;
    const auto tmp341 = tmp64 * tmp340;
    const auto tmp342 = tmp341 + tmp329;
    const auto tmp343 = 3 * tmp342;
    const auto tmp344 = tmp343 / tmp0;
    const auto tmp345 = tmp344 * tmp34;
    const auto tmp346 = tmp236 * tmp175;
    const auto tmp347 = tmp346 + tmp345;
    const auto tmp348 = -1 * tmp347;
    const auto tmp349 = 0.5 * tmp348;
    const auto tmp350 = -1 * tmp349;
    const auto tmp351 = tmp142 * tmp350;
    const auto tmp352 = tmp351 + tmp301;
    const auto tmp353 = tmp146 * tmp349;
    const auto tmp354 = tmp353 + tmp301;
    const auto tmp355 = tmp354 + tmp352;
    ((result[ 0 ])[ 0 ])[ 0 ] = tmp149;
    ((result[ 0 ])[ 0 ])[ 1 ] = tmp248;
    ((result[ 0 ])[ 1 ])[ 0 ] = tmp300;
    ((result[ 0 ])[ 1 ])[ 1 ] = tmp355;
  }

  template< std::size_t i >
  const ConstantType< i > &constant () const
  {
    return *std::get< i >( constants_ );
  }

  template< std::size_t i >
  ConstantType< i > &constant ()
  {
    return *std::get< i >( constants_ );
  }

  const Conepsilon &conepsilon () const
  {
    return *std::get< 0 >( constants_ );
  }

  Conepsilon &conepsilon ()
  {
    return *std::get< 0 >( constants_ );
  }

  template< std::size_t i, class Point >
  typename CoefficientFunctionSpaceType< i >::RangeType evaluateCoefficient ( const Point &x ) const
  {
    typename CoefficientFunctionSpaceType< i >::RangeType result;
    std::get< i >( coefficients_ ).evaluate( x, result );;
    return result;
  }

  template< std::size_t i, class Point >
  typename CoefficientFunctionSpaceType< i >::JacobianRangeType jacobianCoefficient ( const Point &x ) const
  {
    typename CoefficientFunctionSpaceType< i >::JacobianRangeType result;
    std::get< i >( coefficients_ ).jacobian( x, result );;
    return result;
  }

  template< std::size_t i, class Point >
  typename CoefficientFunctionSpaceType< i >::HessianRangeType hessianCoefficient ( const Point &x ) const
  {
    typename CoefficientFunctionSpaceType< i >::HessianRangeType result;
    std::get< i >( coefficients_ ).hessian( x, result );;
    return result;
  }
  ConstantTupleType constants_;
  std::tuple< Dune::Fem::ConstLocalFunction< Coeffbndproj > > coefficients_;
};

} // namespace UFLLocalFunctions_3ecaa105be9e3abddf3a85d8adc5d36f

PYBIND11_MODULE( localfunction_3ecaa105be9e3abddf3a85d8adc5d36f_a524c1196983e65de1c06d7d6afdeb44, module )
{
  typedef UFLLocalFunctions_3ecaa105be9e3abddf3a85d8adc5d36f::UFLLocalFunction< typename Dune::FemPy::GridPart< Dune::Fem::FilteredGridPart< Dune::FemPy::GridPart< Dune::Fem::AdaptiveLeafGridPart< Dune::ALUGrid< 2, 2, Dune::simplex > > >, Dune::Fem::SimpleFilter< Dune::FemPy::GridPart< Dune::Fem::AdaptiveLeafGridPart< Dune::ALUGrid< 2, 2, Dune::simplex > > > >, true > >, Dune::FemPy::VirtualizedGridFunction< Dune::FemPy::GridPart<Dune::Fem::FilteredGridPart< Dune::FemPy::GridPart< Dune::Fem::AdaptiveLeafGridPart< Dune::ALUGrid< 2, 2, Dune::simplex > > >, Dune::Fem::SimpleFilter< Dune::FemPy::GridPart< Dune::Fem::AdaptiveLeafGridPart< Dune::ALUGrid< 2, 2, Dune::simplex > > > >, true >>, Dune::FieldVector< double, 2 > > > LocalFunctionType;
  if constexpr( LocalFunctionType::gridPartValid )
  {
      auto cls = Dune::Python::insertClass<LocalFunctionType>(module,"UFLLocalFunction",Dune::Python::GenerateTypeName("UFLLocalFunctions_3ecaa105be9e3abddf3a85d8adc5d36f::UFLLocalFunction< typename Dune::FemPy::GridPart< Dune::Fem::FilteredGridPart< Dune::FemPy::GridPart< Dune::Fem::AdaptiveLeafGridPart< Dune::ALUGrid< 2, 2, Dune::simplex > > >, Dune::Fem::SimpleFilter< Dune::FemPy::GridPart< Dune::Fem::AdaptiveLeafGridPart< Dune::ALUGrid< 2, 2, Dune::simplex > > > >, true > >, Dune::FemPy::VirtualizedGridFunction< Dune::FemPy::GridPart<Dune::Fem::FilteredGridPart< Dune::FemPy::GridPart< Dune::Fem::AdaptiveLeafGridPart< Dune::ALUGrid< 2, 2, Dune::simplex > > >, Dune::Fem::SimpleFilter< Dune::FemPy::GridPart< Dune::Fem::AdaptiveLeafGridPart< Dune::ALUGrid< 2, 2, Dune::simplex > > > >, true >>, Dune::FieldVector< double, 2 > > >"), Dune::Python::IncludeFiles({"python/dune/generated/localfunction_3ecaa105be9e3abddf3a85d8adc5d36f_a524c1196983e65de1c06d7d6afdeb44.cc"})).first;
      Dune::FemPy::registerUFLLocalFunction( module, cls );
      cls.def( pybind11::init( [] ( pybind11::object gridView, const std::string &name, int order, const Dune::FemPy::VirtualizedGridFunction< Dune::FemPy::GridPart<Dune::Fem::FilteredGridPart< Dune::FemPy::GridPart< Dune::Fem::AdaptiveLeafGridPart< Dune::ALUGrid< 2, 2, Dune::simplex > > >, Dune::Fem::SimpleFilter< Dune::FemPy::GridPart< Dune::Fem::AdaptiveLeafGridPart< Dune::ALUGrid< 2, 2, Dune::simplex > > > >, true >>, Dune::FieldVector< double, 2 > > &coeffbndproj ) {return new LocalFunctionType( Dune::FemPy::gridPart<Dune::Fem::FilteredGridPart< Dune::FemPy::GridPart< Dune::Fem::AdaptiveLeafGridPart< Dune::ALUGrid< 2, 2, Dune::simplex > > >, Dune::Fem::SimpleFilter< Dune::FemPy::GridPart< Dune::Fem::AdaptiveLeafGridPart< Dune::ALUGrid< 2, 2, Dune::simplex > > > >, true >>(gridView),name,order, coeffbndproj); } ), pybind11::keep_alive< 1, 2 >(), pybind11::keep_alive< 1, 3 >() );
      cls.def_property( "epsilon", [] ( LocalFunctionType &self ) -> UFLLocalFunctions_3ecaa105be9e3abddf3a85d8adc5d36f::UFLLocalFunction< typename Dune::FemPy::GridPart< Dune::Fem::FilteredGridPart< Dune::FemPy::GridPart< Dune::Fem::AdaptiveLeafGridPart< Dune::ALUGrid< 2, 2, Dune::simplex > > >, Dune::Fem::SimpleFilter< Dune::FemPy::GridPart< Dune::Fem::AdaptiveLeafGridPart< Dune::ALUGrid< 2, 2, Dune::simplex > > > >, true > >, Dune::FemPy::VirtualizedGridFunction< Dune::FemPy::GridPart<Dune::Fem::FilteredGridPart< Dune::FemPy::GridPart< Dune::Fem::AdaptiveLeafGridPart< Dune::ALUGrid< 2, 2, Dune::simplex > > >, Dune::Fem::SimpleFilter< Dune::FemPy::GridPart< Dune::Fem::AdaptiveLeafGridPart< Dune::ALUGrid< 2, 2, Dune::simplex > > > >, true >>, Dune::FieldVector< double, 2 > > >::Conepsilon { return self.conepsilon(); }, [] ( LocalFunctionType &self, const UFLLocalFunctions_3ecaa105be9e3abddf3a85d8adc5d36f::UFLLocalFunction< typename Dune::FemPy::GridPart< Dune::Fem::FilteredGridPart< Dune::FemPy::GridPart< Dune::Fem::AdaptiveLeafGridPart< Dune::ALUGrid< 2, 2, Dune::simplex > > >, Dune::Fem::SimpleFilter< Dune::FemPy::GridPart< Dune::Fem::AdaptiveLeafGridPart< Dune::ALUGrid< 2, 2, Dune::simplex > > > >, true > >, Dune::FemPy::VirtualizedGridFunction< Dune::FemPy::GridPart<Dune::Fem::FilteredGridPart< Dune::FemPy::GridPart< Dune::Fem::AdaptiveLeafGridPart< Dune::ALUGrid< 2, 2, Dune::simplex > > >, Dune::Fem::SimpleFilter< Dune::FemPy::GridPart< Dune::Fem::AdaptiveLeafGridPart< Dune::ALUGrid< 2, 2, Dune::simplex > > > >, true >>, Dune::FieldVector< double, 2 > > >::Conepsilon &v ) { self.conepsilon() = v; } );
      cls.def_property_readonly( "virtualized", [] ( LocalFunctionType& ) -> bool { return true;});
  }
}

#endif
