#ifndef GUARD_6eccfc8fd91ce34d81e7c3962ece5d94
#define GUARD_6eccfc8fd91ce34d81e7c3962ece5d94

#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/py/ufllocalfunction.hh>

namespace UFLLocalFunctions_6eccfc8fd91ce34d81e7c3962ece5d94
{

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

template< class GridPart >
struct UFLLocalFunction
  : public Dune::Fem::BindableGridFunctionWithSpace<GridPart,Dune::Dim<2>>
{
  typedef GridPart GridPartType;
  typedef typename GridPartType::GridViewType GridView;
  typedef typename GridView::ctype ctype;
  typedef Dune::Fem::BindableGridFunctionWithSpace<GridPart,Dune::Dim<2>> BaseType;
  typedef Dune::Fem::GridFunctionSpace<GridPartType,Dune::Dim<2>> 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 std::tuple<> ConstantTupleType;
  typedef std::tuple<> CoefficientTupleType;
  static constexpr bool gridPartValid = true;
  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 Dune::Fem::ParameterReader &parameter = Dune::Fem::Parameter::container() )
    : BaseType(gridPart,name,order)
  {}

  void bind ( const IntersectionType &intersection, Side side )
  {
    BaseType::bind(intersection, side);
  }

  void bind ( const EntityType &entity )
  {
    BaseType::bind(entity);
  }

  void unbind ()
  {
    BaseType::unbind();
  }

  template< class Point >
  void evaluate ( const Point &x, typename FunctionSpaceType::RangeType &result ) const
  {
    using std::max;
    using std::min;
    using std::sqrt;
    GlobalCoordinateType tmp0 = geometry().global( Dune::Fem::coordinate( x ) );
    const auto tmp1 = tmp0[ 1 ] * tmp0[ 1 ];
    const auto tmp2 = tmp0[ 0 ] * tmp0[ 0 ];
    const auto tmp3 = tmp2 + tmp1;
    const auto tmp4 = 1e-10 + tmp3;
    const auto tmp5 = std::sqrt( tmp4 );
    const auto tmp6 = -0.4 + tmp5;
    const auto tmp7 = 0.15 + tmp0[ 1 ];
    const auto tmp8 = tmp7 * tmp7;
    const auto tmp9 = 0.15 + tmp0[ 0 ];
    const auto tmp10 = tmp9 * tmp9;
    const auto tmp11 = tmp10 + tmp8;
    const auto tmp12 = 1e-10 + tmp11;
    const auto tmp13 = std::sqrt( tmp12 );
    const auto tmp14 = -0.3 + tmp13;
    const auto tmp15 = -0.15 + tmp0[ 1 ];
    const auto tmp16 = tmp15 * tmp15;
    const auto tmp17 = -0.15 + tmp0[ 0 ];
    const auto tmp18 = tmp17 * tmp17;
    const auto tmp19 = tmp18 + tmp16;
    const auto tmp20 = 1e-10 + tmp19;
    const auto tmp21 = std::sqrt( tmp20 );
    const auto tmp22 = -0.3 + tmp21;
    const auto tmp23 = std::min( tmp22, tmp14 );
    const auto tmp24 = std::max( tmp23, tmp6 );
    const auto tmp25 = 2 * tmp21;
    const auto tmp26 = tmp17 + tmp17;
    const auto tmp27 = tmp26 / tmp25;
    const auto tmp28 = tmp27 * (tmp22 < tmp14 ? 1 : 0.0);
    const auto tmp29 = 2 * tmp13;
    const auto tmp30 = tmp9 + tmp9;
    const auto tmp31 = tmp30 / tmp29;
    const auto tmp32 = -1 * (tmp22 < tmp14 ? 1 : 0.0);
    const auto tmp33 = 1.0 + tmp32;
    const auto tmp34 = tmp33 * tmp31;
    const auto tmp35 = tmp34 + tmp28;
    const auto tmp36 = tmp35 * (tmp23 > tmp6 ? 1 : 0.0);
    const auto tmp37 = 2 * tmp5;
    const auto tmp38 = tmp0[ 0 ] + tmp0[ 0 ];
    const auto tmp39 = tmp38 / tmp37;
    const auto tmp40 = -1 * (tmp23 > tmp6 ? 1 : 0.0);
    const auto tmp41 = 1.0 + tmp40;
    const auto tmp42 = tmp41 * tmp39;
    const auto tmp43 = tmp42 + tmp36;
    const auto tmp44 = -1 * tmp43;
    const auto tmp45 = tmp44 * tmp24;
    const auto tmp46 = tmp0[ 0 ] + tmp45;
    const auto tmp47 = tmp15 + tmp15;
    const auto tmp48 = tmp47 / tmp25;
    const auto tmp49 = tmp48 * (tmp22 < tmp14 ? 1 : 0.0);
    const auto tmp50 = tmp7 + tmp7;
    const auto tmp51 = tmp50 / tmp29;
    const auto tmp52 = tmp33 * tmp51;
    const auto tmp53 = tmp52 + tmp49;
    const auto tmp54 = tmp53 * (tmp23 > tmp6 ? 1 : 0.0);
    const auto tmp55 = tmp0[ 1 ] + tmp0[ 1 ];
    const auto tmp56 = tmp55 / tmp37;
    const auto tmp57 = tmp41 * tmp56;
    const auto tmp58 = tmp57 + tmp54;
    const auto tmp59 = -1 * tmp58;
    const auto tmp60 = tmp59 * tmp24;
    const auto tmp61 = tmp0[ 1 ] + tmp60;
    result[ 0 ] = tmp46;
    result[ 1 ] = tmp61;
  }

  template< class Point >
  void jacobian ( const Point &x, typename FunctionSpaceType::JacobianRangeType &result ) const
  {
    using std::max;
    using std::min;
    using std::sqrt;
    GlobalCoordinateType tmp0 = geometry().global( Dune::Fem::coordinate( x ) );
    const auto tmp1 = tmp0[ 1 ] * tmp0[ 1 ];
    const auto tmp2 = tmp0[ 0 ] * tmp0[ 0 ];
    const auto tmp3 = tmp2 + tmp1;
    const auto tmp4 = 1e-10 + tmp3;
    const auto tmp5 = std::sqrt( tmp4 );
    const auto tmp6 = -0.4 + tmp5;
    const auto tmp7 = 0.15 + tmp0[ 1 ];
    const auto tmp8 = tmp7 * tmp7;
    const auto tmp9 = 0.15 + tmp0[ 0 ];
    const auto tmp10 = tmp9 * tmp9;
    const auto tmp11 = tmp10 + tmp8;
    const auto tmp12 = 1e-10 + tmp11;
    const auto tmp13 = std::sqrt( tmp12 );
    const auto tmp14 = -0.3 + tmp13;
    const auto tmp15 = -0.15 + tmp0[ 1 ];
    const auto tmp16 = tmp15 * tmp15;
    const auto tmp17 = -0.15 + tmp0[ 0 ];
    const auto tmp18 = tmp17 * tmp17;
    const auto tmp19 = tmp18 + tmp16;
    const auto tmp20 = 1e-10 + tmp19;
    const auto tmp21 = std::sqrt( tmp20 );
    const auto tmp22 = -0.3 + tmp21;
    const auto tmp23 = std::min( tmp22, tmp14 );
    const auto tmp24 = std::max( tmp23, tmp6 );
    const auto tmp25 = 2 * tmp21;
    const auto tmp26 = tmp17 + tmp17;
    const auto tmp27 = tmp26 / tmp25;
    const auto tmp28 = 2 * tmp27;
    const auto tmp29 = tmp28 * tmp27;
    const auto tmp30 = -1 * tmp29;
    const auto tmp31 = 2 + tmp30;
    const auto tmp32 = tmp31 / tmp25;
    const auto tmp33 = tmp32 * (tmp22 < tmp14 ? 1 : 0.0);
    const auto tmp34 = 2 * tmp13;
    const auto tmp35 = tmp9 + tmp9;
    const auto tmp36 = tmp35 / tmp34;
    const auto tmp37 = 2 * tmp36;
    const auto tmp38 = tmp37 * tmp36;
    const auto tmp39 = -1 * tmp38;
    const auto tmp40 = 2 + tmp39;
    const auto tmp41 = tmp40 / tmp34;
    const auto tmp42 = -1 * (tmp22 < tmp14 ? 1 : 0.0);
    const auto tmp43 = 1.0 + tmp42;
    const auto tmp44 = tmp43 * tmp41;
    const auto tmp45 = tmp44 + tmp33;
    const auto tmp46 = tmp45 * (tmp23 > tmp6 ? 1 : 0.0);
    const auto tmp47 = 2 * tmp5;
    const auto tmp48 = tmp0[ 0 ] + tmp0[ 0 ];
    const auto tmp49 = tmp48 / tmp47;
    const auto tmp50 = 2 * tmp49;
    const auto tmp51 = tmp50 * tmp49;
    const auto tmp52 = -1 * tmp51;
    const auto tmp53 = 2 + tmp52;
    const auto tmp54 = tmp53 / tmp47;
    const auto tmp55 = -1 * (tmp23 > tmp6 ? 1 : 0.0);
    const auto tmp56 = 1.0 + tmp55;
    const auto tmp57 = tmp56 * tmp54;
    const auto tmp58 = tmp57 + tmp46;
    const auto tmp59 = -1 * tmp58;
    const auto tmp60 = tmp59 * tmp24;
    const auto tmp61 = tmp27 * (tmp22 < tmp14 ? 1 : 0.0);
    const auto tmp62 = tmp43 * tmp36;
    const auto tmp63 = tmp62 + tmp61;
    const auto tmp64 = tmp63 * (tmp23 > tmp6 ? 1 : 0.0);
    const auto tmp65 = tmp56 * tmp49;
    const auto tmp66 = tmp65 + tmp64;
    const auto tmp67 = -1 * tmp66;
    const auto tmp68 = tmp66 * tmp67;
    const auto tmp69 = tmp68 + tmp60;
    const auto tmp70 = 1 + tmp69;
    const auto tmp71 = tmp15 + tmp15;
    const auto tmp72 = tmp71 / tmp25;
    const auto tmp73 = 2 * tmp72;
    const auto tmp74 = tmp73 * tmp27;
    const auto tmp75 = -1 * tmp74;
    const auto tmp76 = tmp75 / tmp25;
    const auto tmp77 = tmp76 * (tmp22 < tmp14 ? 1 : 0.0);
    const auto tmp78 = tmp7 + tmp7;
    const auto tmp79 = tmp78 / tmp34;
    const auto tmp80 = 2 * tmp79;
    const auto tmp81 = tmp80 * tmp36;
    const auto tmp82 = -1 * tmp81;
    const auto tmp83 = tmp82 / tmp34;
    const auto tmp84 = tmp43 * tmp83;
    const auto tmp85 = tmp84 + tmp77;
    const auto tmp86 = tmp85 * (tmp23 > tmp6 ? 1 : 0.0);
    const auto tmp87 = tmp0[ 1 ] + tmp0[ 1 ];
    const auto tmp88 = tmp87 / tmp47;
    const auto tmp89 = 2 * tmp88;
    const auto tmp90 = tmp89 * tmp49;
    const auto tmp91 = -1 * tmp90;
    const auto tmp92 = tmp91 / tmp47;
    const auto tmp93 = tmp56 * tmp92;
    const auto tmp94 = tmp93 + tmp86;
    const auto tmp95 = -1 * tmp94;
    const auto tmp96 = tmp95 * tmp24;
    const auto tmp97 = tmp72 * (tmp22 < tmp14 ? 1 : 0.0);
    const auto tmp98 = tmp43 * tmp79;
    const auto tmp99 = tmp98 + tmp97;
    const auto tmp100 = tmp99 * (tmp23 > tmp6 ? 1 : 0.0);
    const auto tmp101 = tmp56 * tmp88;
    const auto tmp102 = tmp101 + tmp100;
    const auto tmp103 = tmp102 * tmp67;
    const auto tmp104 = tmp103 + tmp96;
    const auto tmp105 = tmp28 * tmp72;
    const auto tmp106 = -1 * tmp105;
    const auto tmp107 = tmp106 / tmp25;
    const auto tmp108 = tmp107 * (tmp22 < tmp14 ? 1 : 0.0);
    const auto tmp109 = tmp37 * tmp79;
    const auto tmp110 = -1 * tmp109;
    const auto tmp111 = tmp110 / tmp34;
    const auto tmp112 = tmp43 * tmp111;
    const auto tmp113 = tmp112 + tmp108;
    const auto tmp114 = tmp113 * (tmp23 > tmp6 ? 1 : 0.0);
    const auto tmp115 = tmp50 * tmp88;
    const auto tmp116 = -1 * tmp115;
    const auto tmp117 = tmp116 / tmp47;
    const auto tmp118 = tmp56 * tmp117;
    const auto tmp119 = tmp118 + tmp114;
    const auto tmp120 = -1 * tmp119;
    const auto tmp121 = tmp120 * tmp24;
    const auto tmp122 = -1 * tmp102;
    const auto tmp123 = tmp66 * tmp122;
    const auto tmp124 = tmp123 + tmp121;
    const auto tmp125 = tmp73 * tmp72;
    const auto tmp126 = -1 * tmp125;
    const auto tmp127 = 2 + tmp126;
    const auto tmp128 = tmp127 / tmp25;
    const auto tmp129 = tmp128 * (tmp22 < tmp14 ? 1 : 0.0);
    const auto tmp130 = tmp80 * tmp79;
    const auto tmp131 = -1 * tmp130;
    const auto tmp132 = 2 + tmp131;
    const auto tmp133 = tmp132 / tmp34;
    const auto tmp134 = tmp43 * tmp133;
    const auto tmp135 = tmp134 + tmp129;
    const auto tmp136 = tmp135 * (tmp23 > tmp6 ? 1 : 0.0);
    const auto tmp137 = tmp89 * tmp88;
    const auto tmp138 = -1 * tmp137;
    const auto tmp139 = 2 + tmp138;
    const auto tmp140 = tmp139 / tmp47;
    const auto tmp141 = tmp56 * tmp140;
    const auto tmp142 = tmp141 + tmp136;
    const auto tmp143 = -1 * tmp142;
    const auto tmp144 = tmp143 * tmp24;
    const auto tmp145 = tmp102 * tmp122;
    const auto tmp146 = tmp145 + tmp144;
    const auto tmp147 = 1 + tmp146;
    (result[ 0 ])[ 0 ] = tmp70;
    (result[ 0 ])[ 1 ] = tmp104;
    (result[ 1 ])[ 0 ] = tmp124;
    (result[ 1 ])[ 1 ] = tmp147;
  }

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

  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_ );
  }
  ConstantTupleType constants_;
  std::tuple<  > coefficients_;
};

} // namespace UFLLocalFunctions_6eccfc8fd91ce34d81e7c3962ece5d94

PYBIND11_MODULE( localfunction_6eccfc8fd91ce34d81e7c3962ece5d94_a524c1196983e65de1c06d7d6afdeb44, module )
{
  typedef UFLLocalFunctions_6eccfc8fd91ce34d81e7c3962ece5d94::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 > > > LocalFunctionType;
  if constexpr( LocalFunctionType::gridPartValid )
  {
      auto cls = Dune::Python::insertClass<LocalFunctionType>(module,"UFLLocalFunction",Dune::Python::GenerateTypeName("UFLLocalFunctions_6eccfc8fd91ce34d81e7c3962ece5d94::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::Python::IncludeFiles({"python/dune/generated/localfunction_6eccfc8fd91ce34d81e7c3962ece5d94_a524c1196983e65de1c06d7d6afdeb44.cc"})).first;
      Dune::FemPy::registerUFLLocalFunction( module, cls );
      cls.def( pybind11::init( [] ( pybind11::object gridView, const std::string &name, int order ) {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); } ), pybind11::keep_alive< 1, 2 >() );
      cls.def_property_readonly( "virtualized", [] ( LocalFunctionType& ) -> bool { return true;});
  }
}

#endif
